mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
108 lines
2.1 KiB
Nix
108 lines
2.1 KiB
Nix
{ lib, stdenv
|
|
, fetchurl
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, pixman
|
|
, alsa-lib
|
|
, openssl
|
|
, libXrandr
|
|
, libXfixes
|
|
, libXext
|
|
, libXrender
|
|
, libXinerama
|
|
, libjpeg
|
|
, zlib
|
|
, spice-protocol
|
|
, python3
|
|
, glib
|
|
, cyrus_sasl
|
|
, libcacard
|
|
, lz4
|
|
, libopus
|
|
, gst_all_1
|
|
, orc
|
|
, gdk-pixbuf
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "spice";
|
|
version = "0.15.2";
|
|
|
|
src = fetchurl {
|
|
url = "https://www.spice-space.org/download/releases/spice-server/${pname}-${version}.tar.bz2";
|
|
sha256 = "sha256-bZ62EX8DkXRxxLwQAEq+z/SKefuF64WhxF8CM3cBW4E=";
|
|
};
|
|
|
|
patches = [
|
|
./remove-rt-on-darwin.patch
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
glib
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
python3
|
|
python3.pkgs.six
|
|
python3.pkgs.pyparsing
|
|
];
|
|
|
|
buildInputs = [
|
|
cyrus_sasl
|
|
glib
|
|
gst_all_1.gst-plugins-base
|
|
libXext
|
|
libXfixes
|
|
libXinerama
|
|
libXrandr
|
|
libXrender
|
|
libcacard
|
|
libjpeg
|
|
libopus
|
|
lz4
|
|
openssl
|
|
orc
|
|
pixman
|
|
python3.pkgs.pyparsing
|
|
spice-protocol
|
|
zlib
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
alsa-lib
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
gdk-pixbuf
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = "-fno-stack-protector";
|
|
|
|
mesonFlags = [
|
|
"-Dgstreamer=1.0"
|
|
];
|
|
|
|
postPatch = ''
|
|
patchShebangs build-aux
|
|
|
|
# Forgotten in 0.15.2 tarball
|
|
sed -i /meson.add_dist_script/d meson.build
|
|
'';
|
|
|
|
postInstall = ''
|
|
ln -s spice-server $out/include/spice
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Complete open source solution for interaction with virtualized desktop devices";
|
|
longDescription = ''
|
|
The Spice project aims to provide a complete open source solution for interaction
|
|
with virtualized desktop devices.The Spice project deals with both the virtualized
|
|
devices and the front-end. Interaction between front-end and back-end is done using
|
|
VD-Interfaces. The VD-Interfaces (VDI) enable both ends of the solution to be easily
|
|
utilized by a third-party component.
|
|
'';
|
|
homepage = "https://www.spice-space.org/";
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ bluescreen303 atemu ];
|
|
platforms = with platforms; linux ++ darwin;
|
|
};
|
|
}
|