Browse Source

reewide: Purge all uses `stdenv.system` and top-level `system`

It is deprecated and will be removed after 18.09.
nixos-19.03
John Ericson 4 years ago
parent
commit
2c2f1e37d4
  1. 2
      doc/old/cross.txt
  2. 2
      nixos/lib/make-system-tarball.nix
  3. 4
      nixos/lib/qemu-flags.nix
  4. 2
      nixos/modules/installer/cd-dvd/installation-cd-base.nix
  5. 3
      nixos/modules/installer/cd-dvd/sd-image-aarch64.nix
  6. 3
      nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
  7. 3
      nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
  8. 4
      nixos/modules/installer/cd-dvd/sd-image.nix
  9. 2
      nixos/modules/installer/netboot/netboot.nix
  10. 2
      nixos/modules/services/misc/gitit.nix
  11. 2
      nixos/modules/services/networking/vsftpd.nix
  12. 2
      nixos/modules/system/boot/luksroot.nix
  13. 2
      nixos/modules/virtualisation/azure-agent.nix
  14. 2
      nixos/modules/virtualisation/brightbox-image.nix
  15. 2
      nixos/modules/virtualisation/google-compute-image.nix
  16. 2
      nixos/modules/virtualisation/virtualbox-guest.nix
  17. 10
      nixos/modules/virtualisation/virtualbox-image.nix
  18. 2
      nixos/modules/virtualisation/vmware-guest.nix
  19. 2
      nixos/modules/virtualisation/xen-dom0.nix
  20. 4
      pkgs/applications/altcoins/mist.nix
  21. 6
      pkgs/applications/audio/baudline/default.nix
  22. 2
      pkgs/applications/audio/google-musicmanager/default.nix
  23. 4
      pkgs/applications/audio/renoise/default.nix
  24. 4
      pkgs/applications/audio/transcribe/default.nix
  25. 2
      pkgs/applications/editors/eclipse/build-eclipse.nix
  26. 14
      pkgs/applications/editors/eclipse/default.nix
  27. 2
      pkgs/applications/editors/jetbrains/common.nix
  28. 14
      pkgs/applications/editors/kodestudio/default.nix
  29. 4
      pkgs/applications/editors/music/tuxguitar/default.nix
  30. 2
      pkgs/applications/editors/sublime/2/default.nix
  31. 4
      pkgs/applications/editors/sublime/3/common.nix
  32. 2
      pkgs/applications/editors/typora/default.nix
  33. 12
      pkgs/applications/editors/vscode/default.nix
  34. 8
      pkgs/applications/graphics/ImageMagick/7.0.nix
  35. 8
      pkgs/applications/graphics/ImageMagick/default.nix
  36. 4
      pkgs/applications/graphics/gcolor2/default.nix
  37. 6
      pkgs/applications/graphics/sane/backends/brscan4/default.nix
  38. 6
      pkgs/applications/graphics/unigine-valley/default.nix
  39. 6
      pkgs/applications/misc/1password/default.nix
  40. 2
      pkgs/applications/misc/adobe-reader/default.nix
  41. 6
      pkgs/applications/misc/cura/lulzbot.nix
  42. 6
      pkgs/applications/misc/googleearth/default.nix
  43. 4
      pkgs/applications/misc/icesl/default.nix
  44. 2
      pkgs/applications/misc/kdbplus/default.nix
  45. 2
      pkgs/applications/misc/kiwix/default.nix
  46. 8
      pkgs/applications/misc/playonlinux/default.nix
  47. 2
      pkgs/applications/misc/rescuetime/default.nix
  48. 2
      pkgs/applications/misc/sweethome3d/default.nix
  49. 2
      pkgs/applications/misc/sweethome3d/editors.nix
  50. 6
      pkgs/applications/misc/xmind/default.nix
  51. 6
      pkgs/applications/networking/apache-directory-studio/default.nix
  52. 6
      pkgs/applications/networking/bittorrentsync/generic.nix
  53. 2
      pkgs/applications/networking/browsers/firefox-bin/default.nix
  54. 8
      pkgs/applications/networking/browsers/firefox/wrapper.nix
  55. 6
      pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix
  56. 4
      pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix
  57. 2
      pkgs/applications/networking/browsers/mozilla-plugins/trezor/default.nix
  58. 2
      pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
  59. 4
      pkgs/applications/networking/dropbox/default.nix
  60. 2
      pkgs/applications/networking/instant-messengers/franz/default.nix
  61. 6
      pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix
  62. 2
      pkgs/applications/networking/instant-messengers/rambox/sencha/bare.nix
  63. 4
      pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix
  64. 4
      pkgs/applications/networking/instant-messengers/slack/default.nix
  65. 4
      pkgs/applications/networking/instant-messengers/wire-desktop/default.nix
  66. 4
      pkgs/applications/networking/instant-messengers/zoom-us/default.nix
  67. 4
      pkgs/applications/networking/insync/default.nix
  68. 4
      pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix
  69. 2
      pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
  70. 2
      pkgs/applications/networking/p2p/frostwire/default.nix
  71. 2
      pkgs/applications/networking/p2p/soulseekqt/default.nix
  72. 4
      pkgs/applications/networking/remote/anydesk/default.nix
  73. 4
      pkgs/applications/networking/resilio-sync/default.nix
  74. 18
      pkgs/applications/networking/spideroak/default.nix
  75. 4
      pkgs/applications/networking/super-productivity/default.nix
  76. 8
      pkgs/applications/office/jameica/default.nix
  77. 4
      pkgs/applications/office/mendeley/default.nix
  78. 4
      pkgs/applications/office/moneyplex/default.nix
  79. 2
      pkgs/applications/office/wpsoffice/default.nix
  80. 6
      pkgs/applications/science/electronics/eagle/eagle7.nix
  81. 2
      pkgs/applications/science/logic/isabelle/default.nix
  82. 2
      pkgs/applications/science/logic/saw-tools/default.nix
  83. 4
      pkgs/applications/science/math/mathematica/10.nix
  84. 4
      pkgs/applications/science/math/mathematica/9.nix
  85. 2
      pkgs/applications/science/math/mathematica/default.nix
  86. 8
      pkgs/applications/science/math/scilab-bin/default.nix
  87. 2
      pkgs/applications/search/recoll/default.nix
  88. 4
      pkgs/applications/video/lightworks/default.nix
  89. 6
      pkgs/applications/video/mplayer/default.nix
  90. 4
      pkgs/applications/video/webtorrent_desktop/default.nix
  91. 2
      pkgs/applications/virtualization/qemu/default.nix
  92. 16
      pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
  93. 4
      pkgs/applications/window-managers/i3/default.nix
  94. 4
      pkgs/build-support/build-fhs-userenv/env.nix
  95. 2
      pkgs/build-support/release/nix-build.nix
  96. 2
      pkgs/build-support/vm/windows/controller/default.nix
  97. 2
      pkgs/build-support/vm/windows/cygwin-iso/default.nix
  98. 18
      pkgs/development/arduino/arduino-core/default.nix
  99. 2
      pkgs/development/compilers/ccl/default.nix
  100. 4
      pkgs/development/compilers/clean/default.nix
  101. Some files were not shown because too many files have changed in this diff Show More

2
doc/old/cross.txt

@ -78,7 +78,7 @@ Step 2: build kernel headers for the target architecture
---
{stdenv, fetchurl}:
assert stdenv.system == "i686-linux";
assert stdenv.buildPlatform.system == "i686-linux";
stdenv.mkDerivation {
name = "linux-headers-2.6.13.1-arm";

2
nixos/lib/make-system-tarball.nix

@ -1,7 +1,7 @@
{ stdenv, perl, pixz, pathsFromGraph
, # The file name of the resulting tarball
fileName ? "nixos-system-${stdenv.system}"
fileName ? "nixos-system-${stdenv.hostPlatform.system}"
, # The files and directories to be placed in the tarball.
# This is a list of attribute sets {source, target} where `source'

4
nixos/lib/qemu-flags.nix

@ -14,12 +14,12 @@ in
qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0"
else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0"
else throw "Unknown QEMU serial device for system '${pkgs.stdenv.system}'";
else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'";
qemuBinary = qemuPkg: {
"x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
"armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host";
"aarch64-linux" = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host";
"x86_64-darwin" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
}.${pkgs.stdenv.system} or "${qemuPkg}/bin/qemu-kvm";
}.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm";
}

2
nixos/modules/installer/cd-dvd/installation-cd-base.nix

@ -16,7 +16,7 @@ with lib;
];
# ISO naming.
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.iso";
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
isoImage.volumeID = substring 0 11 "NIXOS_ISO";

3
nixos/modules/installer/cd-dvd/sd-image-aarch64.nix

@ -16,7 +16,8 @@ in
];
assertions = lib.singleton {
assertion = pkgs.stdenv.system == "aarch64-linux";
assertion = pkgs.stdenv.hostPlatform.system == "aarch64-linux"
&& pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system;
message = "sd-image-aarch64.nix can be only built natively on Aarch64 / ARM64; " +
"it cannot be cross compiled";
};

3
nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix

@ -16,7 +16,8 @@ in
];
assertions = lib.singleton {
assertion = pkgs.stdenv.system == "armv7l-linux";
assertion = pkgs.stdenv.hostPlatform.system == "armv7l-linux"
&& pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system;
message = "sd-image-armv7l-multiplatform.nix can be only built natively on ARMv7; " +
"it cannot be cross compiled";
};

3
nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix

@ -16,7 +16,8 @@ in
];
assertions = lib.singleton {
assertion = pkgs.stdenv.system == "armv6l-linux";
assertion = pkgs.stdenv.hostPlatform.system == "armv6l-linux"
&& pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system;
message = "sd-image-raspberrypi.nix can be only built natively on ARMv6; " +
"it cannot be cross compiled";
};

4
nixos/modules/installer/cd-dvd/sd-image.nix

@ -22,7 +22,7 @@ in
{
options.sdImage = {
imageName = mkOption {
default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.img";
default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.img";
description = ''
Name of the generated image file.
'';
@ -102,7 +102,7 @@ in
mkdir -p $out/nix-support $out/sd-image
export img=$out/sd-image/${config.sdImage.imageName}
echo "${pkgs.stdenv.system}" > $out/nix-support/system
echo "${pkgs.stdenv.buildPlatform.system}" > $out/nix-support/system
echo "file sd-image $img" >> $out/nix-support/hydra-build-products
# Create the image file sized to fit /boot and /, plus 20M of slack

2
nixos/modules/installer/netboot/netboot.nix

@ -25,7 +25,7 @@ with lib;
# !!! Hack - attributes expected by other modules.
environment.systemPackages = [ pkgs.grub2_efi ]
++ (if pkgs.stdenv.system == "aarch64-linux"
++ (if pkgs.stdenv.hostPlatform.system == "aarch64-linux"
then []
else [ pkgs.grub2 pkgs.syslinux ]);

2
nixos/modules/services/misc/gitit.nix

@ -10,7 +10,7 @@ let
toYesNo = b: if b then "yes" else "no";
gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version;
gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.hostPlatform.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version;
gititWithPkgs = hsPkgs: extras: hsPkgs.ghcWithPackages (self: with self; [ gitit ] ++ (extras self));

2
nixos/modules/services/networking/vsftpd.nix

@ -99,7 +99,7 @@ let
nopriv_user=vsftpd
secure_chroot_dir=/var/empty
syslog_enable=YES
${optionalString (pkgs.stdenv.system == "x86_64-linux") ''
${optionalString (pkgs.stdenv.hostPlatform.system == "x86_64-linux") ''
seccomp_sandbox=NO
''}
anon_umask=${cfg.anonymousUmask}

2
nixos/modules/system/boot/luksroot.nix

@ -324,7 +324,7 @@ in
[ "aes" "aes_generic" "blowfish" "twofish"
"serpent" "cbc" "xts" "lrw" "sha1" "sha256" "sha512"
(if pkgs.stdenv.system == "x86_64-linux" then "aes_x86_64" else "aes_i586")
(if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "aes_x86_64" else "aes_i586")
];
description = ''
A list of cryptographic kernel modules needed to decrypt the root device(s).

2
nixos/modules/virtualisation/azure-agent.nix

@ -77,7 +77,7 @@ in
config = mkIf cfg.enable {
assertions = [ {
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
message = "Azure not currently supported on ${pkgs.stdenv.system}";
message = "Azure not currently supported on ${pkgs.stdenv.hostPlatform.system}";
} {
assertion = config.networking.networkmanager.enable == false;
message = "Windows Azure Linux Agent is not compatible with NetworkManager";

2
nixos/modules/virtualisation/brightbox-image.nix

@ -26,7 +26,7 @@ in
rm $diskImageBase
popd
'';
diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.system}.raw";
diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw";
buildInputs = [ pkgs.utillinux pkgs.perl ];
exportReferencesGraph =
[ "closure" config.system.build.toplevel ];

2
nixos/modules/virtualisation/google-compute-image.nix

@ -14,7 +14,7 @@ in
PATH=$PATH:${pkgs.stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]}
pushd $out
mv $diskImage disk.raw
tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.system}.raw.tar.gz disk.raw
tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw.tar.gz disk.raw
rm $out/disk.raw
popd
'';

2
nixos/modules/virtualisation/virtualbox-guest.nix

@ -34,7 +34,7 @@ in
config = mkIf cfg.enable (mkMerge [{
assertions = [{
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
message = "Virtualbox not currently supported on ${pkgs.stdenv.system}";
message = "Virtualbox not currently supported on ${pkgs.stdenv.hostPlatform.system}";
}];
environment.systemPackages = [ kernel.virtualboxGuestAdditions ];

10
nixos/modules/virtualisation/virtualbox-image.nix

@ -26,21 +26,21 @@ in {
};
vmDerivationName = mkOption {
type = types.str;
default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.system}";
default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
description = ''
The name of the derivation for the VirtualBox appliance.
'';
};
vmName = mkOption {
type = types.str;
default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.system})";
default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.hostPlatform.system})";
description = ''
The name of the VirtualBox appliance.
'';
};
vmFileName = mkOption {
type = types.str;
default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.system}.ova";
default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.ova";
description = ''
The file name of the VirtualBox appliance.
'';
@ -67,10 +67,10 @@ in {
echo "creating VirtualBox VM..."
vmName="${cfg.vmName}";
VBoxManage createvm --name "$vmName" --register \
--ostype ${if pkgs.stdenv.system == "x86_64-linux" then "Linux26_64" else "Linux26"}
--ostype ${if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "Linux26_64" else "Linux26"}
VBoxManage modifyvm "$vmName" \
--memory ${toString cfg.memorySize} --acpi on --vram 32 \
${optionalString (pkgs.stdenv.system == "i686-linux") "--pae on"} \
${optionalString (pkgs.stdenv.hostPlatform.system == "i686-linux") "--pae on"} \
--nictype1 virtio --nic1 nat \
--audiocontroller ac97 --audio alsa \
--rtcuseutc on \

2
nixos/modules/virtualisation/vmware-guest.nix

@ -22,7 +22,7 @@ in
config = mkIf cfg.enable {
assertions = [ {
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
message = "VMWare guest is not currently supported on ${pkgs.stdenv.system}";
message = "VMWare guest is not currently supported on ${pkgs.stdenv.hostPlatform.system}";
} ];
environment.systemPackages = [ open-vm-tools ];

2
nixos/modules/virtualisation/xen-dom0.nix

@ -146,7 +146,7 @@ in
config = mkIf cfg.enable {
assertions = [ {
assertion = pkgs.stdenv.isx86_64;
message = "Xen currently not supported on ${pkgs.stdenv.system}";
message = "Xen currently not supported on ${pkgs.stdenv.hostPlatform.system}";
} {
assertion = config.boot.loader.grub.enable && (config.boot.loader.grub.efiSupport == false);
message = "Xen currently does not support EFI boot";

4
pkgs/applications/altcoins/mist.nix

@ -4,7 +4,7 @@ let
version = "0.11.1";
name = "mist";
throwSystem = throw "Unsupported system: ${stdenv.system}";
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
meta = with stdenv.lib; {
description = "Browse and use Ðapps on the Ethereum network";
@ -37,7 +37,7 @@ let
url = "https://github.com/ethereum/mist/releases/download/v${version}/Mist-linux64-${urlVersion}.zip";
sha256 = "0yx4x72l8gk68yh9saki48zgqx8k92xnkm79dc651wdpd5c25cz3";
};
}.${stdenv.system} or throwSystem;
}.${stdenv.hostPlatform.system} or throwSystem;
buildInputs = [ unzip makeWrapper ];

6
pkgs/applications/audio/baudline/default.nix

@ -11,18 +11,18 @@ stdenv.mkDerivation rec {
version = "1.08";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "http://www.baudline.com/baudline_${version}_linux_x86_64.tar.gz";
sha256 = "09fn0046i69in1jpizkzbaq5ggij0mpflcsparyskm3wh71mbzvr";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "http://www.baudline.com/baudline_${version}_linux_i686.tar.gz";
sha256 = "1waip5pmcf5ffcfvn8lf1rvsaq2ab66imrbfqs777scz7k8fhhjb";
}
else
throw "baudline isn't supported (yet?) on ${stdenv.system}";
throw "baudline isn't supported (yet?) on ${stdenv.hostPlatform.system}";
buildInputs = [ makeWrapper ];

2
pkgs/applications/audio/google-musicmanager/default.nix

@ -1,6 +1,6 @@
{ stdenv, fetchurl
, flac, expat, libidn, qtbase, qtwebkit, libvorbis }:
assert stdenv.system == "x86_64-linux";
assert stdenv.hostPlatform.system == "x86_64-linux";
stdenv.mkDerivation rec {
version = "beta_1.0.467.4929-r0"; # friendly to nix-env version sorting algo

4
pkgs/applications/audio/renoise/default.nix

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
version = "3.1.0";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
if builtins.isNull releasePath then
fetchurl {
url = "https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86_64.tar.bz2";
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
}
else
releasePath
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
if builtins.isNull releasePath then
fetchurl {
url = "http://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86.tar.bz2";

4
pkgs/applications/audio/transcribe/default.nix

@ -7,12 +7,12 @@ stdenv.mkDerivation rec {
name = "transcribe-${version}";
version = "8.40";
src = if stdenv.system == "i686-linux" then
src = if stdenv.hostPlatform.system == "i686-linux" then
fetchzip {
url = "https://www.seventhstring.com/xscribe/downlinux32_old/xscsetup.tar.gz";
sha256 = "1ngidmj9zz8bmv754s5xfsjv7v6xr03vck4kigzq4bpc9b1fdhjq";
}
else if stdenv.system == "x86_64-linux" then
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchzip {
url = "https://www.seventhstring.com/xscribe/downlinux64_old/xsc64setup.tar.gz";
sha256 = "0svzi8svj6zn06gj0hr8mpnhq4416dvb4g5al0gpb1g3paywdaf9";

2
pkgs/applications/editors/eclipse/build-eclipse.nix

@ -2,7 +2,7 @@
, zlib, jdk, glib, gtk3, libXtst, gsettings-desktop-schemas, webkitgtk
, makeWrapper, ... }:
{ name, src ? builtins.getAttr stdenv.system sources, sources ? null, description }:
{ name, src ? builtins.getAttr stdenv.hostPlatform.system sources, sources ? null, description }:
stdenv.mkDerivation rec {
inherit name src;

14
pkgs/applications/editors/eclipse/default.nix

@ -27,24 +27,24 @@ rec {
name = "eclipse-cpp-4.7.0";
description = "Eclipse IDE for C/C++ Developers, Oxygen release";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-cpp-oxygen-R-linux-gtk-x86_64.tar.gz;
sha512 = "813c791e739d7d0e2ab242a5bacadca135bbeee20ef97aa830353cd90f63fa6e9c89cfcc6aadf635c742befe035bd6e3f15103013f63c419f6144e86ebde3ed1";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-cpp-oxygen-R-linux-gtk.tar.gz;
sha512 = "2b50f4a00306a89cda1aaaa606e62285cacbf93464a9dd3f3319dca3e2c578b802e685de6f78e5e617d269e21271188effe73d41f491a6de946e28795d82db8a";
}
else throw "Unsupported system: ${stdenv.system}";
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
};
eclipse-cpp-37 = buildEclipse {
name = "eclipse-cpp-3.7";
description = "Eclipse IDE for C/C++ Developers";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/indigo/R/eclipse-cpp-indigo-incubation-linux-gtk-x86_64.tar.gz;
sha256 = "14ppc9g9igzvj1pq7jl01vwhzb66nmzbl9wsdl1sf3xnwa9wnqk3";
@ -65,7 +65,7 @@ rec {
name = "eclipse-modeling-4.7";
description = "Eclipse Modeling Tools";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-modeling-oxygen-R-linux-gtk-x86_64.tar.gz;
sha512 = "3b9a7ad4b5d6b77fbdd64e8d323e0adb6c2904763ad042b374b4d87cef8607408cb407e395870fc755d58c0c800e20818adcf456ebe193d76cede16c5fe12271";
@ -81,7 +81,7 @@ rec {
name = "eclipse-modeling-3.6.2";
description = "Eclipse Modeling Tools (includes Incubating components)";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/helios/SR2/eclipse-modeling-helios-SR2-incubation-linux-gtk-x86_64.tar.gz;
sha1 = "e96f5f006298f68476f4a15a2be8589158d5cc61";
@ -151,7 +151,7 @@ rec {
name = "eclipse-scala-sdk-4.4.1";
description = "Eclipse IDE for Scala Developers";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { # tested
url = https://downloads.typesafe.com/scalaide-pack/4.4.1-vfinal-luna-211-20160504/scala-SDK-4.4.1-vfinal-2.11-linux.gtk.x86_64.tar.gz;
sha256 = "4c2d1ac68384e12a11a851cf0fc7757aea087eba69329b21d539382a65340d27";

2
pkgs/applications/editors/jetbrains/common.nix

@ -42,7 +42,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
}
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
if [ "${stdenv.system}" == "x86_64-linux" ]; then
if [ "${stdenv.hostPlatform.system}" == "x86_64-linux" ]; then
target_size=$(get_file_size bin/fsnotifier64)
patchelf --set-interpreter "$interpreter" bin/fsnotifier64
munge_size_hack bin/fsnotifier64 $target_size

14
pkgs/applications/editors/kodestudio/default.nix

@ -8,15 +8,15 @@ let
version = "17.1";
sha256 = if stdenv.system == "x86_64-linux" then "1kddisnvlk48jip6k59mw3wlkrl7rkck2lxpaghn0gfx02cvms5f"
else if stdenv.system == "i686-cygwin" then "1izp42afrlh4yd322ax9w85ki388gnkqfqbw8dwnn4k3j7r5487z"
else throw "Unsupported system: ${stdenv.system}";
sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1kddisnvlk48jip6k59mw3wlkrl7rkck2lxpaghn0gfx02cvms5f"
else if stdenv.hostPlatform.system == "i686-cygwin" then "1izp42afrlh4yd322ax9w85ki388gnkqfqbw8dwnn4k3j7r5487z"
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
urlBase = "https://github.com/Kode/KodeStudio/releases/download/v${version}/KodeStudio-";
urlStr = if stdenv.system == "x86_64-linux" then urlBase + "linux64.tar.gz"
else if stdenv.system == "i686-cygwin" then urlBase + "win32.zip"
else throw "Unsupported system: ${stdenv.system}";
urlStr = if stdenv.hostPlatform.system == "x86_64-linux" then urlBase + "linux64.tar.gz"
else if stdenv.hostPlatform.system == "i686-cygwin" then urlBase + "win32.zip"
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
in
@ -47,7 +47,7 @@ in
cp -r ./* $out
'';
postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") ''
postFixup = lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") ''
# Patch Binaries
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \

4
pkgs/applications/editors/music/tuxguitar/default.nix

@ -1,7 +1,7 @@
{ stdenv, fetchurl, swt, jdk, makeWrapper, alsaLib }:
let metadata = assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
if stdenv.system == "i686-linux" then
let metadata = assert stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux";
if stdenv.hostPlatform.system == "i686-linux" then
{ arch = "x86"; sha256 = "1qmb51k0538pn7gv4nsvhfv33xik4l4af0qmpllkzrikmj8wvzlb"; }
else
{ arch = "x86_64"; sha256 = "12af47jhlrh9aq5b3d13l7cdhlndgnfpy61gz002hajbq7i00ixh"; };

2
pkgs/applications/editors/sublime/2/default.nix

@ -6,7 +6,7 @@ in
stdenv.mkDerivation rec {
name = "sublimetext-2.0.2";
src =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
name = "sublimetext-2.0.2.tar.bz2";
url = http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.tar.bz2;

4
pkgs/applications/editors/sublime/3/common.nix

@ -13,13 +13,13 @@ let
++ stdenv.lib.optional gksuSupport "/usr/bin/gksudo=${gksu}/bin/gksudo";
in let
archSha256 =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
x32sha256
else
x64sha256;
arch =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
"x32"
else
"x64";

2
pkgs/applications/editors/typora/default.nix

@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
version = "0.9.53";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
sha256 = "02k6x30l4mbjragqbq5rn663xbw3h4bxzgppfxqf5lwydswldklb";

12
pkgs/applications/editors/vscode/default.nix

@ -9,15 +9,15 @@ let
"i686-linux" = "linux-ia32";
"x86_64-linux" = "linux-x64";
"x86_64-darwin" = "darwin";
}.${stdenv.system};
}.${stdenv.hostPlatform.system};
sha256 = {
"i686-linux" = "1g7kqbz6mrf8ngx2bnwpi9fifq5rjznxgsgwjb532z3nh92ypa8n";
"x86_64-linux" = "02yldycakn5zxj1ji4nmhdyazqlkjqpzdj3g8j501c3j28pgiwjy";
"x86_64-darwin" = "0pnsfkh20mj7pzqw7wlfd98jqc6a1mnsq1iira15n7fafqgj8zpl";
}.${stdenv.system};
}.${stdenv.hostPlatform.system};
archive_fmt = if stdenv.system == "x86_64-darwin" then "zip" else "tar.gz";
archive_fmt = if stdenv.hostPlatform.system == "x86_64-darwin" then "zip" else "tar.gz";
rpath = lib.concatStringsSep ":" [
atomEnv.libPath
@ -48,12 +48,12 @@ in
categories = "GNOME;GTK;Utility;TextEditor;Development;";
};
buildInputs = if stdenv.system == "x86_64-darwin"
buildInputs = if stdenv.hostPlatform.system == "x86_64-darwin"
then [ unzip libXScrnSaver libsecret ]
else [ wrapGAppsHook libXScrnSaver libxkbfile libsecret ];
installPhase =
if stdenv.system == "x86_64-darwin" then ''
if stdenv.hostPlatform.system == "x86_64-darwin" then ''
mkdir -p $out/lib/vscode $out/bin
cp -r ./* $out/lib/vscode
ln -s $out/lib/vscode/Contents/Resources/app/bin/code $out/bin
@ -72,7 +72,7 @@ in
cp $out/lib/vscode/resources/app/resources/linux/code.png $out/share/pixmaps/code.png
'';
postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") ''
postFixup = lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${rpath}" \

8
pkgs/applications/graphics/ImageMagick/7.0.nix

@ -7,10 +7,10 @@
let
arch =
if stdenv.system == "i686-linux" then "i686"
else if stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin" then "x86-64"
else if stdenv.system == "armv7l-linux" then "armv7l"
else if stdenv.system == "aarch64-linux" then "aarch64"
if stdenv.hostPlatform.system == "i686-linux" then "i686"
else if stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin" then "x86-64"
else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l"
else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64"
else throw "ImageMagick is not supported on this platform.";
cfg = {

8
pkgs/applications/graphics/ImageMagick/default.nix

@ -7,10 +7,10 @@
let
arch =
if stdenv.system == "i686-linux" then "i686"
else if stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin" then "x86-64"
else if stdenv.system == "armv7l-linux" then "armv7l"
else if stdenv.system == "aarch64-linux" then "aarch64"
if stdenv.hostPlatform.system == "i686-linux" then "i686"
else if stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin" then "x86-64"
else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l"
else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64"
else throw "ImageMagick is not supported on this platform.";
cfg = {

4
pkgs/applications/graphics/gcolor2/default.nix

@ -3,7 +3,7 @@
let version = "0.4"; in
stdenv.mkDerivation {
name = "gcolor2-${version}";
arch = if stdenv.system == "x86_64-linux" then "amd64" else "386";
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" else "386";
src = fetchurl {
url = "mirror://sourceforge/project/gcolor2/gcolor2/${version}/gcolor2-${version}.tar.bz2";
@ -16,7 +16,7 @@ stdenv.mkDerivation {
'';
# from https://github.com/PhantomX/slackbuilds/tree/master/gcolor2/patches
patches = if stdenv.system == "x86_64-linux" then
patches = if stdenv.hostPlatform.system == "x86_64-linux" then
[ ./gcolor2-amd64.patch ] else
[ ];

6
pkgs/applications/graphics/sane/backends/brscan4/default.nix

@ -12,17 +12,17 @@ let
in stdenv.mkDerivation rec {
name = "brscan4-0.4.4-4";
src =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "http://download.brother.com/welcome/dlf006646/${name}.i386.deb";
sha256 = "13mhjbzf9nvpdzrc2s98684r7likg76zxs1wlz2h8w59fsqgx4k2";
}
else if stdenv.system == "x86_64-linux" then
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://download.brother.com/welcome/dlf006645/${name}.amd64.deb";
sha256 = "0xy5px96y1saq9l80vwvfn6anr2q42qlxdhm6ci2a0diwib5q9fd";
}
else throw "${name} is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)";
else throw "${name} is not supported on ${stdenv.hostPlatform.system} (only i686-linux and x86_64 linux are supported)";
unpackPhase = ''
ar x $src

6
pkgs/applications/graphics/unigine-valley/default.nix

@ -17,12 +17,12 @@
let
version = "1.0";
arch = if stdenv.system == "x86_64-linux" then
arch = if stdenv.hostPlatform.system == "x86_64-linux" then
"x64"
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
"x86"
else
throw "Unsupported platform ${stdenv.system}";
throw "Unsupported platform ${stdenv.hostPlatform.system}";
in
stdenv.mkDerivation rec {

6
pkgs/applications/misc/1password/default.nix

@ -4,19 +4,19 @@ stdenv.mkDerivation rec {
name = "1password-${version}";
version = "0.5.3";
src =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
fetchzip {
url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_386_v${version}.zip";
sha256 = "05s223h1yps4k9kmignl0r5sbh6w7m1hnlmafnf1kiwv7gacvxjc";
stripRoot = false;
}
else if stdenv.system == "x86_64-linux" then
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchzip {
url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_amd64_v${version}.zip";
sha256 = "0p9x1fx0309v8dxxaf88m8x8q15zzqywfmjn6v5wb9v3scp9396v";
stripRoot = false;
}
else if stdenv.system == "x86_64-darwin" then
else if stdenv.hostPlatform.system == "x86_64-darwin" then
fetchzip {
url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_darwin_amd64_v${version}.zip";
sha256 = "1z2xp9bn93gr4ha6zx65va1fb58a2xlnnmpv583y96gq3vbnqdcj";

2
pkgs/applications/misc/adobe-reader/default.nix

@ -1,7 +1,7 @@
{ stdenv, fetchurl, libX11, cups, zlib, libxml2, pango, atk, gtk2, glib
, gdk_pixbuf }:
assert stdenv.system == "i686-linux";
assert stdenv.hostPlatform.system == "i686-linux";
let version = "9.5.5"; in

6
pkgs/applications/misc/cura/lulzbot.nix

@ -8,17 +8,17 @@ stdenv.mkDerivation rec {
version = "15.02.1-1.03-5064";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-amd64/cura_${version}_amd64.deb";
sha256 = "1gsfidg3gim5pjbl82vkh0cw4ya253m4p7nirm8nr6yjrsirkzxg";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "http://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-i386/cura_${version}_i386.deb";
sha256 = "0xd3df6bxq4rijgvsqvps454jkc1nzhxbdzzj6j2w317ppsbhyc1";
}
else throw "${name} is not supported on ${stdenv.system}";
else throw "${name} is not supported on ${stdenv.hostPlatform.system}";
python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ];
pythonPath = python_deps;

6
pkgs/applications/misc/googleearth/default.nix

@ -4,9 +4,9 @@
let
arch =
if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.system == "i686-linux" then "i386"
else throw "Unsupported system ${stdenv.system}";
if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if stdenv.hostPlatform.system == "i686-linux" then "i386"
else throw "Unsupported system ${stdenv.hostPlatform.system}";
sha256 =
if arch == "amd64"
then "0dwnppn5snl5bwkdrgj4cyylnhngi0g66fn2k41j3dvis83x24k6"

4
pkgs/applications/misc/icesl/default.nix

@ -6,10 +6,10 @@ stdenv.mkDerivation rec {
name = "iceSL-${version}";
version = "2.1.10";
src = if stdenv.system == "x86_64-linux" then fetchzip {
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip {
url = "https://gforge.inria.fr/frs/download.php/file/37268/icesl${version}-amd64.zip";
sha256 = "0dv3mq6wy46xk9blzzmgbdxpsjdaxid3zadfrysxlhmgl7zb2cn2";
} else if stdenv.system == "i686-linux" then fetchzip {
} else if stdenv.hostPlatform.system == "i686-linux" then fetchzip {
url = "https://gforge.inria.fr/frs/download.php/file/37267/icesl${version}-i386.zip";
sha256 = "0sl54fsb2gz6dy0bwdscpdq1ab6ph5b7zald3bwzgkqsvna7p1jr";
} else throw "Unsupported architecture";

2
pkgs/applications/misc/kdbplus/default.nix

@ -1,6 +1,6 @@
{ stdenv, requireFile, unzip, rlwrap, bash }:
assert (stdenv.system == "i686-linux");
assert (stdenv.hostPlatform.system == "i686-linux");
let
libPath = stdenv.lib.makeLibraryPath

2
pkgs/applications/misc/kiwix/default.nix

@ -25,7 +25,7 @@ let
sha256 = "1h9vcbvf8wgds6i2z20y7krpys0mqsqhv1ijyfljanp6vyll9fvi";
};
xulrunner = if stdenv.system == "x86_64-linux"
xulrunner = if stdenv.hostPlatform.system == "x86_64-linux"
then { tar = xulrunner64_tar; sdk = xulrunnersdk64_tar; }
else { tar = xulrunner32_tar; sdk = xulrunnersdk32_tar; };

8
pkgs/applications/misc/playonlinux/default.nix

@ -44,9 +44,9 @@ let
];
ld32 =
if stdenv.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32"
else if stdenv.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker"
else throw "Unsupported platform for PlayOnLinux: ${stdenv.system}";
if stdenv.hostPlatform.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32"
else if stdenv.hostPlatform.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker"
else throw "Unsupported platform for PlayOnLinux: ${stdenv.hostPlatform.system}";
ld64 = "${stdenv.cc}/nix-support/dynamic-linker";
libs = pkgs: stdenv.lib.makeLibraryPath [ pkgs.xorg.libX11 ];
@ -83,7 +83,7 @@ in stdenv.mkDerivation {
bunzip2 $out/share/playonlinux/bin/check_dd_x86.bz2
patchelf --set-interpreter $(cat ${ld32}) --set-rpath ${libs pkgsi686Linux} $out/share/playonlinux/bin/check_dd_x86
${if stdenv.system == "x86_64-linux" then ''
${if stdenv.hostPlatform.system == "x86_64-linux" then ''
bunzip2 $out/share/playonlinux/bin/check_dd_amd64.bz2
patchelf --set-interpreter $(cat ${ld64}) --set-rpath ${libs pkgs} $out/share/playonlinux/bin/check_dd_amd64
'' else ''

2
pkgs/applications/misc/rescuetime/default.nix

@ -2,7 +2,7 @@
let
src =
if stdenv.system == "i686-linux" then fetchurl {
if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
name = "rescuetime-installer.deb";
url = "https://www.rescuetime.com/installers/rescuetime_current_i386.deb";
sha256 = "06q1jwqsrjvlj820dd4vl80jznwafsqshsg0p6si8qx4721blryz";

2
pkgs/applications/misc/sweethome3d/default.nix

@ -55,7 +55,7 @@ let
makeWrapper ${jre}/bin/java $out/bin/$exec \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
--add-flags "-jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar ${if stdenv.system == "x86_64-linux" then "-d64" else "-d32"}"
--add-flags "-jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}"