diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-08-20 15:11:29 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-08-30 17:20:32 -0400 |
commit | 2c2f1e37d4374ea61caefd9389927ea03df4ce31 (patch) | |
tree | 1c0dff3f6483825a9143741bdddca44f35bb4224 /pkgs/tools | |
parent | 94f71d800db2ef7afb9fc8dad9e9aa503bfa2941 (diff) | |
download | nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.gz nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.bz2 nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.lz nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.xz nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.zst nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.zip |
reewide: Purge all uses `stdenv.system` and top-level `system`
It is deprecated and will be removed after 18.09.
Diffstat (limited to 'pkgs/tools')
40 files changed, 88 insertions, 87 deletions
diff --git a/pkgs/tools/X11/xwinwrap/default.nix b/pkgs/tools/X11/xwinwrap/default.nix index cc2eb50ce1fd..dbbdb0c04e91 100644 --- a/pkgs/tools/X11/xwinwrap/default.nix +++ b/pkgs/tools/X11/xwinwrap/default.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation { xlibsWrapper ]; - buildPhase = if stdenv.system == "x86_64-linux" then '' + buildPhase = if stdenv.hostPlatform.system == "x86_64-linux" then '' make all64 - '' else if stdenv.system == "i686-linux" then '' + '' else if stdenv.hostPlatform.system == "i686-linux" then '' make all32 - '' else throw "xwinwrap is not supported on ${stdenv.system}"; + '' else throw "xwinwrap is not supported on ${stdenv.hostPlatform.system}"; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/admin/bluemix-cli/default.nix b/pkgs/tools/admin/bluemix-cli/default.nix index 7ae54aab4b9d..8b6395d85d04 100644 --- a/pkgs/tools/admin/bluemix-cli/default.nix +++ b/pkgs/tools/admin/bluemix-cli/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "0.8.0"; src = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { name = "linux32-${version}.tar.gz"; url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux32"; diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index c2f73cea9558..8b98636b3475 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -32,7 +32,7 @@ in stdenv.mkDerivation rec { name = "google-cloud-sdk-${version}"; version = "206.0.0"; - src = fetchurl (sources name stdenv.system); + src = fetchurl (sources name stdenv.hostPlatform.system); buildInputs = [ python makeWrapper ]; diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index 7532cd899cc6..0cde72069848 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { # May have some issues with root compilation because the bootstrap tool # cannot be used as a login shell for now. - FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux" || stdenv.isSunOS) "1"; + FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv7l-linux" || stdenv.isSunOS) "1"; preConfigure = if stdenv.isCygwin then '' sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,' diff --git a/pkgs/tools/bootloaders/refind/default.nix b/pkgs/tools/bootloaders/refind/default.nix index 73463bbef897..5f4d77e34b6a 100644 --- a/pkgs/tools/bootloaders/refind/default.nix +++ b/pkgs/tools/bootloaders/refind/default.nix @@ -7,7 +7,7 @@ let }; inherit - (archids.${stdenv.system} or (throw "unsupported system: ${stdenv.system}")) + (archids.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}")) hostarch efiPlatform; in diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix index 4b127417ca8d..4a2ba2fcb94c 100644 --- a/pkgs/tools/compression/bzip2/default.nix +++ b/pkgs/tools/compression/bzip2/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl -, linkStatic ? (stdenv.system == "i686-cygwin") +, linkStatic ? (stdenv.hostPlatform.system == "i686-cygwin") }: stdenv.mkDerivation rec { diff --git a/pkgs/tools/filesystems/sshfs-fuse/default.nix b/pkgs/tools/filesystems/sshfs-fuse/default.nix index 183cfb2ddbe4..ddec6b7eff89 100644 --- a/pkgs/tools/filesystems/sshfs-fuse/default.nix +++ b/pkgs/tools/filesystems/sshfs-fuse/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { checkInputs = [ which python3Packages.pytest ]; NIX_CFLAGS_COMPILE = stdenv.lib.optional - (stdenv.system == "i686-linux") + (stdenv.hostPlatform.system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; postInstall = '' diff --git a/pkgs/tools/graphics/pngout/default.nix b/pkgs/tools/graphics/pngout/default.nix index afc1a2519fe1..333e5f600765 100644 --- a/pkgs/tools/graphics/pngout/default.nix +++ b/pkgs/tools/graphics/pngout/default.nix @@ -1,9 +1,9 @@ {stdenv, fetchurl}: let - folder = if stdenv.system == "i686-linux" then "i686" - else if stdenv.system == "x86_64-linux" then "x86_64" - else throw "Unsupported system: ${stdenv.system}"; + folder = if stdenv.hostPlatform.system == "i686-linux" then "i686" + else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation { name = "pngout-20130221"; @@ -17,9 +17,9 @@ stdenv.mkDerivation { mkdir -p $out/bin cp ${folder}/pngout $out/bin - ${if stdenv.system == "i686-linux" then '' + ${if stdenv.hostPlatform.system == "i686-linux" then '' patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/pngout - '' else if stdenv.system == "x86_64-linux" then '' + '' else if stdenv.hostPlatform.system == "x86_64-linux" then '' patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/pngout '' else ""} ''; diff --git a/pkgs/tools/misc/bandwidth/default.nix b/pkgs/tools/misc/bandwidth/default.nix index e8ea9117bc5a..e50faaca8995 100644 --- a/pkgs/tools/misc/bandwidth/default.nix +++ b/pkgs/tools/misc/bandwidth/default.nix @@ -2,11 +2,11 @@ let arch = - if stdenv.system == "x86_64-linux" then "bandwidth64" - else if stdenv.system == "i686-linux" then "bandwidth32" - else if stdenv.system == "x86_64-darwin" then "bandwidth-mac64" - else if stdenv.system == "i686-darwin" then "bandwidth-mac32" - else if stdenv.system == "i686-cygwin" then "bandwidth-win32" + if stdenv.hostPlatform.system == "x86_64-linux" then "bandwidth64" + else if stdenv.hostPlatform.system == "i686-linux" then "bandwidth32" + else if stdenv.hostPlatform.system == "x86_64-darwin" then "bandwidth-mac64" + else if stdenv.hostPlatform.system == "i686-darwin" then "bandwidth-mac32" + else if stdenv.hostPlatform.system == "i686-cygwin" then "bandwidth-win32" else throw "Unknown architecture"; in stdenv.mkDerivation rec { diff --git a/pkgs/tools/misc/execline/default.nix b/pkgs/tools/misc/execline/default.nix index 0b606882a5c3..360808f4280b 100644 --- a/pkgs/tools/misc/execline/default.nix +++ b/pkgs/tools/misc/execline/default.nix @@ -32,7 +32,7 @@ in stdenv.mkDerivation rec { "--with-dynlib=${skalibs.lib}/lib" ] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/execline diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix index 63511782f00b..481a07ef491b 100644 --- a/pkgs/tools/misc/grub/2.0x.nix +++ b/pkgs/tools/misc/grub/2.0x.nix @@ -28,8 +28,8 @@ let "aarch64-linux".target = "arm64"; }; - canEfi = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild); - inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems); + canEfi = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild); + inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems); version = "2.02"; @@ -86,14 +86,14 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-grub-mount" ] # dep of os-prober ++ optional zfsSupport "--enable-libzfs" - ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ] - ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.system}.target}"]; + ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}" "--program-prefix=" ] + ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}"]; # save target that grub is compiled for grubTarget = if efiSupport - then "${efiSystemsInstall.${stdenv.system}.target}-efi" + then "${efiSystemsInstall.${stdenv.hostPlatform.system}.target}-efi" else if inPCSystems - then "${pcSystems.${stdenv.system}.target}-pc" + then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc" else ""; doCheck = false; diff --git a/pkgs/tools/misc/grub/pvgrub_image/default.nix b/pkgs/tools/misc/grub/pvgrub_image/default.nix index df5e3f15e95a..19d8afb18575 100644 --- a/pkgs/tools/misc/grub/pvgrub_image/default.nix +++ b/pkgs/tools/misc/grub/pvgrub_image/default.nix @@ -22,11 +22,11 @@ stdenv.mkDerivation rec { tar -cf memdisk.tar grub.cfg # We include all modules except all_video.mod as otherwise grub will fail printing "no symbol table" # if we include it. - grub-mkimage -O "${efiSystemsBuild.${stdenv.system}.target}-xen" -c grub-bootstrap.cfg \ - -m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" \ - $(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$') + grub-mkimage -O "${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen" -c grub-bootstrap.cfg \ + -m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" \ + $(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$') mkdir -p "$out/lib/grub-xen" - cp "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" $out/lib/grub-xen/ + cp "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" $out/lib/grub-xen/ ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/misc/grub/trusted.nix b/pkgs/tools/misc/grub/trusted.nix index 63a73658e0ac..0e867d7cffd0 100644 --- a/pkgs/tools/misc/grub/trusted.nix +++ b/pkgs/tools/misc/grub/trusted.nix @@ -10,7 +10,7 @@ let "x86_64-linux".target = "i386"; }; - inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems); + inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems); version = if for_HP_laptop then "1.2.1" else "1.2.0"; @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { # save target that grub is compiled for grubTarget = if inPCSystems - then "${pcSystems.${stdenv.system}.target}-pc" + then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc" else ""; doCheck = false; diff --git a/pkgs/tools/misc/mongodb-compass/default.nix b/pkgs/tools/misc/mongodb-compass/default.nix index f8475ee2e0e0..840d4eacd378 100644 --- a/pkgs/tools/misc/mongodb-compass/default.nix +++ b/pkgs/tools/misc/mongodb-compass/default.nix @@ -43,13 +43,13 @@ let ] + ":${stdenv.cc.cc.lib}/lib64"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb"; sha256 = "0x23jshnr0rafm5sn2vhq2y2gryg8mksahzyv5fszblgaxay234p"; } else - throw "MongoDB compass is not supported on ${stdenv.system}"; + throw "MongoDB compass is not supported on ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation { name = "mongodb-compass-${version}"; diff --git a/pkgs/tools/misc/mprime/default.nix b/pkgs/tools/misc/mprime/default.nix index 850ed32998b4..e18e9020e1da 100644 --- a/pkgs/tools/misc/mprime/default.nix +++ b/pkgs/tools/misc/mprime/default.nix @@ -2,15 +2,15 @@ let srcDir = - if stdenv.system == "x86_64-linux" then "linux64" - else if stdenv.system == "i686-linux" then "linux" - else if stdenv.system == "x86_64-darwin" then "macosx64" + if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" + else if stdenv.hostPlatform.system == "i686-linux" then "linux" + else if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx64" else throwSystem; - throwSystem = throw "Unsupported system: ${stdenv.system}"; + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; gwnum = - if stdenv.system == "x86_64-linux" then "make64" - else if stdenv.system == "i686-linux" then "makefile" - else if stdenv.system == "x86_64-darwin" then "makemac" + if stdenv.hostPlatform.system == "x86_64-linux" then "make64" + else if stdenv.hostPlatform.system == "i686-linux" then "makefile" + else if stdenv.hostPlatform.system == "x86_64-darwin" then "makemac" else throwSystem; in diff --git a/pkgs/tools/misc/ocz-ssd-guru/default.nix b/pkgs/tools/misc/ocz-ssd-guru/default.nix index afe7a81ebac8..9ffb89aca6b1 100644 --- a/pkgs/tools/misc/ocz-ssd-guru/default.nix +++ b/pkgs/tools/misc/ocz-ssd-guru/default.nix @@ -1,7 +1,7 @@ { fetchurl, stdenv, xorg, freetype, fontconfig, libGLU_combined, glibc, makeWrapper }: let - system = if stdenv.system == "x86_64-linux" then "linux64" else "linux32"; + system = if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" else "linux32"; in stdenv.mkDerivation rec { name = "ocz-ssd-guru-${version}"; diff --git a/pkgs/tools/misc/os-prober/default.nix b/pkgs/tools/misc/os-prober/default.nix index 6211c863bd49..59a60e356b80 100644 --- a/pkgs/tools/misc/os-prober/default.nix +++ b/pkgs/tools/misc/os-prober/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { install -Dt $out/share common.sh # probes - case "${stdenv.system}" in + case "${stdenv.hostPlatform.system}" in i686*|x86_64*) ARCH=x86;; powerpc*) ARCH=powerpc;; arm*) ARCH=arm;; diff --git a/pkgs/tools/misc/s6-portable-utils/default.nix b/pkgs/tools/misc/s6-portable-utils/default.nix index 014e000eabdb..5f56daf3a48d 100644 --- a/pkgs/tools/misc/s6-portable-utils/default.nix +++ b/pkgs/tools/misc/s6-portable-utils/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { # Explicitly setting target ensures code can be compiled against a skalibs # binary built on a different version of darwin. # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/s6-portable-utils/ diff --git a/pkgs/tools/misc/staruml/default.nix b/pkgs/tools/misc/staruml/default.nix index 2a06400b411f..486634452ae9 100644 --- a/pkgs/tools/misc/staruml/default.nix +++ b/pkgs/tools/misc/staruml/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { name = "staruml-${version}"; src = - if stdenv.system == "i686-linux" then fetchurl { + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "http://staruml.io/download/release/v${version}/StarUML-v${version}-32-bit.deb"; sha256 = "0vb3k9m3l6pmsid4shlk0xdjsriq3gxzm8q7l04didsppg0vvq1n"; } else fetchurl { diff --git a/pkgs/tools/networking/airfield/default.nix b/pkgs/tools/networking/airfield/default.nix index 6f6009c107ba..70005038f99d 100644 --- a/pkgs/tools/networking/airfield/default.nix +++ b/pkgs/tools/networking/airfield/default.nix @@ -6,7 +6,7 @@ let nodePackages = import ./node.nix { inherit pkgs; - system = stdenv.system; + system = stdenv.hostPlatform.system; }; runtimeEnv = buildEnv { diff --git a/pkgs/tools/networking/filegive/default.nix b/pkgs/tools/networking/filegive/default.nix index 6fef6a9e7fa9..a76519b36b57 100644 --- a/pkgs/tools/networking/filegive/default.nix +++ b/pkgs/tools/networking/filegive/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ go ]; buildPhase = '' - ${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"} + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"} mkdir $TMPDIR/go export GOPATH=$TMPDIR/go diff --git a/pkgs/tools/networking/logmein-hamachi/default.nix b/pkgs/tools/networking/logmein-hamachi/default.nix index 2e045ad8de91..c5c7e18ba6d2 100644 --- a/pkgs/tools/networking/logmein-hamachi/default.nix +++ b/pkgs/tools/networking/logmein-hamachi/default.nix @@ -4,13 +4,13 @@ with stdenv.lib; let arch = - if stdenv.system == "x86_64-linux" then "x64" - else if stdenv.system == "i686-linux" then "x86" + if stdenv.hostPlatform.system == "x86_64-linux" then "x64" + else if stdenv.hostPlatform.system == "i686-linux" then "x86" else throwSystem; - throwSystem = throw "Unsupported system: ${stdenv.system}"; + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; sha256 = - if stdenv.system == "x86_64-linux" then "11mxa4kls5xjj3462ycrfvfxb1xkk23p5m9iirvwsi0zdmhpnwm8" - else if stdenv.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62" + if stdenv.hostPlatform.system == "x86_64-linux" then "11mxa4kls5xjj3462ycrfvfxb1xkk23p5m9iirvwsi0zdmhpnwm8" + else if stdenv.hostPlatform.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62" else throwSystem; libraries = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]; diff --git a/pkgs/tools/networking/ngrok-2/default.nix b/pkgs/tools/networking/ngrok-2/default.nix index 23725fb2d874..fdf9067dfee9 100644 --- a/pkgs/tools/networking/ngrok-2/default.nix +++ b/pkgs/tools/networking/ngrok-2/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { } else if stdenv.isDarwin then fetchurl { url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-386.zip"; sha256 = "0yfd250b55wcpgqd00rqfaa7a82f35fmybb31q5xwdbgc2i47pbh"; - } else throw "platform ${stdenv.system} not supported!"; + } else throw "platform ${stdenv.hostPlatform.system} not supported!"; sourceRoot = "."; diff --git a/pkgs/tools/networking/s6-dns/default.nix b/pkgs/tools/networking/s6-dns/default.nix index db2071ab17da..29d66e4be2ce 100644 --- a/pkgs/tools/networking/s6-dns/default.nix +++ b/pkgs/tools/networking/s6-dns/default.nix @@ -33,7 +33,7 @@ in stdenv.mkDerivation rec { "--with-dynlib=${skalibs.lib}/lib" ] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/s6-dns/ diff --git a/pkgs/tools/networking/s6-networking/default.nix b/pkgs/tools/networking/s6-networking/default.nix index 1971bbffa406..f7278d5c6a24 100644 --- a/pkgs/tools/networking/s6-networking/default.nix +++ b/pkgs/tools/networking/s6-networking/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { "--with-include=${lib.getDev sslLibs.${sslSupport}}/include" "--with-lib=${lib.getLib sslLibs.${sslSupport}}/lib" ]) - ++ (lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/s6-networking/ diff --git a/pkgs/tools/networking/strongswan/default.nix b/pkgs/tools/networking/strongswan/default.nix index 74405a472f8a..2f19294784ec 100644 --- a/pkgs/tools/networking/strongswan/default.nix +++ b/pkgs/tools/networking/strongswan/default.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { "--enable-af-alg" "--enable-xauth-pam" "--enable-chapoly" "--enable-curl" ] ++ optionals stdenv.isx86_64 [ "--enable-aesni" "--enable-rdrand" ] - ++ optional (stdenv.system == "i686-linux") "--enable-padlock" + ++ optional (stdenv.hostPlatform.system == "i686-linux") "--enable-padlock" ++ optionals enableTNC [ "--disable-gmp" "--disable-aes" "--disable-md5" "--disable-sha1" "--disable-sha2" "--disable-fips-prf" "--enable-eap-tnc" "--enable-eap-ttls" "--enable-eap-dynamic" "--enable-tnccs-20" diff --git a/pkgs/tools/package-management/checkinstall/default.nix b/pkgs/tools/package-management/checkinstall/default.nix index fea6ccedd34f..df1bf794062f 100644 --- a/pkgs/tools/package-management/checkinstall/default.nix +++ b/pkgs/tools/package-management/checkinstall/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation { ./set-buildroot.patch ] - ++ stdenv.lib.optional (stdenv.system == "x86_64-linux") + ++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux") # Force use of old memcpy so that installwatch works on Glibc < # 2.14. ./use-old-memcpy.patch; diff --git a/pkgs/tools/package-management/nixui/default.nix b/pkgs/tools/package-management/nixui/default.nix index 6f46b39e65b1..804bbbdf8d71 100644 --- a/pkgs/tools/package-management/nixui/default.nix +++ b/pkgs/tools/package-management/nixui/default.nix @@ -9,7 +9,7 @@ let }; nixui = (import ./nixui.nix { inherit pkgs; - inherit (stdenv) system; + inherit (stdenv.hostPlatform) system; })."nixui-git://github.com/matejc/nixui.git#0.2.1"; script = writeScript "nixui" '' #! ${stdenv.shell} diff --git a/pkgs/tools/security/afl/default.nix b/pkgs/tools/security/afl/default.nix index c61cbeb32682..3476606049d1 100644 --- a/pkgs/tools/security/afl/default.nix +++ b/pkgs/tools/security/afl/default.nix @@ -4,9 +4,9 @@ let afl-qemu = callPackage ./qemu.nix {}; - qemu-exe-name = if stdenv.system == "x86_64-linux" then "qemu-x86_64" - else if stdenv.system == "i686-linux" then "qemu-i386" - else throw "afl: no support for ${stdenv.system}!"; + qemu-exe-name = if stdenv.hostPlatform.system == "x86_64-linux" then "qemu-x86_64" + else if stdenv.hostPlatform.system == "i686-linux" then "qemu-i386" + else throw "afl: no support for ${stdenv.hostPlatform.system}!"; in stdenv.mkDerivation rec { diff --git a/pkgs/tools/security/afl/qemu.nix b/pkgs/tools/security/afl/qemu.nix index 7637dcf246af..82de6474e598 100644 --- a/pkgs/tools/security/afl/qemu.nix +++ b/pkgs/tools/security/afl/qemu.nix @@ -16,9 +16,9 @@ let aflTypesFile = writeText "afl-types.h" (builtins.readFile ./qemu-patches/afl-types.h); - cpuTarget = if stdenv.system == "x86_64-linux" then "x86_64-linux-user" - else if stdenv.system == "i686-linux" then "i386-linux-user" - else throw "afl: no support for ${stdenv.system}!"; + cpuTarget = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-user" + else if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-user" + else throw "afl: no support for ${stdenv.hostPlatform.system}!"; in stdenv.mkDerivation rec { name = "afl-${n}"; @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { vde2 texinfo libuuid flex bison lzo snappy autoconf libcap_ng gnutls ] - ++ optionals (hasSuffix "linux" stdenv.system) [ libaio ]; + ++ optionals (hasSuffix "linux" stdenv.hostPlatform.system) [ libaio ]; enableParallelBuilding = true; diff --git a/pkgs/tools/security/encryptr/default.nix b/pkgs/tools/security/encryptr/default.nix index 2cf07c63a84a..8d0c78764319 100644 --- a/pkgs/tools/security/encryptr/default.nix +++ b/pkgs/tools/security/encryptr/default.nix @@ -5,13 +5,13 @@ }: let - arch = if stdenv.system == "x86_64-linux" then "amd" - else if stdenv.system == "i686-linux" then "i386" - else throw "Encryptr for ${stdenv.system} not supported!"; + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd" + else if stdenv.hostPlatform.system == "i686-linux" then "i386" + else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!"; - sha256 = if stdenv.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2" - else if stdenv.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm" - else throw "Encryptr for ${stdenv.system} not supported!"; + sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2" + else if stdenv.hostPlatform.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm" + else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!"; in stdenv.mkDerivation rec { name = "encryptr-${version}"; diff --git a/pkgs/tools/security/enpass/default.nix b/pkgs/tools/security/enpass/default.nix index b99087e475d2..0f0c4233ca9d 100644 --- a/pkgs/tools/security/enpass/default.nix +++ b/pkgs/tools/security/enpass/default.nix @@ -1,8 +1,9 @@ -{stdenv, system, fetchurl, dpkg, openssl, xorg +{ stdenv, fetchurl, dpkg, openssl, xorg , glib, libGLU_combined, libpulseaudio, zlib, dbus, fontconfig, freetype , gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig , makeWrapper , python, pythonPackages, lib -, libredirect, lsof}: +, libredirect, lsof +}: let all_data = builtins.fromJSON (builtins.readFile ./data.json); @@ -11,7 +12,7 @@ let x86_64-linux = "amd64"; }; - data = all_data.${system_map.${system} or (throw "Unsupported platform")}; + data = all_data.${system_map.${stdenv.hostPlatform.system} or (throw "Unsupported platform")}; baseUrl = http://repo.sinew.in; diff --git a/pkgs/tools/security/pcsc-scm-scl011/default.nix b/pkgs/tools/security/pcsc-scm-scl011/default.nix index 1418a4ead580..88ca8a3d1b1a 100644 --- a/pkgs/tools/security/pcsc-scm-scl011/default.nix +++ b/pkgs/tools/security/pcsc-scm-scl011/default.nix @@ -1,9 +1,9 @@ { stdenv, fetchurl, unzip, libusb }: let - arch = if stdenv.system == "i686-linux" then "32" - else if stdenv.system == "x86_64-linux" then "64" - else throw "Unsupported system: ${stdenv.system}"; + arch = if stdenv.hostPlatform.system == "i686-linux" then "32" + else if stdenv.hostPlatform.system == "x86_64-linux" then "64" + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation rec { name = "pcsc-scm-scl-${version}"; diff --git a/pkgs/tools/security/sshuttle/default.nix b/pkgs/tools/security/sshuttle/default.nix index f7878df228f2..c701b9dba73d 100644 --- a/pkgs/tools/security/sshuttle/default.nix +++ b/pkgs/tools/security/sshuttle/default.nix @@ -12,7 +12,7 @@ python3Packages.buildPythonApplication rec { patches = [ ./sudo.patch ]; - nativeBuildInputs = [ makeWrapper python3Packages.setuptools_scm ] ++ stdenv.lib.optional (stdenv.system != "i686-linux") pandoc; + nativeBuildInputs = [ makeWrapper python3Packages.setuptools_scm ] ++ stdenv.lib.optional (stdenv.hostPlatform.system != "i686-linux") pandoc; buildInputs = [ coreutils openssh procps nettools ] ++ stdenv.lib.optionals stdenv.isLinux [ iptables ]; diff --git a/pkgs/tools/system/s6-rc/default.nix b/pkgs/tools/system/s6-rc/default.nix index f6eed5671cea..40c999d80f13 100644 --- a/pkgs/tools/system/s6-rc/default.nix +++ b/pkgs/tools/system/s6-rc/default.nix @@ -39,7 +39,7 @@ in stdenv.mkDerivation rec { "--with-dynlib=${s6.out}/lib" ] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/s6-rc/ diff --git a/pkgs/tools/system/s6/default.nix b/pkgs/tools/system/s6/default.nix index 035d4280494c..d7ade3cdb290 100644 --- a/pkgs/tools/system/s6/default.nix +++ b/pkgs/tools/system/s6/default.nix @@ -40,7 +40,7 @@ in stdenv.mkDerivation rec { "--with-dynlib=${execline.lib}/lib" ] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/s6/ diff --git a/pkgs/tools/system/storebrowse/default.nix b/pkgs/tools/system/storebrowse/default.nix index e56919acc5d5..e3b58a50c925 100644 --- a/pkgs/tools/system/storebrowse/default.nix +++ b/pkgs/tools/system/storebrowse/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { mkdir $TMPDIR/go export GOPATH=$TMPDIR/go - ${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"} + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"} GOSQLITE=$GOPATH/src/code.google.com/p/gosqlite mkdir -p $GOSQLITE diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index c0c06813dc94..15d54f4a2a4d 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl # TODO: links -lsigsegv but loses the reference for some reason -, withSigsegv ? (false && stdenv.system != "x86_64-cygwin"), libsigsegv +, withSigsegv ? (false && stdenv.hostPlatform.system != "x86_64-cygwin"), libsigsegv , interactive ? false, readline /* Test suite broke on: diff --git a/pkgs/tools/text/xidel/default.nix b/pkgs/tools/text/xidel/default.nix index e1a0a5abf965..66dfa1c6b348 100644 --- a/pkgs/tools/text/xidel/default.nix +++ b/pkgs/tools/text/xidel/default.nix @@ -11,17 +11,17 @@ stdenv.mkDerivation rec { #}; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_amd64.deb"; sha256 = "0hskc74y7p4j1x33yx0w4fvr610p2yimas8pxhr6bs7mb9b300h7"; } - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_i386.deb"; sha256 = "07yk5sk1p4jm0jmgjwdm2wq8d2wybi1wkn1qq5j5y03z1pdc3fi6"; } - else throw "xidel is not supported on ${stdenv.system}"; + else throw "xidel is not supported on ${stdenv.hostPlatform.system}"; buildInputs = [ dpkg ]; diff --git a/pkgs/tools/typesetting/kindlegen/default.nix b/pkgs/tools/typesetting/kindlegen/default.nix index 4e9a40239bfe..fc43ed0abe27 100644 --- a/pkgs/tools/typesetting/kindlegen/default.nix +++ b/pkgs/tools/typesetting/kindlegen/default.nix @@ -11,7 +11,7 @@ let "i686-darwin" = "0zniyn0s41fxqrajbgwxbcsj5vzf9m7a6yvdz2b11mphr00kpbbs"; "x86_64-cygwin" = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h"; "i686-cygwin" = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h"; - }."${stdenv.system}" or (throw "system #{stdenv.system.} is not supported"); + }."${stdenv.hostPlatform.system}" or (throw "system #{stdenv.hostPlatform.system.} is not supported"); url = { "x86_64-linux" = "http://kindlegen.s3.amazonaws.com/kindlegen_linux_2.6_i386_v${fileVersion}.tar.gz"; @@ -20,7 +20,7 @@ let "i686-darwin" = "http://kindlegen.s3.amazonaws.com/KindleGen_Mac_i386_v${fileVersion}.zip"; "x86_64-cygwin" = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip"; "i686-cygwin" = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip"; - }."${stdenv.system}" or (throw "system #{stdenv.system.} is not supported"); + }."${stdenv.hostPlatform.system}" or (throw "system #{stdenv.hostPlatform.system.} is not supported"); in stdenv.mkDerivation rec { name = "kindlegen-${version}"; |