···10741074* Make sure libraries build for all Python interpreters.
10751075* By default we enable tests. Make sure the tests are found and, in the case of libraries, are passing for all interpreters. If certain tests fail they can be disabled individually. Try to avoid disabling the tests altogether. In any case, when you disable tests, leave a comment explaining why.
10761076* Commit names of Python libraries should reflect that they are Python libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`.
10771077-10771077+* Attribute names in `python-packages.nix` should be normalized according to [PEP 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names).
10781078+ This means that characters should be converted to lowercase and `.` and `_` should be replaced by a single `-` (foo-bar-baz instead of Foo__Bar.baz )
···11{ stdenv, perl, pixz, pathsFromGraph
2233, # The file name of the resulting tarball
44- fileName ? "nixos-system-${stdenv.system}"
44+ fileName ? "nixos-system-${stdenv.hostPlatform.system}"
5566, # The files and directories to be placed in the tarball.
77 # This is a list of attribute sets {source, target} where `source'
+2-2
nixos/lib/qemu-flags.nix
···14141515 qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0"
1616 else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0"
1717- else throw "Unknown QEMU serial device for system '${pkgs.stdenv.system}'";
1717+ else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'";
18181919 qemuBinary = qemuPkg: {
2020 "x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
2121 "armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host";
2222 "aarch64-linux" = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host";
2323 "x86_64-darwin" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
2424- }.${pkgs.stdenv.system} or "${qemuPkg}/bin/qemu-kvm";
2424+ }.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm";
2525}
···328328 qemu-libvirtd = 301;
329329 # kvm = 302; # unused
330330 # render = 303; # unused
331331+ zeronet = 304;
331332332333 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
333334···616617 qemu-libvirtd = 301;
617618 kvm = 302; # default udev rules from systemd requires these
618619 render = 303; # default udev rules from systemd requires these
620620+ zeronet = 304;
619621620622 # When adding a gid, make sure it doesn't match an existing
621623 # uid. Users and groups with the same name should have equal
···1717 version = "3.1.0";
18181919 src =
2020- if stdenv.system == "x86_64-linux" then
2020+ if stdenv.hostPlatform.system == "x86_64-linux" then
2121 if builtins.isNull releasePath then
2222 fetchurl {
2323 url = "https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86_64.tar.bz2";
···2525 }
2626 else
2727 releasePath
2828- else if stdenv.system == "i686-linux" then
2828+ else if stdenv.hostPlatform.system == "i686-linux" then
2929 if builtins.isNull releasePath then
3030 fetchurl {
3131 url = "http://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86.tar.bz2";
+4-3
pkgs/applications/audio/spotify/default.nix
···33, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_0_10, curl, zlib, gnome3 }:
4455let
66+ # TO UPDATE: just execute the ./update.sh script (won't do anything if there is no update)
67 # "rev" decides what is actually being downloaded
77- version = "1.0.80.474.gef6b503e-7";
88+ version = "1.0.88.353.g15c26ea1-14";
89 # To get the latest stable revision:
910 # curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated'
1011 # To get general information:
1112 # curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.'
1213 # More exapmles of api usage:
1314 # https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py
1414- rev = "16";
1515+ rev = "19";
151616171718 deps = [
···6465 # https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334
6566 src = fetchurl {
6667 url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap";
6767- sha512 = "45b7ab574b30fb368e0b6f4dd60addbfd1ddc02173b4f98b31c524eed49073432352a361e75959ce8e2f752231e93c79ca1b538c4bd295c935d1e2e0585d147f";
6868+ sha512 = "3a068cbe3c1fca84ae67e28830216f993aa459947517956897c3b3f63063005c9db646960e85185b149747ffc302060c208a7f9968ea69d50a3496067089f3db";
6869 };
69707071 buildInputs = [ squashfsTools makeWrapper ];
pkgs/applications/audio/spotify/update.sh
+2-2
pkgs/applications/audio/transcribe/default.nix
···77 name = "transcribe-${version}";
88 version = "8.40";
991010- src = if stdenv.system == "i686-linux" then
1010+ src = if stdenv.hostPlatform.system == "i686-linux" then
1111 fetchzip {
1212 url = "https://www.seventhstring.com/xscribe/downlinux32_old/xscsetup.tar.gz";
1313 sha256 = "1ngidmj9zz8bmv754s5xfsjv7v6xr03vck4kigzq4bpc9b1fdhjq";
1414 }
1515- else if stdenv.system == "x86_64-linux" then
1515+ else if stdenv.hostPlatform.system == "x86_64-linux" then
1616 fetchzip {
1717 url = "https://www.seventhstring.com/xscribe/downlinux64_old/xsc64setup.tar.gz";
1818 sha256 = "0svzi8svj6zn06gj0hr8mpnhq4416dvb4g5al0gpb1g3paywdaf9";
···1212in stdenv.mkDerivation rec {
1313 name = "brscan4-0.4.4-4";
1414 src =
1515- if stdenv.system == "i686-linux" then
1515+ if stdenv.hostPlatform.system == "i686-linux" then
1616 fetchurl {
1717 url = "http://download.brother.com/welcome/dlf006646/${name}.i386.deb";
1818 sha256 = "13mhjbzf9nvpdzrc2s98684r7likg76zxs1wlz2h8w59fsqgx4k2";
1919 }
2020- else if stdenv.system == "x86_64-linux" then
2020+ else if stdenv.hostPlatform.system == "x86_64-linux" then
2121 fetchurl {
2222 url = "https://download.brother.com/welcome/dlf006645/${name}.amd64.deb";
2323 sha256 = "0xy5px96y1saq9l80vwvfn6anr2q42qlxdhm6ci2a0diwib5q9fd";
2424 }
2525- else throw "${name} is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)";
2525+ else throw "${name} is not supported on ${stdenv.hostPlatform.system} (only i686-linux and x86_64 linux are supported)";
26262727 unpackPhase = ''
2828 ar x $src
···88 version = "15.02.1-1.03-5064";
991010 src =
1111- if stdenv.system == "x86_64-linux" then
1111+ if stdenv.hostPlatform.system == "x86_64-linux" then
1212 fetchurl {
1313 url = "https://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-amd64/cura_${version}_amd64.deb";
1414 sha256 = "1gsfidg3gim5pjbl82vkh0cw4ya253m4p7nirm8nr6yjrsirkzxg";
1515 }
1616- else if stdenv.system == "i686-linux" then
1616+ else if stdenv.hostPlatform.system == "i686-linux" then
1717 fetchurl {
1818 url = "http://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-i386/cura_${version}_i386.deb";
1919 sha256 = "0xd3df6bxq4rijgvsqvps454jkc1nzhxbdzzj6j2w317ppsbhyc1";
2020 }
2121- else throw "${name} is not supported on ${stdenv.system}";
2121+ else throw "${name} is not supported on ${stdenv.hostPlatform.system}";
22222323 python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ];
2424 pythonPath = python_deps;
+3-3
pkgs/applications/misc/googleearth/default.nix
···4455let
66 arch =
77- if stdenv.system == "x86_64-linux" then "amd64"
88- else if stdenv.system == "i686-linux" then "i386"
99- else throw "Unsupported system ${stdenv.system}";
77+ if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
88+ else if stdenv.hostPlatform.system == "i686-linux" then "i386"
99+ else throw "Unsupported system ${stdenv.hostPlatform.system}";
1010 sha256 =
1111 if arch == "amd64"
1212 then "0dwnppn5snl5bwkdrgj4cyylnhngi0g66fn2k41j3dvis83x24k6"
+2-2
pkgs/applications/misc/icesl/default.nix
···66 name = "iceSL-${version}";
77 version = "2.1.10";
8899- src = if stdenv.system == "x86_64-linux" then fetchzip {
99+ src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip {
1010 url = "https://gforge.inria.fr/frs/download.php/file/37268/icesl${version}-amd64.zip";
1111 sha256 = "0dv3mq6wy46xk9blzzmgbdxpsjdaxid3zadfrysxlhmgl7zb2cn2";
1212- } else if stdenv.system == "i686-linux" then fetchzip {
1212+ } else if stdenv.hostPlatform.system == "i686-linux" then fetchzip {
1313 url = "https://gforge.inria.fr/frs/download.php/file/37267/icesl${version}-i386.zip";
1414 sha256 = "0sl54fsb2gz6dy0bwdscpdq1ab6ph5b7zald3bwzgkqsvna7p1jr";
1515 } else throw "Unsupported architecture";
···60606161let
6262 arch =
6363- if stdenv.system == "x86_64-linux" then
6363+ if stdenv.hostPlatform.system == "x86_64-linux" then
6464 "x86_64"
6565- else if stdenv.system == "i686-linux" then
6565+ else if stdenv.hostPlatform.system == "i686-linux" then
6666 "i386"
6767 else throw "Flash Player is not supported on this platform";
6868 lib_suffix =
6969- if stdenv.system == "x86_64-linux" then
6969+ if stdenv.hostPlatform.system == "x86_64-linux" then
7070 "64"
7171 else
7272 "";
···339339340340 passthru.execdir = "/bin";
341341 meta = with stdenv.lib; {
342342- description = "An unofficial version of the tor browser bundle, built from source";
342342+ description = "An unofficial version of the Tor Browser Bundle, built from source";
343343+ longDescription = ''
344344+ Tor Browser Bundle is a bundle of the Tor daemon, Tor Browser (heavily patched version of
345345+ Firefox), several essential extensions for Tor Browser, and some tools that glue those
346346+ together with a convenient UI.
347347+348348+ `tor-browser-bundle-bin` package is the official version built by torproject.org patched with
349349+ `patchelf` to work under nix and with bundled scripts adapted to the read-only nature of
350350+ the `/nix/store`.
351351+352352+ `tor-browser-bundle` package is the version built completely from source. It reuses the `tor`
353353+ package for the tor daemon, `firefoxPackages.tor-browser` package for the tor-browser, and
354354+ builds all the extensions from source.
355355+356356+ Note that `tor-browser-bundle` package is not only built from source, but also bundles Tor
357357+ Browser differently from the official `tor-browser-bundle-bin` implementation. The official
358358+ Tor Browser is not a normal UNIX program and is heavily patched for its use in the Tor Browser
359359+ Bundle (which `tor-browser-bundle-bin` package then has to work around for the read-only
360360+ /nix/store). Meanwhile, `firefoxPackages.tor-browser` reverts all those patches, allowing
361361+ `firefoxPackages.tor-browser` to be used independently of the bundle, and then implements what
362362+ `tor-browser-bundle` needs for the bundling using a much simpler patch. See the
363363+ longDescription and expression of the `firefoxPackages.tor-browser` package for more info.
364364+ '';
343365 homepage = https://torproject.org/;
344366 license = licenses.free;
345367 platforms = [ "x86_64-linux" ];
···5353 ] + ":${stdenv.cc.cc.lib}/lib64";
54545555 src =
5656- if stdenv.system == "x86_64-linux" then
5656+ if stdenv.hostPlatform.system == "x86_64-linux" then
5757 fetchurl {
5858 url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb";
5959 sha256 = "1kydf71qbz35dx4674h3nxfx8a88k620217906i54ic4qq2mgy2x";
6060 }
6161 else
6262- throw "Skype for linux is not supported on ${stdenv.system}";
6262+ throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}";
63636464in stdenv.mkDerivation {
6565 name = "skypeforlinux-${version}";
···134134135135 GOOS = if stdenv.isDarwin then "darwin" else "linux";
136136 GOARCH = if stdenv.isDarwin then "amd64"
137137- else if stdenv.system == "i686-linux" then "386"
138138- else if stdenv.system == "x86_64-linux" then "amd64"
137137+ else if stdenv.hostPlatform.system == "i686-linux" then "386"
138138+ else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
139139 else if stdenv.isAarch32 then "arm"
140140 else if stdenv.isAarch64 then "arm64"
141141 else throw "Unsupported system";
142142- GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
142142+ GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
143143 GO386 = 387; # from Arch: don't assume sse2 on i686
144144 CGO_ENABLED = 1;
145145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
+5-5
pkgs/development/compilers/go/1.11.nix
···134134135135 GOOS = if stdenv.isDarwin then "darwin" else "linux";
136136 GOARCH = if stdenv.isDarwin then "amd64"
137137- else if stdenv.system == "i686-linux" then "386"
138138- else if stdenv.system == "x86_64-linux" then "amd64"
139139- else if stdenv.isAarch32 then "arm"
140140- else if stdenv.isAarch64 then "arm64"
137137+ else if stdenv.targetPlatform.isi686 then "386"
138138+ else if stdenv.targetPlatform.isx86_64 then "amd64"
139139+ else if stdenv.targetPlatform.isAarch32 then "arm"
140140+ else if stdenv.targetPlatform.isAarch64 then "arm64"
141141 else throw "Unsupported system";
142142- GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
142142+ GOARM = stdenv.targetPlatform.parsed.cpu.version or "";
143143 GO386 = 387; # from Arch: don't assume sse2 on i686
144144 CGO_ENABLED = 1;
145145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
+3-3
pkgs/development/compilers/go/1.4.nix
···128128129129 GOOS = if stdenv.isDarwin then "darwin" else "linux";
130130 GOARCH = if stdenv.isDarwin then "amd64"
131131- else if stdenv.system == "i686-linux" then "386"
132132- else if stdenv.system == "x86_64-linux" then "amd64"
131131+ else if stdenv.hostPlatform.system == "i686-linux" then "386"
132132+ else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
133133 else if stdenv.isAarch32 then "arm"
134134 else throw "Unsupported system";
135135- GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
135135+ GOARM = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
136136 GO386 = 387; # from Arch: don't assume sse2 on i686
137137 CGO_ENABLED = 0;
138138
+3-3
pkgs/development/compilers/go/1.9.nix
···134134135135 GOOS = if stdenv.isDarwin then "darwin" else "linux";
136136 GOARCH = if stdenv.isDarwin then "amd64"
137137- else if stdenv.system == "i686-linux" then "386"
138138- else if stdenv.system == "x86_64-linux" then "amd64"
137137+ else if stdenv.hostPlatform.system == "i686-linux" then "386"
138138+ else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
139139 else if stdenv.isAarch32 then "arm"
140140 else if stdenv.isAarch64 then "arm64"
141141 else throw "Unsupported system";
142142- GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
142142+ GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
143143 GO386 = 387; # from Arch: don't assume sse2 on i686
144144 CGO_ENABLED = 1;
145145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
···1010 name = "nvidia-cg-toolkit-${version}";
11111212 src =
1313- if stdenv.system == "x86_64-linux" then
1313+ if stdenv.hostPlatform.system == "x86_64-linux" then
1414 fetchurl {
1515 url = "https://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86_64.tgz";
1616 sha256 = "e8ff01e6cc38d1b3fd56a083f5860737dbd2f319a39037528fb1a74a89ae9878";
1717 }
1818- else if stdenv.system == "i686-linux" then
1818+ else if stdenv.hostPlatform.system == "i686-linux" then
1919 fetchurl {
2020 url = "http://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86.tgz";
2121 sha256 = "cef3591e436f528852db0e8c145d3842f920e0c89bcfb219c466797cb7b18879";
2222 }
2323- else throw "nvidia-cg-toolkit does not support platform ${stdenv.system}";
2323+ else throw "nvidia-cg-toolkit does not support platform ${stdenv.hostPlatform.system}";
24242525 installPhase = ''
2626 for b in cgc cgfxcat cginfo
+3-3
pkgs/development/compilers/opendylan/bin.nix
···55stdenv.mkDerivation {
66 name = "opendylan-2013.2";
7788- src = if stdenv.system == "x86_64-linux" then fetchurl {
88+ src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
99 url = https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86_64-linux.tar.bz2;
1010 sha256 = "035brbw3hm7zrs593q4zc42yglj1gmmkw3b1r7zzlw3ks4i2lg7h";
1111 }
1212- else if stdenv.system == "i686-linux" then fetchurl {
1212+ else if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
1313 url = https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86-linux.tar.bz2;
1414 sha256 = "0c61ihvblcsjrw6ncr8x8ylhskcrqs8pajs4mg5di36cvqw12nq5";
1515 }
1616- else throw "platform ${stdenv.system} not supported.";
1616+ else throw "platform ${stdenv.hostPlatform.system} not supported.";
17171818 buildInputs = [ patchelf boehmgc gnused makeWrapper ];
1919
···1313 * The JRE libraries are in directories that depend on the CPU.
1414 */
1515 architecture =
1616- if stdenv.system == "i686-linux" then
1616+ if stdenv.hostPlatform.system == "i686-linux" then
1717 "i386"
1818 else "amd64";
1919
···4343 # of polkit, which is what matters most, it does not override the allocator
4444 # so the failure of that test does not matter much.
4545 configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ] ++
4646- stdenv.lib.optionals (stdenv.system == "armv5tel-linux") [
4646+ stdenv.lib.optionals (stdenv.hostPlatform.system == "armv5tel-linux") [
4747 "--with-cpu-arch=armv5t"
4848 "--disable-tracejit" ];
4949
···1313, SDL # only for avplay in $bin, adds nontrivial closure to it
1414, enableGPL ? true # ToDo: some additional default stuff may need GPL
1515, enableUnfree ? faacSupport
1616-, hostPlatform
1716}:
18171918assert faacSupport -> enableUnfree;
···53525453 configurePlatforms = [];
5554 configureFlags = assert stdenv.lib.all (x: x!=null) buildInputs; [
5656- "--arch=${hostPlatform.parsed.cpu.name}"
5757- "--target_os=${hostPlatform.parsed.kernel.name}"
5555+ "--arch=${stdenv.hostPlatform.parsed.cpu.name}"
5656+ "--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
5857 #"--enable-postproc" # it's now a separate package in upstream
5958 "--disable-avserver" # upstream says it's in a bad state
6059 "--enable-avplay"
···11{ stdenv
22, fetchurl, autoreconfHook, gettext
33-, buildPlatform, hostPlatform
43}:
5465stdenv.mkDerivation rec {
···2019 configureFlags = []
2120 # Configure check for dynamic lib support is broken, see
2221 # http://lists.uclibc.org/pipermail/uclibc-cvs/2005-August/019383.html
2323- ++ stdenv.lib.optional (hostPlatform != buildPlatform) "mr_cv_target_elf=yes"
2222+ ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "mr_cv_target_elf=yes"
2423 # Libelf's custom NLS macros fail to determine the catalog file extension
2524 # on Darwin, so disable NLS for now.
2626- ++ stdenv.lib.optional hostPlatform.isDarwin "--disable-nls";
2525+ ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "--disable-nls";
27262827 nativeBuildInputs = [ gettext ]
2928 # Need to regenerate configure script with newer version in order to pass
3029 # "mr_cv_target_elf=yes", but `autoreconfHook` brings in `makeWrapper`
3130 # which doesn't work with the bootstrapTools bash, so can only do this
3231 # for cross builds when `stdenv.shell` is a newer bash.
3333- ++ stdenv.lib.optional (hostPlatform != buildPlatform) autoreconfHook;
3232+ ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) autoreconfHook;
34333534 meta = {
3635 description = "ELF object file access library";
+5-5
pkgs/development/libraries/libffi/default.nix
···11{ stdenv, fetchurl, fetchpatch
22-, buildPlatform, hostPlatform, autoreconfHook
22+, autoreconfHook
3344# libffi is used in darwin stdenv
55# we cannot run checks within it
···1919 url = https://src.fedoraproject.org/rpms/libffi/raw/ccffc1700abfadb0969495a6e51b964117fc03f6/f/libffi-aarch64-rhbz1174037.patch;
2020 sha256 = "1vpirrgny43hp0885rswgv3xski8hg7791vskpbg3wdjdpb20wbc";
2121 })
2222- ++ stdenv.lib.optional hostPlatform.isMusl (fetchpatch {
2222+ ++ stdenv.lib.optional stdenv.hostPlatform.isMusl (fetchpatch {
2323 name = "gnu-linux-define.patch";
2424 url = "https://git.alpinelinux.org/cgit/aports/plain/main/libffi/gnu-linux-define.patch?id=bb024fd8ec6f27a76d88396c9f7c5c4b5800d580";
2525 sha256 = "11pvy3xkhyvnjfyy293v51f1xjy3x0azrahv1nw9y9mw8bifa2j2";
2626 })
2727- ++ stdenv.lib.optional hostPlatform.isRiscV (fetchpatch {
2727+ ++ stdenv.lib.optional stdenv.hostPlatform.isRiscV (fetchpatch {
2828 name = "riscv-support.patch";
2929 url = https://github.com/sorear/libffi-riscv/commit/e46492e8bb1695a19bc1053ed869e6c2bab02ff2.patch;
3030 sha256 = "1vl1vbvdkigs617kckxvj8j4m2cwg62kxm1clav1w5rnw9afxg0y";
···44444545 outputs = [ "out" "dev" "man" "info" ];
46464747- nativeBuildInputs = stdenv.lib.optional hostPlatform.isRiscV autoreconfHook;
4747+ nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isRiscV autoreconfHook;
48484949 configureFlags = [
5050 "--with-gcc-arch=generic" # no detection of -march= or -mtune=
···60606161 inherit doCheck;
62626363- dontStrip = hostPlatform != buildPlatform; # Don't run the native `strip' when cross-compiling.
6363+ dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; # Don't run the native `strip' when cross-compiling.
64646565 # Install headers and libs in the right places.
6666 postFixup = ''
···2233let
44 version = "12.1.51";
55- isLinux = (stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux");
55+ isLinux = (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "i686-linux");
66in
7788-if (stdenv.system != "x86_64-linux" && stdenv.system != "x86_64-darwin" && stdenv.system != "i686-linux")
88+if (stdenv.hostPlatform.system != "x86_64-linux" && stdenv.hostPlatform.system != "x86_64-darwin" && stdenv.hostPlatform.system != "i686-linux")
99then throw "Check https://developer.spotify.com/technologies/libspotify/ for a tarball for your system and add it here"
1010else stdenv.mkDerivation {
1111 name = "libspotify-${version}";
12121313 src =
1414- if stdenv.system == "x86_64-linux" then
1414+ if stdenv.hostPlatform.system == "x86_64-linux" then
1515 fetchurl {
1616 url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-x86_64-release.tar.gz";
1717 sha256 = "0n0h94i4xg46hfba95n3ypah93crwb80bhgsg00f6sms683lx8a3";
1818 }
1919- else if stdenv.system == "x86_64-darwin" then
1919+ else if stdenv.hostPlatform.system == "x86_64-darwin" then
2020 fetchurl {
2121 url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Darwin-universal.zip";
2222 sha256 = "1gcgrc8arim3hnszcc886lmcdb4iigc08abkaa02l6gng43ky1c0";
2323 }
2424- else if stdenv.system == "i686-linux" then
2424+ else if stdenv.hostPlatform.system == "i686-linux" then
2525 fetchurl {
2626 url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-i686-release.tar.gz";
2727 sha256 = "1bjmn64gbr4p9irq426yap4ipq9rb84zsyhjjr7frmmw22xb86ll";
···464647474848 # darwin-specific
4949- buildInputs = stdenv.lib.optional (stdenv.system == "x86_64-darwin") unzip;
4949+ buildInputs = stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") unzip;
50505151 # linux-specific
5252 installFlags = stdenv.lib.optionalString (isLinux)
+2-4
pkgs/development/libraries/libssh2/default.nix
···11-{ stdenv, fetchurlBoot, openssl, zlib, windows
22-, hostPlatform
33-}:
11+{ stdenv, fetchurlBoot, openssl, zlib, windows }:
4253stdenv.mkDerivation rec {
64 name = "libssh2-1.8.0";
···1311 outputs = [ "out" "dev" "devdoc" ];
14121513 buildInputs = [ openssl zlib ]
1616- ++ stdenv.lib.optional hostPlatform.isMinGW windows.mingw_w64;
1414+ ++ stdenv.lib.optional stdenv.hostPlatform.isMinGW windows.mingw_w64;
17151816 meta = {
1917 description = "A client-side C library implementing the SSH2 protocol";
+9-10
pkgs/development/libraries/libvpx/default.nix
···11{ stdenv, fetchFromGitHub, perl, yasm
22-, hostPlatform
32, vp8DecoderSupport ? true # VP8 decoder
43, vp8EncoderSupport ? true # VP8 encoder
54, vp9DecoderSupport ? true # VP9 decoder
···141140 # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
142141 # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
143142 # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14
144144- "--force-target=${hostPlatform.config}${
145145- if hostPlatform.isDarwin then
146146- if hostPlatform.osxMinVersion == "10.10" then "14"
147147- else if hostPlatform.osxMinVersion == "10.9" then "13"
148148- else if hostPlatform.osxMinVersion == "10.8" then "12"
149149- else if hostPlatform.osxMinVersion == "10.7" then "11"
150150- else if hostPlatform.osxMinVersion == "10.6" then "10"
151151- else if hostPlatform.osxMinVersion == "10.5" then "9"
143143+ "--force-target=${stdenv.hostPlatform.config}${
144144+ if stdenv.hostPlatform.isDarwin then
145145+ if stdenv.hostPlatform.osxMinVersion == "10.10" then "14"
146146+ else if stdenv.hostPlatform.osxMinVersion == "10.9" then "13"
147147+ else if stdenv.hostPlatform.osxMinVersion == "10.8" then "12"
148148+ else if stdenv.hostPlatform.osxMinVersion == "10.7" then "11"
149149+ else if stdenv.hostPlatform.osxMinVersion == "10.6" then "10"
150150+ else if stdenv.hostPlatform.osxMinVersion == "10.5" then "9"
152151 else "8"
153152 else ""}-gcc"
154154- (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
153153+ (if stdenv.hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
155154 ] # Experimental features
156155 ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc"
157156 ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
+9-10
pkgs/development/libraries/libvpx/git.nix
···11{ stdenv, fetchgit, perl, yasm
22-, hostPlatform
32, vp8DecoderSupport ? true # VP8 decoder
43, vp8EncoderSupport ? true # VP8 encoder
54, vp9DecoderSupport ? true # VP9 decoder
···148147 # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
149148 # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
150149 # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14
151151- "--force-target=${hostPlatform.config}${
152152- if hostPlatform.isDarwin then
153153- if hostPlatform.osxMinVersion == "10.10" then "14"
154154- else if hostPlatform.osxMinVersion == "10.9" then "13"
155155- else if hostPlatform.osxMinVersion == "10.8" then "12"
156156- else if hostPlatform.osxMinVersion == "10.7" then "11"
157157- else if hostPlatform.osxMinVersion == "10.6" then "10"
158158- else if hostPlatform.osxMinVersion == "10.5" then "9"
150150+ "--force-target=${stdenv.hostPlatform.config}${
151151+ if stdenv.hostPlatform.isDarwin then
152152+ if stdenv.hostPlatform.osxMinVersion == "10.10" then "14"
153153+ else if stdenv.hostPlatform.osxMinVersion == "10.9" then "13"
154154+ else if stdenv.hostPlatform.osxMinVersion == "10.8" then "12"
155155+ else if stdenv.hostPlatform.osxMinVersion == "10.7" then "11"
156156+ else if stdenv.hostPlatform.osxMinVersion == "10.6" then "10"
157157+ else if stdenv.hostPlatform.osxMinVersion == "10.5" then "9"
159158 else "8"
160159 else ""}-gcc"
161161- (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
160160+ (if stdenv.hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
162161 ] # Experimental features
163162 ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc"
164163 ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
···6363 sha256 = "1ys9mshfpm8iy8h4ml792gnqrq959dsrcv26axx14niivxyjbji8";
6464 } + "/ippicv";
6565 files = let name = platform : "ippicv_2017u3_${platform}_general_20180518.tgz"; in
6666- if stdenv.system == "x86_64-linux" then
6666+ if stdenv.hostPlatform.system == "x86_64-linux" then
6767 { ${name "lnx_intel64"} = "b7cc351267db2d34b9efa1cd22ff0572"; }
6868- else if stdenv.system == "i686-linux" then
6868+ else if stdenv.hostPlatform.system == "i686-linux" then
6969 { ${name "lnx_ia32"} = "ea72de74dae3c604eb6348395366e78e"; }
7070- else if stdenv.system == "x86_64-darwin" then
7070+ else if stdenv.hostPlatform.system == "x86_64-darwin" then
7171 { ${name "mac_intel64"} = "3ae52b9be0fe73dd45bc5e9429cd3732"; }
7272 else
7373 throw "ICV is not available for this platform (or not yet supported by this package)";
+14-15
pkgs/development/libraries/openssl/default.nix
···11{ stdenv, fetchurl, buildPackages, perl
22-, buildPlatform, hostPlatform
32, withCryptodev ? false, cryptodevHeaders
43, enableSSL2 ? false
54, static ? false
···2019 (args.patches or [])
2120 ++ [ ./nix-ssl-cert-file.patch ]
2221 ++ optional (versionOlder version "1.1.0")
2323- (if hostPlatform.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch)
2424- ++ optional (versionOlder version "1.0.2" && hostPlatform.isDarwin)
2222+ (if stdenv.hostPlatform.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch)
2323+ ++ optional (versionOlder version "1.0.2" && stdenv.hostPlatform.isDarwin)
2524 ./darwin-arch.patch;
26252726 postPatch = ''
···40394140 outputs = [ "bin" "dev" "out" "man" ];
4241 setOutputFlags = false;
4343- separateDebugInfo = hostPlatform.isLinux;
4242+ separateDebugInfo = stdenv.hostPlatform.isLinux;
44434544 nativeBuildInputs = [ perl ];
4645 buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders;
···5049 configureScript = {
5150 "x86_64-darwin" = "./Configure darwin64-x86_64-cc";
5251 "x86_64-solaris" = "./Configure solaris64-x86_64-gcc";
5353- }.${hostPlatform.system} or (
5454- if hostPlatform == buildPlatform
5252+ }.${stdenv.hostPlatform.system} or (
5353+ if stdenv.hostPlatform == stdenv.buildPlatform
5554 then "./config"
5656- else if hostPlatform.isMinGW
5555+ else if stdenv.hostPlatform.isMinGW
5756 then "./Configure mingw${optionalString
5858- (hostPlatform.parsed.cpu.bits != 32)
5959- (toString hostPlatform.parsed.cpu.bits)}"
6060- else if hostPlatform.isLinux
6161- then "./Configure linux-generic${toString hostPlatform.parsed.cpu.bits}"
6262- else if hostPlatform.isiOS
6363- then "./Configure ios${toString hostPlatform.parsed.cpu.bits}-cross"
5757+ (stdenv.hostPlatform.parsed.cpu.bits != 32)
5858+ (toString stdenv.hostPlatform.parsed.cpu.bits)}"
5959+ else if stdenv.hostPlatform.isLinux
6060+ then "./Configure linux-generic${toString stdenv.hostPlatform.parsed.cpu.bits}"
6161+ else if stdenv.hostPlatform.isiOS
6262+ then "./Configure ios${toString stdenv.hostPlatform.parsed.cpu.bits}-cross"
6463 else
6565- throw "Not sure what configuration to use for ${hostPlatform.config}"
6464+ throw "Not sure what configuration to use for ${stdenv.hostPlatform.config}"
6665 );
67666867 configureFlags = [
···7372 "-DHAVE_CRYPTODEV"
7473 "-DUSE_CRYPTODEV_DIGESTS"
7574 ] ++ stdenv.lib.optional enableSSL2 "enable-ssl2"
7676- ++ stdenv.lib.optional (versionAtLeast version "1.1.0" && hostPlatform.isAarch64) "no-afalgeng";
7575+ ++ stdenv.lib.optional (versionAtLeast version "1.1.0" && stdenv.hostPlatform.isAarch64) "no-afalgeng";
77767877 makeFlags = [ "MANDIR=$(man)/share/man" ];
7978
···55stdenv.mkDerivation rec {
66 name = "scmccid-5.0.11";
7788- src = if stdenv.system == "i686-linux" then (fetchurl {
88+ src = if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
99 url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux.tar.gz";
1010 sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm";
1111 })
1212- else if stdenv.system == "x86_64-linux" then (fetchurl {
1212+ else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
1313 url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux_x64.tar.gz";
1414 sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i";
1515 })
+1-1
pkgs/development/libraries/skalibs/default.nix
···3333 # Explicitly setting target ensures code can be compiled against a skalibs
3434 # binary built on a different version of darwin.
3535 # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
3636- ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
3636+ ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
37373838 postInstall = ''
3939 mkdir -p $doc/share/doc/skalibs
+9-9
pkgs/development/libraries/tachyon/default.nix
···3434 export USEPNG=" -DUSEPNG"
3535 export PNGLIB=" -lpng -lz"
3636 '';
3737- arch = if stdenv.system == "x86_64-linux" then "linux-64-thr" else
3838- if stdenv.system == "i686-linux" then "linux-thr" else
3939- if stdenv.system == "aarch64-linux" then "linux-arm-thr" else
4040- if stdenv.system == "armv7l-linux" then "linux-arm-thr" else
4141- if stdenv.system == "x86_64-darwin" then "macosx-thr" else
4242- if stdenv.system == "i686-darwin" then "macosx-64-thr" else
4343- if stdenv.system == "i686-cygwin" then "win32" else
4444- if stdenv.system == "x86_64-freebsd" then "bsd" else
4545- if stdenv.system == "x686-freebsd" then "bsd" else
3737+ arch = if stdenv.hostPlatform.system == "x86_64-linux" then "linux-64-thr" else
3838+ if stdenv.hostPlatform.system == "i686-linux" then "linux-thr" else
3939+ if stdenv.hostPlatform.system == "aarch64-linux" then "linux-arm-thr" else
4040+ if stdenv.hostPlatform.system == "armv7l-linux" then "linux-arm-thr" else
4141+ if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx-thr" else
4242+ if stdenv.hostPlatform.system == "i686-darwin" then "macosx-64-thr" else
4343+ if stdenv.hostPlatform.system == "i686-cygwin" then "win32" else
4444+ if stdenv.hostPlatform.system == "x86_64-freebsd" then "bsd" else
4545+ if stdenv.hostPlatform.system == "x686-freebsd" then "bsd" else
4646 throw "Don't know what arch to select for tachyon build";
4747 makeFlags = "${arch}";
4848 patches = [
···11{stdenv, fetchurl, ocaml, findlib}:
2233+if stdenv.lib.versionAtLeast ocaml.version "4.06"
44+then throw "cryptgps is not available for OCaml ${ocaml.version}"
55+else
66+37stdenv.mkDerivation rec {
48 name = "ocaml-cryptgps-${version}";
59 version = "0.2.1";
+4
pkgs/development/ocaml-modules/dypgen/default.nix
···44 pname = "dypgen";
55in
6677+if stdenv.lib.versionAtLeast ocaml.version "4.06"
88+then throw "${pname} is not available for OCaml ${ocaml.version}"
99+else
1010+711stdenv.mkDerivation rec {
812 name = "${pname}-${version}";
913 version = "20120619-1";
···11{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }:
2233+if stdenv.lib.versionAtLeast ocaml.version "4.06"
44+then throw "erm_xml is not available for OCaml ${ocaml.version}"
55+else
66+37let version = "0.3"; in
4859stdenv.mkDerivation {
···2233assert stdenv.lib.versionOlder "4.00" (stdenv.lib.getVersion ocaml);
4455+if stdenv.lib.versionAtLeast ocaml.version "4.06"
66+then throw "fieldslib-109.20.03 is not available for OCaml ${ocaml.version}"
77+else
88+59stdenv.mkDerivation {
610 name = "ocaml-fieldslib-109.20.03";
711
+5-1
pkgs/development/ocaml-modules/frontc/default.nix
···11-{lib, buildOcaml, fetchurl}:
11+{ lib, buildOcaml, fetchurl, ocaml }:
22+33+if lib.versionAtLeast ocaml.version "4.06"
44+then throw "FrontC is not available for OCaml ${ocaml.version}"
55+else
2637buildOcaml rec {
48 name = "FrontC";
+4
pkgs/development/ocaml-modules/gtktop/default.nix
···2233let pname = "gtktop-2.0"; in
4455+if stdenv.lib.versionAtLeast ocaml.version "4.06"
66+then throw "${pname} is not available for OCaml ${ocaml.version}"
77+else
88+59stdenv.mkDerivation {
610 name = "ocaml-${pname}";
711
+1
pkgs/development/ocaml-modules/lwt/legacy.nix
···66}:
7788if !stdenv.lib.versionAtLeast ocaml.version "4"
99+ || stdenv.lib.versionAtLeast ocaml.version "4.06"
910then throw "lwt is not available for OCaml ${ocaml.version}"
1011else
1112
+4
pkgs/development/ocaml-modules/magick/default.nix
···11{ stdenv, fetchurl, which, pkgconfig, ocaml, findlib, imagemagick }:
2233+if stdenv.lib.versionAtLeast ocaml.version "4.06"
44+then throw "magick is not available for OCaml ${ocaml.version}"
55+else
66+37stdenv.mkDerivation {
48 name = "ocaml-magick-0.34";
59 src = fetchurl {
···44 pname = "ocaml-cairo";
55in
6677+if stdenv.lib.versionAtLeast ocaml.version "4.06"
88+then throw "${pname} is not available for OCaml ${ocaml.version}"
99+else
1010+711stdenv.mkDerivation rec {
812 name = "${pname}-${version}";
913 version = "1.2.0";
···44 pname = "ocamlsdl";
55in
6677+if stdenv.lib.versionAtLeast ocaml.version "4.06"
88+then throw "${pname} is not available for OCaml ${ocaml.version}"
99+else
1010+711stdenv.mkDerivation rec {
812 name = "${pname}-${version}";
913 version = "0.9.1";
+4
pkgs/development/ocaml-modules/odn/default.nix
···11{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, ounit, camlp4 }:
2233+if stdenv.lib.versionAtLeast ocaml.version "4.06"
44+then throw "ocaml-data-notation is not available for OCaml ${ocaml.version}"
55+else
66+37stdenv.mkDerivation {
48 name = "ocaml-data-notation-0.0.11";
59
···44 pname = "ulex";
55in
6677+if stdenv.lib.versionAtLeast ocaml.version "4.06"
88+then throw "ulex-0.8 is not available for OCaml ${ocaml.version}"
99+else
1010+711stdenv.mkDerivation rec {
812 name = "${pname}-${version}";
913 version = "0.8";
···11{ stdenv, fetchurl, m4, perl, help2man
22-, buildPlatform, hostPlatform
32}:
4354stdenv.mkDerivation rec {
···26252726 # Don't run the native `strip' when cross-compiling. This breaks at least
2827 # with `.a' files for MinGW.
2929- dontStrip = hostPlatform != buildPlatform;
2828+ dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
30293130 meta = {
3231 description = "GNU Libtool, a generic library support script";
+1-1
pkgs/development/tools/misc/lsof/default.nix
···11{ stdenv, fetchurl, buildPackages, ncurses }:
2233-let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in
33+let dialect = with stdenv.lib; last (splitString "-" stdenv.hostPlatform.system); in
4455stdenv.mkDerivation rec {
66 name = "lsof-${version}";
···44 version = "0.9.8.6-0.rc1";
55 webpage = "http://omake.metaprl.org";
66in
77+88+if stdenv.lib.versionAtLeast ocaml.version "4.06"
99+then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
1010+else
1111+712stdenv.mkDerivation {
813914 name = "${pname}-${version}";
+2-2
pkgs/development/tools/phantomjs/default.nix
···1212 # because it has bundled a lot of external libraries (like QT and Webkit)
1313 # and no easy/nice way to use the system versions of these
14141515- src = if stdenv.system == "i686-linux" then
1515+ src = if stdenv.hostPlatform.system == "i686-linux" then
1616 fetchurl {
1717 url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-i686.tar.bz2";
1818 sha256 = "11fzmssz9pqf3arh4f36w06sl2nyz8l9h8iyxyd7w5aqnq5la0j1";
1919 }
2020 else
2121- if stdenv.system == "x86_64-linux" then
2121+ if stdenv.hostPlatform.system == "x86_64-linux" then
2222 fetchurl {
2323 url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-x86_64.tar.bz2";
2424 sha256 = "0fhnqxxsxhy125fmif1lwgnlhfx908spy7fx9mng4w72320n5nd1";
+2-2
pkgs/development/tools/sauce-connect/default.nix
···77 version = "4.4.12";
8899 src = fetchurl (
1010- if stdenv.system == "x86_64-linux" then {
1010+ if stdenv.hostPlatform.system == "x86_64-linux" then {
1111 url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
1212 sha256 = "1yqvx64bgiq27hdhwkzgmzyib8pbjn1idpq6783srxq64asf6iyw";
1313- } else if stdenv.system == "i686-linux" then {
1313+ } else if stdenv.hostPlatform.system == "i686-linux" then {
1414 url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz";
1515 sha256 = "02kib56lv4lhwkj5r15484lvvbyjvf9ydi5vccsmxgsxrzmddnl6";
1616 } else {
···2020 ];
21212222 installPhase = with stdenv.lib; let
2323- sys = last (splitString "-" stdenv.system);
2424- arch = head (splitString "-" stdenv.system);
2323+ sys = last (splitString "-" stdenv.hostPlatform.system);
2424+ arch = head (splitString "-" stdenv.hostPlatform.system);
2525 in ''
2626 mkdir -p $out/bin
2727 find .
+1-1
pkgs/games/factorio/default.nix
···4646 };
4747 };
4848 };
4949- actual = binDists.${stdenv.system}.${releaseType}.${branch} or (throw "Factorio: unsupported platform");
4949+ actual = binDists.${stdenv.hostPlatform.system}.${releaseType}.${branch} or (throw "Factorio: unsupported platform");
50505151 bdistForArch = arch: { sha256 ? null
5252 , version ? "0.16.51"
+1-1
pkgs/games/nethack/default.nix
···66let
77 platform =
88 if stdenv.hostPlatform.isUnix then "unix"
99- else throw "Unknown platform for NetHack: ${stdenv.system}";
99+ else throw "Unknown platform for NetHack: ${stdenv.hostPlatform.system}";
1010 unixHint =
1111 if x11Mode then "linux-x11"
1212 else if qtMode then "linux-qt4"
+2-2
pkgs/games/oilrush/default.nix
···1313 assert url != null && sha256 != null;
1414 fetchurl { inherit url sha256; };
1515 shell = stdenv.shell;
1616- arch = if stdenv.system == "x86_64-linux" then "x64"
1717- else if stdenv.system == "i686-linux" then "x86"
1616+ arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
1717+ else if stdenv.hostPlatform.system == "i686-linux" then "x86"
1818 else "";
1919 unpackPhase = ''
2020 mkdir oilrush
···44 version = "0.151.u0-1";
55 name = "sdlmame-${version}";
6677- src = if stdenv.system == "x86_64-linux"
77+ src = if stdenv.hostPlatform.system == "x86_64-linux"
88 then fetchurl {
99 url = "http://seblu.net/a/archive/packages/s/sdlmame/${name}-x86_64.pkg.tar.xz";
1010 sha256 = "1j9vjxhrhsskrlk5wr7al4wk2hh3983kcva42mqal09bmc8qg3m9";
+3-3
pkgs/games/steam/default.nix
···44 callPackage = newScope self;
5566 self = rec {
77- steamArch = if pkgs.stdenv.system == "x86_64-linux" then "amd64"
88- else if pkgs.stdenv.system == "i686-linux" then "i386"
99- else throw "Unsupported platform: ${pkgs.stdenv.system}";
77+ steamArch = if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
88+ else if pkgs.stdenv.hostPlatform.system == "i686-linux" then "i386"
99+ else throw "Unsupported platform: ${pkgs.stdenv.hostPlatform.system}";
10101111 steam-runtime = callPackage ./runtime.nix { };
1212 steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { };
+2-2
pkgs/games/ut2004/demo.nix
···2233let
44 arch =
55- if stdenv.system == "x86_64-linux" then "amd64"
66- else if stdenv.system == "i686-linux" then "x86"
55+ if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
66+ else if stdenv.hostPlatform.system == "i686-linux" then "x86"
77 else throw "Unsupported architecture";
8899in stdenv.mkDerivation rec {
+1-1
pkgs/games/vessel/default.nix
···1515 message = goBuyItNow;
1616 name = "${name}-bin";
1717 sha256 = "1vpwcrjiln2mx43h7ib3jnccyr3chk7a5x2bw9kb4lw8ycygvg96";
1818- } else throw "unsupported platform ${stdenv.system} only i686-linux supported for now.";
1818+ } else throw "unsupported platform ${stdenv.hostPlatform.system} only i686-linux supported for now.";
19192020 phases = "installPhase";
2121 ld_preload = ./isatty.c;
+1-1
pkgs/games/worldofgoo/default.nix
···99 then "WorldOfGooDemo-1.41"
1010 else "WorldofGoo-1.41";
11111212- arch = if stdenv.system == "x86_64-linux" then "supported"
1212+ arch = if stdenv.hostPlatform.system == "x86_64-linux" then "supported"
1313 else throw "Sorry. World of Goo only is only supported on x86_64 now.";
14141515 goBuyItNow = ''
···77 file included in the tarball */
8899let arch =
1010- if stdenv.system == "x86_64-linux" then "64"
1111- else if stdenv.system == "i686-linux" then "32"
1212- else throw "Unsupported system ${stdenv.system}";
1010+ if stdenv.hostPlatform.system == "x86_64-linux" then "64"
1111+ else if stdenv.hostPlatform.system == "i686-linux" then "32"
1212+ else throw "Unsupported system ${stdenv.hostPlatform.system}";
13131414in stdenv.mkDerivation rec {
1515 name = "cnijfilter-${version}";
+3-3
pkgs/misc/cups/drivers/kyocera/default.nix
···2233let
44 platform =
55- if stdenv.system == "x86_64-linux" then "64bit"
66- else if stdenv.system == "i686-linux" then "32bit"
77- else throw "Unsupported system: ${stdenv.system}";
55+ if stdenv.hostPlatform.system == "x86_64-linux" then "64bit"
66+ else if stdenv.hostPlatform.system == "i686-linux" then "32bit"
77+ else throw "Unsupported system: ${stdenv.hostPlatform.system}";
8899 libPath = lib.makeLibraryPath [ cups ];
1010in
+3-3
pkgs/misc/cups/drivers/kyodialog3/default.nix
···6677let
88 platform =
99- if stdenv.system == "x86_64-linux" then "64bit"
1010- else if stdenv.system == "i686-linux" then "32bit"
1111- else throw "Unsupported system: ${stdenv.system}";
99+ if stdenv.hostPlatform.system == "x86_64-linux" then "64bit"
1010+ else if stdenv.hostPlatform.system == "i686-linux" then "32bit"
1111+ else throw "Unsupported system: ${stdenv.hostPlatform.system}";
1212 debPlatform =
1313 if platform == "64bit" then "amd64"
1414 else "i386";
+2-2
pkgs/misc/cups/drivers/samsung/4.01.17.nix
···1616# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
1717# to see what will break when upgrading. Consider a new versioned attribute.
1818let
1919- installationPath = if stdenv.system == "x86_64-linux" then "x86_64" else "i386";
2020- appendPath = if stdenv.system == "x86_64-linux" then "64" else "";
1919+ installationPath = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "i386";
2020+ appendPath = if stdenv.hostPlatform.system == "x86_64-linux" then "64" else "";
2121 libPath = stdenv.lib.makeLibraryPath [ cups libusb ] + ":$out/lib:${stdenv.cc.cc.lib}/lib${appendPath}";
2222in stdenv.mkDerivation rec {
2323 name = "samsung-UnifiedLinuxDriver-${version}";
+1-1
pkgs/misc/cups/drivers/samsung/default.nix
···2233let
4455- arch = if stdenv.system == "x86_64-linux"
55+ arch = if stdenv.hostPlatform.system == "x86_64-linux"
66 then "x86_64"
77 else "i386";
88
+1-1
pkgs/misc/drivers/gutenprint/bin.nix
···2727stdenv.mkDerivation {
2828 name = "cups-gutenprint-binary-5.0.1";
29293030- src = if stdenv.system == "x86_64-linux" then fetchurl {
3030+ src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
3131 url = https://www.openprinting.org/download/printdriver/debian/dists/lsb3.1/main/binary-amd64/gutenprint_5.0.1-1lsb3.1_amd64.deb;
3232 sha256 = "0an5gba6r6v54r53s2gj2fjk8fzpl4lrksjas2333528b0k8gbbc";
3333 } else throw "TODO"; # get from openprint.com -> drivers -> gutenprint
+3-3
pkgs/misc/drivers/hplip/3.16.11.nix
···3434 "armv7l-linux" = "arm32";
3535 };
36363737- hplipArch = hplipPlatforms."${stdenv.system}"
3838- or (throw "HPLIP not supported on ${stdenv.system}");
3737+ hplipArch = hplipPlatforms."${stdenv.hostPlatform.system}"
3838+ or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}");
39394040 pluginArches = [ "x86_32" "x86_64" "arm32" ];
41414242in
43434444assert withPlugin -> builtins.elem hplipArch pluginArches
4545- || throw "HPLIP plugin not supported on ${stdenv.system}";
4545+ || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}";
46464747pythonPackages.buildPythonApplication {
4848 inherit name src;
+3-3
pkgs/misc/drivers/hplip/default.nix
···3636 "armv7l-linux" = "arm32";
3737 };
38383939- hplipArch = hplipPlatforms."${stdenv.system}"
4040- or (throw "HPLIP not supported on ${stdenv.system}");
3939+ hplipArch = hplipPlatforms."${stdenv.hostPlatform.system}"
4040+ or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}");
41414242 pluginArches = [ "x86_32" "x86_64" "arm32" ];
43434444in
45454646assert withPlugin -> builtins.elem hplipArch pluginArches
4747- || throw "HPLIP plugin not supported on ${stdenv.system}";
4747+ || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}";
48484949pythonPackages.buildPythonApplication {
5050 inherit name src;
···1616 bitness = if stdenv.is64bit then "64" else "32";
17171818 libArch =
1919- if stdenv.system == "i686-linux" then
1919+ if stdenv.hostPlatform.system == "i686-linux" then
2020 "i386-linux-gnu"
2121- else if stdenv.system == "x86_64-linux" then
2121+ else if stdenv.hostPlatform.system == "x86_64-linux" then
2222 "x86_64-linux-gnu"
2323 else throw "amdgpu-pro is Linux only. Sorry. The build was stopped.";
2424
+2-2
pkgs/os-specific/linux/ati-drivers/default.nix
···3737 build = "15.302";
38383939 linuxonly =
4040- if stdenv.system == "i686-linux" then
4040+ if stdenv.hostPlatform.system == "i686-linux" then
4141 true
4242- else if stdenv.system == "x86_64-linux" then
4242+ else if stdenv.hostPlatform.system == "x86_64-linux" then
4343 true
4444 else throw "ati-drivers are Linux only. Sorry. The build was stopped.";
4545
···2424 homepage = https://www.jool.mx/;
2525 description = "Fairly compliant SIIT and Stateful NAT64 for Linux - CLI tools";
2626 platforms = platforms.linux;
2727+ license = licenses.gpl2;
2728 maintainers = with maintainers; [ fpletz ];
2829 };
2930}
+3-4
pkgs/os-specific/linux/kernel-headers/default.nix
···11{ stdenvNoCC, lib, buildPackages
22-, hostPlatform
32, fetchurl, perl
43}:
5466-assert hostPlatform.isLinux;
55+assert stdenvNoCC.hostPlatform.isLinux;
7687let
98 common = { version, sha256, patches ? null }: stdenvNoCC.mkDerivation {
···1413 inherit sha256;
1514 };
16151717- ARCH = hostPlatform.platform.kernelArch;
1616+ ARCH = stdenvNoCC.hostPlatform.platform.kernelArch;
18171918 # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc.
2019 # We do this so we have a build->build, not build->host, C compiler.
2120 depsBuildBuild = [ buildPackages.stdenv.cc ];
2221 nativeBuildInputs = [ perl ];
23222424- extraIncludeDirs = lib.optional hostPlatform.isPowerPC ["ppc"];
2323+ extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
25242625 # "patches" array defaults to 'null' to avoid changing hash
2726 # and causing mass rebuild
···348348349349 darwin = super.darwin // {
350350 inherit (darwin) dyld ICU Libsystem libiconv;
351351- } // lib.optionalAttrs (super.targetPlatform == localSystem) {
351351+ } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
352352 inherit (darwin) binutils binutils-unwrapped cctools;
353353 };
354354- } // lib.optionalAttrs (super.targetPlatform == localSystem) {
354354+ } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
355355 # Need to get rid of these when cross-compiling.
356356 inherit binutils binutils-unwrapped;
357357 };
+1-1
pkgs/stdenv/generic/make-derivation.nix
···187187 builder = attrs.realBuilder or stdenv.shell;
188188 args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
189189 inherit stdenv;
190190- inherit (stdenv) system;
190190+ inherit (stdenv.hostPlatform) system;
191191 userHook = config.stdenv.userHook or null;
192192 __ignoreNulls = true;
193193
+1-1
pkgs/stdenv/linux/default.nix
···366366 gnumake gnused gnutar gnugrep gnupatch patchelf
367367 attr acl paxctl zlib pcre;
368368 ${localSystem.libc} = getLibc prevStage;
369369- } // lib.optionalAttrs (super.targetPlatform == localSystem) {
369369+ } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
370370 # Need to get rid of these when cross-compiling.
371371 inherit (prevStage) binutils binutils-unwrapped;
372372 gcc = cc;
+3-3
pkgs/tools/X11/xwinwrap/default.nix
···1616 xlibsWrapper
1717 ];
18181919- buildPhase = if stdenv.system == "x86_64-linux" then ''
1919+ buildPhase = if stdenv.hostPlatform.system == "x86_64-linux" then ''
2020 make all64
2121- '' else if stdenv.system == "i686-linux" then ''
2121+ '' else if stdenv.hostPlatform.system == "i686-linux" then ''
2222 make all32
2323- '' else throw "xwinwrap is not supported on ${stdenv.system}";
2323+ '' else throw "xwinwrap is not supported on ${stdenv.hostPlatform.system}";
24242525 installPhase = ''
2626 mkdir -p $out/bin
+1-1
pkgs/tools/admin/bluemix-cli/default.nix
···55 version = "0.8.0";
6677 src =
88- if stdenv.system == "i686-linux" then
88+ if stdenv.hostPlatform.system == "i686-linux" then
99 fetchurl {
1010 name = "linux32-${version}.tar.gz";
1111 url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux32";
+1-1
pkgs/tools/admin/google-cloud-sdk/default.nix
···3232 name = "google-cloud-sdk-${version}";
3333 version = "206.0.0";
34343535- src = fetchurl (sources name stdenv.system);
3535+ src = fetchurl (sources name stdenv.hostPlatform.system);
36363737 buildInputs = [ python makeWrapper ];
3838
+1-1
pkgs/tools/archivers/gnutar/default.nix
···30303131 # May have some issues with root compilation because the bootstrap tool
3232 # cannot be used as a login shell for now.
3333- FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux" || stdenv.isSunOS) "1";
3333+ FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv7l-linux" || stdenv.isSunOS) "1";
34343535 preConfigure = if stdenv.isCygwin then ''
3636 sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
···11{ stdenv, fetchurl, libpng, static ? false
22-, buildPlatform, hostPlatform
32}:
4354# This package comes with its own copy of zlib, libpng and pngxtern
···2625 configureFlags = [
2726 "--with-system-zlib"
2827 "--with-system-libpng"
2929- ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [
2828+ ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
3029 #"-prefix=$out"
3130 ];
32313333- postInstall = if hostPlatform != buildPlatform && hostPlatform.isWindows then ''
3232+ postInstall = if stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isWindows then ''
3433 mv "$out"/bin/optipng{,.exe}
3534 '' else null;
3635
+5-5
pkgs/tools/graphics/pngout/default.nix
···11{stdenv, fetchurl}:
2233let
44- folder = if stdenv.system == "i686-linux" then "i686"
55- else if stdenv.system == "x86_64-linux" then "x86_64"
66- else throw "Unsupported system: ${stdenv.system}";
44+ folder = if stdenv.hostPlatform.system == "i686-linux" then "i686"
55+ else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
66+ else throw "Unsupported system: ${stdenv.hostPlatform.system}";
77in
88stdenv.mkDerivation {
99 name = "pngout-20130221";
···1717 mkdir -p $out/bin
1818 cp ${folder}/pngout $out/bin
19192020- ${if stdenv.system == "i686-linux" then ''
2020+ ${if stdenv.hostPlatform.system == "i686-linux" then ''
2121 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/pngout
2222- '' else if stdenv.system == "x86_64-linux" then ''
2222+ '' else if stdenv.hostPlatform.system == "x86_64-linux" then ''
2323 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/pngout
2424 '' else ""}
2525 '';
+5-5
pkgs/tools/misc/bandwidth/default.nix
···2233let
44 arch =
55- if stdenv.system == "x86_64-linux" then "bandwidth64"
66- else if stdenv.system == "i686-linux" then "bandwidth32"
77- else if stdenv.system == "x86_64-darwin" then "bandwidth-mac64"
88- else if stdenv.system == "i686-darwin" then "bandwidth-mac32"
99- else if stdenv.system == "i686-cygwin" then "bandwidth-win32"
55+ if stdenv.hostPlatform.system == "x86_64-linux" then "bandwidth64"
66+ else if stdenv.hostPlatform.system == "i686-linux" then "bandwidth32"
77+ else if stdenv.hostPlatform.system == "x86_64-darwin" then "bandwidth-mac64"
88+ else if stdenv.hostPlatform.system == "i686-darwin" then "bandwidth-mac32"
99+ else if stdenv.hostPlatform.system == "i686-cygwin" then "bandwidth-win32"
1010 else throw "Unknown architecture";
1111in
1212stdenv.mkDerivation rec {
+12-13
pkgs/tools/misc/coreutils/default.nix
···11{ stdenv, lib, buildPackages
22, autoreconfHook, texinfo, fetchurl, perl, xz, libiconv, gmp ? null
33-, hostPlatform, buildPlatform
43, aclSupport ? false, acl ? null
54, attrSupport ? false, attr ? null
65, selinuxSupport? false, libselinux ? null, libsepol ? null
···2120 sha256 = "0plm1zs9il6bb5mk881qvbghq4glc8ybbgakk2lfzb0w64fgml4j";
2221 };
23222424- patches = optional hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch;
2323+ patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch;
25242625 # The test tends to fail on btrfs and maybe other unusual filesystems.
2727- postPatch = optionalString (!hostPlatform.isDarwin) ''
2626+ postPatch = optionalString (!stdenv.hostPlatform.isDarwin) ''
2827 sed '2i echo Skipping dd sparse test && exit 0' -i ./tests/dd/sparse.sh
2928 sed '2i echo Skipping cp sparse test && exit 0' -i ./tests/cp/sparse.sh
3029 sed '2i echo Skipping rm deep-2 test && exit 0' -i ./tests/rm/deep-2.sh
···4039 configureFlags =
4140 optional (singleBinary != false)
4241 ("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}")
4343- ++ optional hostPlatform.isSunOS "ac_cv_func_inotify_init=no"
4242+ ++ optional stdenv.hostPlatform.isSunOS "ac_cv_func_inotify_init=no"
4443 ++ optional withPrefix "--program-prefix=g"
4545- ++ optionals (hostPlatform != buildPlatform && hostPlatform.libc == "glibc") [
4444+ ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "glibc") [
4645 # TODO(19b98110126fde7cbb1127af7e3fe1568eacad3d): Needed for fstatfs() I
4746 # don't know why it is not properly detected cross building with glibc.
4847 "fu_cv_sys_stat_statfs2_bsize=yes"
···5251 buildInputs = [ gmp ]
5352 ++ optional aclSupport acl
5453 ++ optional attrSupport attr
5555- ++ optionals hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch
5454+ ++ optionals stdenv.hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch
5655 ++ optionals selinuxSupport [ libselinux libsepol ]
5756 # TODO(@Ericson2314): Investigate whether Darwin could benefit too
5858- ++ optional (hostPlatform != buildPlatform && hostPlatform.libc != "glibc") libiconv;
5757+ ++ optional (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc != "glibc") libiconv;
59586059 # The tests are known broken on Cygwin
6160 # (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025),
6261 # Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351),
6362 # and {Open,Free}BSD.
6463 # With non-standard storeDir: https://github.com/NixOS/nix/issues/512
6565- doCheck = hostPlatform == buildPlatform
6666- && hostPlatform.libc == "glibc"
6464+ doCheck = stdenv.hostPlatform == stdenv.buildPlatform
6565+ && stdenv.hostPlatform.libc == "glibc"
6766 && builtins.storeDir == "/nix/store";
68676968 # Prevents attempts of running 'help2man' on cross-built binaries.
7070- PERL = if hostPlatform == buildPlatform then null else "missing";
6969+ PERL = if stdenv.hostPlatform == stdenv.buildPlatform then null else "missing";
71707271 # Saw random failures like ‘help2man: can't get '--help' info from
7372 # man/sha512sum.td/sha512sum’.
7473 enableParallelBuilding = false;
75747675 NIX_LDFLAGS = optionalString selinuxSupport "-lsepol";
7777- FORCE_UNSAFE_CONFIGURE = optionalString hostPlatform.isSunOS "1";
7676+ FORCE_UNSAFE_CONFIGURE = optionalString stdenv.hostPlatform.isSunOS "1";
78777978 # Works around a bug with 8.26:
8079 # Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually). Stop.
8181- preInstall = optionalString (hostPlatform != buildPlatform) ''
8080+ preInstall = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
8281 sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${buildPackages.coreutils}/bin/install -c|'
8382 '';
84838585- postInstall = optionalString (hostPlatform != buildPlatform) ''
8484+ postInstall = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
8685 rm $out/share/man/man1/*
8786 cp ${buildPackages.coreutils}/share/man/man1/* $out/share/man/man1
8887 '';
···2929 # Explicitly setting target ensures code can be compiled against a skalibs
3030 # binary built on a different version of darwin.
3131 # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
3232- ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
3232+ ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
33333434 postInstall = ''
3535 mkdir -p $doc/share/doc/s6-portable-utils/
+1-1
pkgs/tools/misc/staruml/default.nix
···1313 name = "staruml-${version}";
14141515 src =
1616- if stdenv.system == "i686-linux" then fetchurl {
1616+ if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
1717 url = "http://staruml.io/download/release/v${version}/StarUML-v${version}-32-bit.deb";
1818 sha256 = "0vb3k9m3l6pmsid4shlk0xdjsriq3gxzm8q7l04didsppg0vvq1n";
1919 } else fetchurl {
···3737 ./set-buildroot.patch
3838 ]
39394040- ++ stdenv.lib.optional (stdenv.system == "x86_64-linux")
4040+ ++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux")
4141 # Force use of old memcpy so that installwatch works on Glibc <
4242 # 2.14.
4343 ./use-old-memcpy.patch;
···4455let
66 afl-qemu = callPackage ./qemu.nix {};
77- qemu-exe-name = if stdenv.system == "x86_64-linux" then "qemu-x86_64"
88- else if stdenv.system == "i686-linux" then "qemu-i386"
99- else throw "afl: no support for ${stdenv.system}!";
77+ qemu-exe-name = if stdenv.hostPlatform.system == "x86_64-linux" then "qemu-x86_64"
88+ else if stdenv.hostPlatform.system == "i686-linux" then "qemu-i386"
99+ else throw "afl: no support for ${stdenv.hostPlatform.system}!";
1010in
11111212stdenv.mkDerivation rec {
+4-4
pkgs/tools/security/afl/qemu.nix
···1616 aflTypesFile = writeText "afl-types.h"
1717 (builtins.readFile ./qemu-patches/afl-types.h);
18181919- cpuTarget = if stdenv.system == "x86_64-linux" then "x86_64-linux-user"
2020- else if stdenv.system == "i686-linux" then "i386-linux-user"
2121- else throw "afl: no support for ${stdenv.system}!";
1919+ cpuTarget = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-user"
2020+ else if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-user"
2121+ else throw "afl: no support for ${stdenv.hostPlatform.system}!";
2222in
2323stdenv.mkDerivation rec {
2424 name = "afl-${n}";
···3333 vde2 texinfo libuuid flex bison lzo snappy autoconf
3434 libcap_ng gnutls
3535 ]
3636- ++ optionals (hasSuffix "linux" stdenv.system) [ libaio ];
3636+ ++ optionals (hasSuffix "linux" stdenv.hostPlatform.system) [ libaio ];
37373838 enableParallelBuilding = true;
3939
+6-6
pkgs/tools/security/encryptr/default.nix
···55}:
6677let
88- arch = if stdenv.system == "x86_64-linux" then "amd"
99- else if stdenv.system == "i686-linux" then "i386"
1010- else throw "Encryptr for ${stdenv.system} not supported!";
88+ arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd"
99+ else if stdenv.hostPlatform.system == "i686-linux" then "i386"
1010+ else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!";
11111212- sha256 = if stdenv.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2"
1313- else if stdenv.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm"
1414- else throw "Encryptr for ${stdenv.system} not supported!";
1212+ sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2"
1313+ else if stdenv.hostPlatform.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm"
1414+ else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!";
15151616in stdenv.mkDerivation rec {
1717 name = "encryptr-${version}";
···11-{ pkgs, buildEnv, runCommand, hostPlatform, lib, stdenv }:
11+{ pkgs, buildEnv, runCommand, lib, stdenv }:
2233# These are some unix tools that are commonly included in the /usr/bin
44# and /usr/sbin directory under more normal distributions. Along with
···1616 version = "1003.1-2008";
17171818 singleBinary = cmd: providers: let
1919- provider = providers.${hostPlatform.parsed.kernel.name};
1919+ provider = providers.${stdenv.hostPlatform.parsed.kernel.name};
2020 bin = "${getBin provider}/bin/${cmd}";
2121 manpage = "${getOutput "man" provider}/share/man/man1/${cmd}.1.gz";
2222 in runCommand "${cmd}-${version}" {
···5959 linux = pkgs.utillinux;
6060 };
6161 getconf = {
6262- linux = if hostPlatform.libc == "glibc" then pkgs.glibc
6262+ linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc
6363 else pkgs.netbsd.getconf;
6464 darwin = pkgs.darwin.system_cmds;
6565 };
6666 getent = {
6767- linux = if hostPlatform.libc == "glibc" then pkgs.glibc
6767+ linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc
6868 else pkgs.netbsd.getent;
6969 darwin = pkgs.netbsd.getent;
7070 };