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

It is deprecated and will be removed after 18.09.
This commit is contained in:
John Ericson 2018-08-20 15:11:29 -04:00
parent 94f71d800d
commit 2c2f1e37d4
263 changed files with 594 additions and 577 deletions

View File

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

View File

@ -1,7 +1,7 @@
{ stdenv, perl, pixz, pathsFromGraph { stdenv, perl, pixz, pathsFromGraph
, # The file name of the resulting tarball , # 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. , # The files and directories to be placed in the tarball.
# This is a list of attribute sets {source, target} where `source' # This is a list of attribute sets {source, target} where `source'

View File

@ -14,12 +14,12 @@ in
qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0" qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0"
else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0" 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: { qemuBinary = qemuPkg: {
"x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64"; "x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
"armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host"; "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"; "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"; "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";
} }

View File

@ -16,7 +16,7 @@ with lib;
]; ];
# ISO naming. # 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"; isoImage.volumeID = substring 0 11 "NIXOS_ISO";

View File

@ -16,7 +16,8 @@ in
]; ];
assertions = lib.singleton { 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; " + message = "sd-image-aarch64.nix can be only built natively on Aarch64 / ARM64; " +
"it cannot be cross compiled"; "it cannot be cross compiled";
}; };

View File

@ -16,7 +16,8 @@ in
]; ];
assertions = lib.singleton { 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; " + message = "sd-image-armv7l-multiplatform.nix can be only built natively on ARMv7; " +
"it cannot be cross compiled"; "it cannot be cross compiled";
}; };

View File

@ -16,7 +16,8 @@ in
]; ];
assertions = lib.singleton { 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; " + message = "sd-image-raspberrypi.nix can be only built natively on ARMv6; " +
"it cannot be cross compiled"; "it cannot be cross compiled";
}; };

View File

@ -22,7 +22,7 @@ in
{ {
options.sdImage = { options.sdImage = {
imageName = mkOption { 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 = '' description = ''
Name of the generated image file. Name of the generated image file.
''; '';
@ -102,7 +102,7 @@ in
mkdir -p $out/nix-support $out/sd-image mkdir -p $out/nix-support $out/sd-image
export img=$out/sd-image/${config.sdImage.imageName} 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 echo "file sd-image $img" >> $out/nix-support/hydra-build-products
# Create the image file sized to fit /boot and /, plus 20M of slack # Create the image file sized to fit /boot and /, plus 20M of slack

View File

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

View File

@ -10,7 +10,7 @@ let
toYesNo = b: if b then "yes" else "no"; 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)); gititWithPkgs = hsPkgs: extras: hsPkgs.ghcWithPackages (self: with self; [ gitit ] ++ (extras self));

View File

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

View File

@ -324,7 +324,7 @@ in
[ "aes" "aes_generic" "blowfish" "twofish" [ "aes" "aes_generic" "blowfish" "twofish"
"serpent" "cbc" "xts" "lrw" "sha1" "sha256" "sha512" "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 = '' description = ''
A list of cryptographic kernel modules needed to decrypt the root device(s). A list of cryptographic kernel modules needed to decrypt the root device(s).

View File

@ -77,7 +77,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ { assertions = [ {
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; 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; assertion = config.networking.networkmanager.enable == false;
message = "Windows Azure Linux Agent is not compatible with NetworkManager"; message = "Windows Azure Linux Agent is not compatible with NetworkManager";

View File

@ -26,7 +26,7 @@ in
rm $diskImageBase rm $diskImageBase
popd 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 ]; buildInputs = [ pkgs.utillinux pkgs.perl ];
exportReferencesGraph = exportReferencesGraph =
[ "closure" config.system.build.toplevel ]; [ "closure" config.system.build.toplevel ];

View File

@ -14,7 +14,7 @@ in
PATH=$PATH:${pkgs.stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]} PATH=$PATH:${pkgs.stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]}
pushd $out pushd $out
mv $diskImage disk.raw 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 rm $out/disk.raw
popd popd
''; '';

View File

@ -34,7 +34,7 @@ in
config = mkIf cfg.enable (mkMerge [{ config = mkIf cfg.enable (mkMerge [{
assertions = [{ assertions = [{
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; 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 ]; environment.systemPackages = [ kernel.virtualboxGuestAdditions ];

View File

@ -26,21 +26,21 @@ in {
}; };
vmDerivationName = mkOption { vmDerivationName = mkOption {
type = types.str; 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 = '' description = ''
The name of the derivation for the VirtualBox appliance. The name of the derivation for the VirtualBox appliance.
''; '';
}; };
vmName = mkOption { vmName = mkOption {
type = types.str; type = types.str;
default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.system})"; default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.hostPlatform.system})";
description = '' description = ''
The name of the VirtualBox appliance. The name of the VirtualBox appliance.
''; '';
}; };
vmFileName = mkOption { vmFileName = mkOption {
type = types.str; 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 = '' description = ''
The file name of the VirtualBox appliance. The file name of the VirtualBox appliance.
''; '';
@ -67,10 +67,10 @@ in {
echo "creating VirtualBox VM..." echo "creating VirtualBox VM..."
vmName="${cfg.vmName}"; vmName="${cfg.vmName}";
VBoxManage createvm --name "$vmName" --register \ 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" \ VBoxManage modifyvm "$vmName" \
--memory ${toString cfg.memorySize} --acpi on --vram 32 \ --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 \ --nictype1 virtio --nic1 nat \
--audiocontroller ac97 --audio alsa \ --audiocontroller ac97 --audio alsa \
--rtcuseutc on \ --rtcuseutc on \

View File

@ -22,7 +22,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ { assertions = [ {
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; 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 ]; environment.systemPackages = [ open-vm-tools ];

View File

@ -146,7 +146,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ { assertions = [ {
assertion = pkgs.stdenv.isx86_64; 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); assertion = config.boot.loader.grub.enable && (config.boot.loader.grub.efiSupport == false);
message = "Xen currently does not support EFI boot"; message = "Xen currently does not support EFI boot";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
, zlib, jdk, glib, gtk3, libXtst, gsettings-desktop-schemas, webkitgtk , zlib, jdk, glib, gtk3, libXtst, gsettings-desktop-schemas, webkitgtk
, makeWrapper, ... }: , 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 { stdenv.mkDerivation rec {
inherit name src; inherit name src;

View File

@ -27,24 +27,24 @@ rec {
name = "eclipse-cpp-4.7.0"; name = "eclipse-cpp-4.7.0";
description = "Eclipse IDE for C/C++ Developers, Oxygen release"; description = "Eclipse IDE for C/C++ Developers, Oxygen release";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { 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; 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"; sha512 = "813c791e739d7d0e2ab242a5bacadca135bbeee20ef97aa830353cd90f63fa6e9c89cfcc6aadf635c742befe035bd6e3f15103013f63c419f6144e86ebde3ed1";
} }
else if stdenv.system == "i686-linux" then else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl { 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; 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"; sha512 = "2b50f4a00306a89cda1aaaa606e62285cacbf93464a9dd3f3319dca3e2c578b802e685de6f78e5e617d269e21271188effe73d41f491a6de946e28795d82db8a";
} }
else throw "Unsupported system: ${stdenv.system}"; else throw "Unsupported system: ${stdenv.hostPlatform.system}";
}; };
eclipse-cpp-37 = buildEclipse { eclipse-cpp-37 = buildEclipse {
name = "eclipse-cpp-3.7"; name = "eclipse-cpp-3.7";
description = "Eclipse IDE for C/C++ Developers"; description = "Eclipse IDE for C/C++ Developers";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { 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; 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"; sha256 = "14ppc9g9igzvj1pq7jl01vwhzb66nmzbl9wsdl1sf3xnwa9wnqk3";
@ -65,7 +65,7 @@ rec {
name = "eclipse-modeling-4.7"; name = "eclipse-modeling-4.7";
description = "Eclipse Modeling Tools"; description = "Eclipse Modeling Tools";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { 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; 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"; sha512 = "3b9a7ad4b5d6b77fbdd64e8d323e0adb6c2904763ad042b374b4d87cef8607408cb407e395870fc755d58c0c800e20818adcf456ebe193d76cede16c5fe12271";
@ -81,7 +81,7 @@ rec {
name = "eclipse-modeling-3.6.2"; name = "eclipse-modeling-3.6.2";
description = "Eclipse Modeling Tools (includes Incubating components)"; description = "Eclipse Modeling Tools (includes Incubating components)";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { 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; 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"; sha1 = "e96f5f006298f68476f4a15a2be8589158d5cc61";
@ -151,7 +151,7 @@ rec {
name = "eclipse-scala-sdk-4.4.1"; name = "eclipse-scala-sdk-4.4.1";
description = "Eclipse IDE for Scala Developers"; description = "Eclipse IDE for Scala Developers";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { # tested 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; 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"; sha256 = "4c2d1ac68384e12a11a851cf0fc7757aea087eba69329b21d539382a65340d27";

View File

@ -42,7 +42,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
} }
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2) 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) target_size=$(get_file_size bin/fsnotifier64)
patchelf --set-interpreter "$interpreter" bin/fsnotifier64 patchelf --set-interpreter "$interpreter" bin/fsnotifier64
munge_size_hack bin/fsnotifier64 $target_size munge_size_hack bin/fsnotifier64 $target_size

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
let version = "0.4"; in let version = "0.4"; in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "gcolor2-${version}"; 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 { src = fetchurl {
url = "mirror://sourceforge/project/gcolor2/gcolor2/${version}/gcolor2-${version}.tar.bz2"; 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 # 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 [ ./gcolor2-amd64.patch ] else
[ ]; [ ];

View File

@ -12,17 +12,17 @@ let
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "brscan4-0.4.4-4"; name = "brscan4-0.4.4-4";
src = src =
if stdenv.system == "i686-linux" then if stdenv.hostPlatform.system == "i686-linux" then
fetchurl { fetchurl {
url = "http://download.brother.com/welcome/dlf006646/${name}.i386.deb"; url = "http://download.brother.com/welcome/dlf006646/${name}.i386.deb";
sha256 = "13mhjbzf9nvpdzrc2s98684r7likg76zxs1wlz2h8w59fsqgx4k2"; sha256 = "13mhjbzf9nvpdzrc2s98684r7likg76zxs1wlz2h8w59fsqgx4k2";
} }
else if stdenv.system == "x86_64-linux" then else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "https://download.brother.com/welcome/dlf006645/${name}.amd64.deb"; url = "https://download.brother.com/welcome/dlf006645/${name}.amd64.deb";
sha256 = "0xy5px96y1saq9l80vwvfn6anr2q42qlxdhm6ci2a0diwib5q9fd"; 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 = '' unpackPhase = ''
ar x $src ar x $src

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,10 +6,10 @@ stdenv.mkDerivation rec {
name = "iceSL-${version}"; name = "iceSL-${version}";
version = "2.1.10"; 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"; url = "https://gforge.inria.fr/frs/download.php/file/37268/icesl${version}-amd64.zip";
sha256 = "0dv3mq6wy46xk9blzzmgbdxpsjdaxid3zadfrysxlhmgl7zb2cn2"; 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"; url = "https://gforge.inria.fr/frs/download.php/file/37267/icesl${version}-i386.zip";
sha256 = "0sl54fsb2gz6dy0bwdscpdq1ab6ph5b7zald3bwzgkqsvna7p1jr"; sha256 = "0sl54fsb2gz6dy0bwdscpdq1ab6ph5b7zald3bwzgkqsvna7p1jr";
} else throw "Unsupported architecture"; } else throw "Unsupported architecture";

View File

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

View File

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

View File

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

View File

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

View File

@ -55,7 +55,7 @@ let
makeWrapper ${jre}/bin/java $out/bin/$exec \ 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" \ --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}"
''; '';
dontStrip = true; dontStrip = true;

View File

@ -44,7 +44,7 @@ let
cp "${editorItem}/share/applications/"* $out/share/applications cp "${editorItem}/share/applications/"* $out/share/applications
makeWrapper ${jre}/bin/java $out/bin/$exec \ 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" \ --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 ${if stdenv.system == "x86_64-linux" then "-d64" else "-d32"}" --add-flags "-jar $out/share/java/${module}-${version}.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}"
''; '';
dontStrip = true; dontStrip = true;

View File

@ -4,13 +4,13 @@ stdenv.mkDerivation rec {
name = "xmind-${version}"; name = "xmind-${version}";
version = "7.5-update1"; version = "7.5-update1";
src = if stdenv.system == "i686-linux" then fetchurl { src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_i386.deb"; url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_i386.deb";
sha256 = "04kr6pw0kwy715bp9wcnqnw1k5wl65xa87lhljrskm291p402jy1"; sha256 = "04kr6pw0kwy715bp9wcnqnw1k5wl65xa87lhljrskm291p402jy1";
} else if stdenv.system == "x86_64-linux" then fetchurl { } else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_amd64.deb"; url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_amd64.deb";
sha256 = "1j2ynhk7p3m3vd6c4mjwpnlzqgfj5c4q3zydab3nfwncwx6gaqj9"; sha256 = "1j2ynhk7p3m3vd6c4mjwpnlzqgfj5c4q3zydab3nfwncwx6gaqj9";
} else throw "platform ${stdenv.system} not supported!"; } else throw "platform ${stdenv.hostPlatform.system} not supported!";
nativeBuildInputs = [ dpkg makeWrapper ]; nativeBuildInputs = [ dpkg makeWrapper ];

View File

@ -21,17 +21,17 @@ stdenv.mkDerivation rec {
version = "2.0.0.v20170904-M13"; version = "2.0.0.v20170904-M13";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86_64.tar.gz"; url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86_64.tar.gz";
sha256 = "1jfnm6m0ijk31r30hhrxxnizk742dm317iny041p29v897rma7aq"; sha256 = "1jfnm6m0ijk31r30hhrxxnizk742dm317iny041p29v897rma7aq";
} }
else if stdenv.system == "i686-linux" then else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl { fetchurl {
url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86.tar.gz"; url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86.tar.gz";
sha256 = "1bxmgram42qyhrqkgp5k8770f5mjjdd4c6xl4gj09smiycm1qa4n"; sha256 = "1bxmgram42qyhrqkgp5k8770f5mjjdd4c6xl4gj09smiycm1qa4n";
} }
else throw "Unsupported system: ${stdenv.system}"; else throw "Unsupported system: ${stdenv.hostPlatform.system}";
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];

View File

@ -4,9 +4,9 @@ let
arch = { arch = {
"x86_64-linux" = "x64"; "x86_64-linux" = "x64";
"i686-linux" = "i386"; "i686-linux" = "i386";
}.${stdenv.system} or throwSystem; }.${stdenv.hostPlatform.system} or throwSystem;
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ]; libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ];
throwSystem = throw "Unsupported system: ${stdenv.system}"; throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
"https://download-cdn.getsync.com/${version}/linux-${arch}/BitTorrent-Sync_${arch}.tar.gz" "https://download-cdn.getsync.com/${version}/linux-${arch}/BitTorrent-Sync_${arch}.tar.gz"
"http://syncapp.bittorrent.com/${version}/btsync_${arch}-${version}.tar.gz" "http://syncapp.bittorrent.com/${version}/btsync_${arch}-${version}.tar.gz"
]; ];
sha256 = sha256s.${stdenv.system} or throwSystem; sha256 = sha256s.${stdenv.hostPlatform.system} or throwSystem;
}; };
dontStrip = true; # Don't strip, otherwise patching the rpaths breaks dontStrip = true; # Don't strip, otherwise patching the rpaths breaks

View File

@ -59,7 +59,7 @@ let
"x86_64-linux" = "linux-x86_64"; "x86_64-linux" = "linux-x86_64";
}; };
arch = mozillaPlatforms.${stdenv.system}; arch = mozillaPlatforms.${stdenv.hostPlatform.system};
isPrefixOf = prefix: string: isPrefixOf = prefix: string:
builtins.substring 0 (builtins.stringLength prefix) string == prefix; builtins.substring 0 (builtins.stringLength prefix) string == prefix;

View File

@ -36,10 +36,10 @@ let
jre = cfg.jre or false; jre = cfg.jre or false;
icedtea = cfg.icedtea or false; icedtea = cfg.icedtea or false;
supportsJDK = supportsJDK =
stdenv.system == "i686-linux" || stdenv.hostPlatform.system == "i686-linux" ||
stdenv.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-linux" ||
stdenv.system == "armv7l-linux" || stdenv.hostPlatform.system == "armv7l-linux" ||
stdenv.system == "aarch64-linux"; stdenv.hostPlatform.system == "aarch64-linux";
plugins = plugins =
assert !(jre && icedtea); assert !(jre && icedtea);

View File

@ -60,13 +60,13 @@
let let
arch = arch =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
"x86_64" "x86_64"
else if stdenv.system == "i686-linux" then else if stdenv.hostPlatform.system == "i686-linux" then
"i386" "i386"
else throw "Flash Player is not supported on this platform"; else throw "Flash Player is not supported on this platform";
lib_suffix = lib_suffix =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
"64" "64"
else else
""; "";

View File

@ -54,12 +54,12 @@ stdenv.mkDerivation rec {
version = "5.41.3.0"; version = "5.41.3.0";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "${baseURL}/google-talkplugin_${version}-1_amd64.deb"; url = "${baseURL}/google-talkplugin_${version}-1_amd64.deb";
sha1 = "0bbc3d6997ba22ce712d93e5bc336c894b54fc81"; sha1 = "0bbc3d6997ba22ce712d93e5bc336c894b54fc81";
} }
else if stdenv.system == "i686-linux" then else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl { fetchurl {
url = "${baseURL}/google-talkplugin_${version}-1_i386.deb"; url = "${baseURL}/google-talkplugin_${version}-1_i386.deb";
sha1 = "6eae0544858f85c68b0cc46d7786e990bd94f139"; sha1 = "6eae0544858f85c68b0cc46d7786e990bd94f139";

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation {
}; };
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = https://mytrezor.com/data/plugin/1.0.5/browser-plugin-trezor_1.0.5_amd64.deb; url = https://mytrezor.com/data/plugin/1.0.5/browser-plugin-trezor_1.0.5_amd64.deb;
sha256 = "0097h4v88yca4aayzprrh4pk03xvvj7ncz2mi83chm81gsr2v67z"; sha256 = "0097h4v88yca4aayzprrh4pk03xvvj7ncz2mi83chm81gsr2v67z";

View File

@ -125,7 +125,7 @@ stdenv.mkDerivation rec {
name = "tor-browser-bundle-bin-${version}"; name = "tor-browser-bundle-bin-${version}";
inherit version; inherit version;
src = srcs."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}"); src = srcs."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}");
preferLocalBuild = true; preferLocalBuild = true;
allowSubstitutes = false; allowSubstitutes = false;

View File

@ -2,7 +2,7 @@
let platforms = [ "i686-linux" "x86_64-linux" ]; in let platforms = [ "i686-linux" "x86_64-linux" ]; in
assert lib.elem stdenv.system platforms; assert lib.elem stdenv.hostPlatform.system platforms;
# Dropbox client to bootstrap installation. # Dropbox client to bootstrap installation.
# The client is self-updating, so the actual version may be newer. # The client is self-updating, so the actual version may be newer.
@ -12,7 +12,7 @@ let
arch = { arch = {
"x86_64-linux" = "x86_64"; "x86_64-linux" = "x86_64";
"i686-linux" = "x86"; "i686-linux" = "x86";
}.${stdenv.system}; }.${stdenv.hostPlatform.system};
installer = "https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.${arch}-${version}.tar.gz"; installer = "https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.${arch}-${version}.tar.gz";
in in

View File

@ -3,7 +3,7 @@
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }: , gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
let let
bits = if stdenv.system == "x86_64-linux" then "x64" bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
else "ia32"; else "ia32";
version = "4.0.4"; version = "4.0.4";

View File

@ -41,18 +41,18 @@ in
version = "4.1.2"; version = "4.1.2";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-x64.tar.gz"; url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-x64.tar.gz";
sha256 = "16dn6870bs1nfl2082ym9gwvmqb3i5sli48qprap80p7riph6k9s"; sha256 = "16dn6870bs1nfl2082ym9gwvmqb3i5sli48qprap80p7riph6k9s";
} }
else if stdenv.system == "i686-linux" then else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl { fetchurl {
url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-ia32.tar.gz"; url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-ia32.tar.gz";
sha256 = "145zb1l37fa2slfrrlprlwzcc5km3plxs374yhgix25mlg2afkqr"; sha256 = "145zb1l37fa2slfrrlprlwzcc5km3plxs374yhgix25mlg2afkqr";
} }
else else
throw "Mattermost-Desktop is not currently supported on ${stdenv.system}"; throw "Mattermost-Desktop is not currently supported on ${stdenv.hostPlatform.system}";
phases = [ "unpackPhase" "installPhase" ]; phases = [ "unpackPhase" "installPhase" ];
installPhase = '' installPhase = ''

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
inherit version; inherit version;
name = "sencha-bare-${version}"; name = "sencha-bare-${version}";
src = srcs.${stdenv.system}; src = srcs.${stdenv.hostPlatform.system};
nativeBuildInputs = [ gzip which unzip ]; nativeBuildInputs = [ gzip which unzip ];
buildInputs = [ jdk ]; buildInputs = [ jdk ];

View File

@ -53,13 +53,13 @@ let
] + ":${stdenv.cc.cc.lib}/lib64"; ] + ":${stdenv.cc.cc.lib}/lib64";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"; url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb";
sha256 = "1kydf71qbz35dx4674h3nxfx8a88k620217906i54ic4qq2mgy2x"; sha256 = "1kydf71qbz35dx4674h3nxfx8a88k620217906i54ic4qq2mgy2x";
} }
else else
throw "Skype for linux is not supported on ${stdenv.system}"; throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "skypeforlinux-${version}"; name = "skypeforlinux-${version}";

View File

@ -44,13 +44,13 @@ let
] + ":${stdenv.cc.cc.lib}/lib64"; ] + ":${stdenv.cc.cc.lib}/lib64";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb"; url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb";
sha256 = "095dpkwvvnwlxsglyg6wi9126wpalzi736b6g6j3bd6d93z9afah"; sha256 = "095dpkwvvnwlxsglyg6wi9126wpalzi736b6g6j3bd6d93z9afah";
} }
else else
throw "Slack is not supported on ${stdenv.system}"; throw "Slack is not supported on ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "slack-${version}"; name = "slack-${version}";

View File

@ -44,12 +44,12 @@ let
plat = { plat = {
"i686-linux" = "i386"; "i686-linux" = "i386";
"x86_64-linux" = "amd64"; "x86_64-linux" = "amd64";
}.${stdenv.system}; }.${stdenv.hostPlatform.system};
sha256 = { sha256 = {
"i686-linux" = "071ddh2d8wmiybwafwyb97962zj358l0fq7g2r44231653sgybvq"; "i686-linux" = "071ddh2d8wmiybwafwyb97962zj358l0fq7g2r44231653sgybvq";
"x86_64-linux" = "0qp9ms94smnm7k47b0n0jdzvnm1b7gj25hyinsfc6lghrb6jqw3r"; "x86_64-linux" = "0qp9ms94smnm7k47b0n0jdzvnm1b7gj25hyinsfc6lghrb6jqw3r";
}.${stdenv.system}; }.${stdenv.hostPlatform.system};
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook, env { stdenv, fetchurl, makeWrapper, makeDesktopItem, autoPatchelfHook, env
# Dynamic libraries # Dynamic libraries
, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative , dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative
, qtimageformats, qtlocation, qtquickcontrols, qtquickcontrols2, qtscript, qtsvg , qtimageformats, qtlocation, qtquickcontrols, qtquickcontrols2, qtscript, qtsvg
@ -31,7 +31,7 @@ let
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "zoom-us-${version}"; name = "zoom-us-${version}";
src = srcs.${system}; src = srcs.${stdenv.hostPlatform.system};
nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; nativeBuildInputs = [ autoPatchelfHook makeWrapper ];

View File

@ -4,13 +4,13 @@ stdenv.mkDerivation rec {
name = "insync-${version}"; name = "insync-${version}";
version = "1.4.5.37069"; version = "1.4.5.37069";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "http://s.insynchq.com/builds/insync-portable_${version}_amd64.tar.bz2"; url = "http://s.insynchq.com/builds/insync-portable_${version}_amd64.tar.bz2";
sha256 = "0mkqgpq4isngkj20c0ygmxf4cj975d446svhwvl3cqdrjkjm1ybd"; sha256 = "0mkqgpq4isngkj20c0ygmxf4cj975d446svhwvl3cqdrjkjm1ybd";
} }
else else
throw "${name} is not supported on ${stdenv.system}"; throw "${name} is not supported on ${stdenv.hostPlatform.system}";
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];

View File

@ -33,13 +33,13 @@ stdenv.mkDerivation rec {
subVersion = "fec7941"; subVersion = "fec7941";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "https://edgehill.s3.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb"; url = "https://edgehill.s3.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb";
sha256 = "40060aa1dc3b5187b8ed4a07b9de3427e3c5a291df98c2c82395647fa2aa4ada"; sha256 = "40060aa1dc3b5187b8ed4a07b9de3427e3c5a291df98c2c82395647fa2aa4ada";
} }
else else
throw "NylasMail is not supported on ${stdenv.system}"; throw "NylasMail is not supported on ${stdenv.hostPlatform.system}";
propagatedBuildInputs = [ propagatedBuildInputs = [
alsaLib alsaLib

View File

@ -47,7 +47,7 @@
with (import ./release_sources.nix); with (import ./release_sources.nix);
let let
arch = if stdenv.system == "i686-linux" arch = if stdenv.hostPlatform.system == "i686-linux"
then "linux-i686" then "linux-i686"
else "linux-x86_64"; else "linux-x86_64";

View File

@ -75,7 +75,7 @@ in stdenv.mkDerivation {
cp ${ { x86_64-darwin = "desktop/lib/native/*.dylib"; cp ${ { x86_64-darwin = "desktop/lib/native/*.dylib";
x86_64-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}.so"; x86_64-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}.so";
i686-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}X86.so"; i686-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}X86.so";
}.${stdenv.system} or (throw "unsupported system ${stdenv.system}") }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}")
} $out/lib } $out/lib
cp -dpR ${desktopItem}/share $out cp -dpR ${desktopItem}/share $out

View File

@ -37,7 +37,7 @@ in stdenv.mkDerivation rec {
name = "soulseekqt-${version}"; name = "soulseekqt-${version}";
inherit version; inherit version;
src = srcs."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}"); src = srcs."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}");
dontBuild = true; dontBuild = true;

View File

@ -6,12 +6,12 @@ let
sha256 = { sha256 = {
"x86_64-linux" = "0g19sac4j3m1nf400vn6qcww7prqg2p4k4zsj74i109kk1396aa2"; "x86_64-linux" = "0g19sac4j3m1nf400vn6qcww7prqg2p4k4zsj74i109kk1396aa2";
"i686-linux" = "1dd4ai2pclav9g872xil3x67bxy32gvz9pb3w76383pcsdh5zh45"; "i686-linux" = "1dd4ai2pclav9g872xil3x67bxy32gvz9pb3w76383pcsdh5zh45";
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported"); }."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported");
arch = { arch = {
"x86_64-linux" = "amd64"; "x86_64-linux" = "amd64";
"i686-linux" = "i686"; "i686-linux" = "i686";
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported"); }."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported");
description = "Desktop sharing application, providing remote support and online meetings"; description = "Desktop sharing application, providing remote support and online meetings";

View File

@ -4,7 +4,7 @@ let
arch = { arch = {
"x86_64-linux" = "x64"; "x86_64-linux" = "x64";
"i686-linux" = "i386"; "i686-linux" = "i386";
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ]; libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ];
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
@ -16,7 +16,7 @@ in stdenv.mkDerivation rec {
sha256 = { sha256 = {
"x86_64-linux" = "0041axi9carspkfaxvyirfvsa29zz55al01x90nh93nzxvpvywsz"; "x86_64-linux" = "0041axi9carspkfaxvyirfvsa29zz55al01x90nh93nzxvpvywsz";
"i686-linux" = "1ar36lp4f6a1z9i82g3gpak4q4ny09faqxdd59q1pvfzq25ypdhs"; "i686-linux" = "1ar36lp4f6a1z9i82g3gpak4q4ny09faqxdd59q1pvfzq25ypdhs";
}.${stdenv.system}; }.${stdenv.hostPlatform.system};
}; };
dontStrip = true; # Don't strip, otherwise patching the rpaths breaks dontStrip = true; # Don't strip, otherwise patching the rpaths breaks

View File

@ -4,17 +4,17 @@
}: }:
let let
arch = if stdenv.system == "x86_64-linux" then "x64" arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
else if stdenv.system == "i686-linux" then "x86" else if stdenv.hostPlatform.system == "i686-linux" then "x86"
else throw "Spideroak client for: ${stdenv.system} not supported!"; else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
interpreter = if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" interpreter = if stdenv.hostPlatform.system == "x86_64-linux" then "ld-linux-x86-64.so.2"
else if stdenv.system == "i686-linux" then "ld-linux.so.2" else if stdenv.hostPlatform.system == "i686-linux" then "ld-linux.so.2"
else throw "Spideroak client for: ${stdenv.system} not supported!"; else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
sha256 = if stdenv.system == "x86_64-linux" then "a88e5a8fe4a565ac500668bd53cf5784752d7c9253304ddce39ee7b01d078533" sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "a88e5a8fe4a565ac500668bd53cf5784752d7c9253304ddce39ee7b01d078533"
else if stdenv.system == "i686-linux" then "668f3b83a974a3877d16c8743c233a427ea0a44ab84b7f9aec19a2995db66c16" else if stdenv.hostPlatform.system == "i686-linux" then "668f3b83a974a3877d16c8743c233a427ea0a44ab84b7f9aec19a2995db66c16"
else throw "Spideroak client for: ${stdenv.system} not supported!"; else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
ldpath = stdenv.lib.makeLibraryPath [ ldpath = stdenv.lib.makeLibraryPath [
fontconfig freetype glib libICE libSM fontconfig freetype glib libICE libSM

View File

@ -44,13 +44,13 @@ let
] + ":${stdenv.cc.cc.lib}/lib64"; ] + ":${stdenv.cc.cc.lib}/lib64";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity_${version}_amd64.deb"; url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity_${version}_amd64.deb";
sha256 = "0jfi0lfijnhij9jvkhxgyvq8m1jzaym8n1c7707fv3hjh1h0vxn1"; sha256 = "0jfi0lfijnhij9jvkhxgyvq8m1jzaym8n1c7707fv3hjh1h0vxn1";
} }
else else
throw "super-productivity is not supported on ${stdenv.system}"; throw "super-productivity is not supported on ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "super-productivity-${version}"; name = "super-productivity-${version}";

View File

@ -6,10 +6,10 @@ let
version = "${_version}-${_build}"; version = "${_version}-${_build}";
name = "jameica-${version}"; name = "jameica-${version}";
swtSystem = if stdenv.system == "i686-linux" then "linux" swtSystem = if stdenv.hostPlatform.system == "i686-linux" then "linux"
else if stdenv.system == "x86_64-linux" then "linux64" else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64"
else if stdenv.system == "x86_64-darwin" then "macos64" else if stdenv.hostPlatform.system == "x86_64-darwin" then "macos64"
else throw "Unsupported system: ${stdenv.system}"; else throw "Unsupported system: ${stdenv.hostPlatform.system}";
desktopItem = makeDesktopItem { desktopItem = makeDesktopItem {
name = "jameica"; name = "jameica";

View File

@ -37,7 +37,7 @@
let let
arch32 = "i686-linux"; arch32 = "i686-linux";
arch = if stdenv.system == arch32 arch = if stdenv.hostPlatform.system == arch32
then "i386" then "i386"
else "amd64"; else "amd64";
@ -46,7 +46,7 @@ let
version = "${shortVersion}_${arch}"; version = "${shortVersion}_${arch}";
url = "http://desktop-download.mendeley.com/download/apt/pool/main/m/mendeleydesktop/mendeleydesktop_${version}.deb"; url = "http://desktop-download.mendeley.com/download/apt/pool/main/m/mendeleydesktop/mendeleydesktop_${version}.deb";
sha256 = if stdenv.system == arch32 sha256 = if stdenv.hostPlatform.system == arch32
then "0fcyl5i8xdgb5j0x1643qc0j74d8p11jczvqmgqkqh0wgid1y1ad" then "0fcyl5i8xdgb5j0x1643qc0j74d8p11jczvqmgqkqh0wgid1y1ad"
else "1dzwa2cnn9xakrhhq159fhh71gw5wlbf017rrikdlia694m8akq6"; else "1dzwa2cnn9xakrhhq159fhh71gw5wlbf017rrikdlia694m8akq6";

View File

@ -21,8 +21,8 @@ stdenv.mkDerivation rec {
name = "moneyplex-${version}"; name = "moneyplex-${version}";
version = "16.0.22424"; version = "16.0.22424";
src = fetchurl (if stdenv.system == "i686-linux" then src_i686 src = fetchurl (if stdenv.hostPlatform.system == "i686-linux" then src_i686
else if stdenv.system == "x86_64-linux" then src_x86_64 else if stdenv.hostPlatform.system == "x86_64-linux" then src_x86_64
else throw "moneyplex requires i686-linux or x86_64-linux"); else throw "moneyplex requires i686-linux or x86_64-linux");

View File

@ -3,7 +3,7 @@
, zlib, libpng12, libICE, libXrender, cups }: , zlib, libpng12, libICE, libXrender, cups }:
let let
bits = if stdenv.system == "x86_64-linux" then "x86_64" bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
else "x86"; else "x86";
version = "10.1.0.5672"; version = "10.1.0.5672";

View File

@ -17,18 +17,18 @@ stdenv.mkDerivation rec {
version = "7.7.0"; version = "7.7.0";
src = src =
if stdenv.system == "i686-linux" then if stdenv.hostPlatform.system == "i686-linux" then
fetchurl { fetchurl {
url = "ftp://ftp.cadsoft.de/eagle/program/7.7/eagle-lin32-${version}.run"; url = "ftp://ftp.cadsoft.de/eagle/program/7.7/eagle-lin32-${version}.run";
sha256 = "16fa66p77xigc7zvzfm7737mllrcs6nrgk2p7wvkjw3p9lvbz7z1"; sha256 = "16fa66p77xigc7zvzfm7737mllrcs6nrgk2p7wvkjw3p9lvbz7z1";
} }
else if stdenv.system == "x86_64-linux" then else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "ftp://ftp.cadsoft.de/eagle/program/7.7/eagle-lin64-${version}.run"; url = "ftp://ftp.cadsoft.de/eagle/program/7.7/eagle-lin64-${version}.run";
sha256 = "18dcn6wqph1sqh0ah98qzfi05wip8a8ifbkaq79iskbrsi8iqnrg"; sha256 = "18dcn6wqph1sqh0ah98qzfi05wip8a8ifbkaq79iskbrsi8iqnrg";
} }
else else
throw "Unsupported system: ${stdenv.system}"; throw "Unsupported system: ${stdenv.hostPlatform.system}";
desktopItem = makeDesktopItem { desktopItem = makeDesktopItem {
name = "eagle"; name = "eagle";

View File

@ -48,7 +48,7 @@ stdenv.mkDerivation {
rm -rf $comp/x86* rm -rf $comp/x86*
done done
'' + (if ! stdenv.isLinux then "" else '' '' + (if ! stdenv.isLinux then "" else ''
arch=${if stdenv.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"} arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"}
for f in contrib/*/$arch/{bash_process,epclextract,eprover,nunchaku,SPASS}; do for f in contrib/*/$arch/{bash_process,epclextract,eprover,nunchaku,SPASS}; do
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f"
done done

View File

@ -12,7 +12,7 @@ let
url = "https://github.com/GaloisInc/saw-script/releases/download"; url = "https://github.com/GaloisInc/saw-script/releases/download";
saw-bin = saw-bin =
if stdenv.system == "i686-linux" if stdenv.hostPlatform.system == "i686-linux"
then fetchurl { then fetchurl {
url = url + "/v0.1.1-dev/saw-0.1.1-dev-2015-07-31-CentOS6-32.tar.gz"; url = url + "/v0.1.1-dev/saw-0.1.1-dev-2015-07-31-CentOS6-32.tar.gz";
sha256 = "126iag5nnvndi78c921z7vjrjfwcspn1hlxwwhzmqm4rvbhhr9v9"; sha256 = "126iag5nnvndi78c921z7vjrjfwcspn1hlxwwhzmqm4rvbhhr9v9";

View File

@ -18,7 +18,7 @@
let let
platform = platform =
if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then
"Linux" "Linux"
else else
throw "Mathematica requires i686-linux or x86_64 linux"; throw "Mathematica requires i686-linux or x86_64 linux";
@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
]); ]);
ldpath = stdenv.lib.makeLibraryPath buildInputs ldpath = stdenv.lib.makeLibraryPath buildInputs
+ stdenv.lib.optionalString (stdenv.system == "x86_64-linux") + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux")
(":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs);
phases = "unpackPhase installPhase fixupPhase"; phases = "unpackPhase installPhase fixupPhase";

View File

@ -16,7 +16,7 @@
let let
platform = platform =
if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then
"Linux" "Linux"
else else
throw "Mathematica requires i686-linux or x86_64 linux"; throw "Mathematica requires i686-linux or x86_64 linux";
@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
]); ]);
ldpath = stdenv.lib.makeLibraryPath buildInputs ldpath = stdenv.lib.makeLibraryPath buildInputs
+ stdenv.lib.optionalString (stdenv.system == "x86_64-linux") + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux")
(":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs);
phases = "unpackPhase installPhase fixupPhase"; phases = "unpackPhase installPhase fixupPhase";

View File

@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
]); ]);
ldpath = stdenv.lib.makeLibraryPath buildInputs ldpath = stdenv.lib.makeLibraryPath buildInputs
+ stdenv.lib.optionalString (stdenv.system == "x86_64-linux") + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux")
(":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs);
phases = "unpackPhase installPhase fixupPhase"; phases = "unpackPhase installPhase fixupPhase";

View File

@ -10,9 +10,9 @@ let
badArch = throw "${name} requires i686-linux or x86_64-linux"; badArch = throw "${name} requires i686-linux or x86_64-linux";
architecture = architecture =
if stdenv.system == "i686-linux" then if stdenv.hostPlatform.system == "i686-linux" then
"i686" "i686"
else if stdenv.system == "x86_64-linux" then else if stdenv.hostPlatform.system == "x86_64-linux" then
"x86_64" "x86_64"
else else
badArch; badArch;
@ -23,9 +23,9 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "https://www.scilab.org/download/${ver}/scilab-${ver}.bin.linux-${architecture}.tar.gz"; url = "https://www.scilab.org/download/${ver}/scilab-${ver}.bin.linux-${architecture}.tar.gz";
sha256 = sha256 =
if stdenv.system == "i686-linux" then if stdenv.hostPlatform.system == "i686-linux" then
"0fgjc2ak3b2qi6yin3fy50qwk2bcj0zbz1h4lyyic9n1n1qcliib" "0fgjc2ak3b2qi6yin3fy50qwk2bcj0zbz1h4lyyic9n1n1qcliib"
else if stdenv.system == "x86_64-linux" then else if stdenv.hostPlatform.system == "x86_64-linux" then
"1scswlznc14vyzg0gqa1q9gcpwx05kz1sbn563463mzkdp7nd35d" "1scswlznc14vyzg0gqa1q9gcpwx05kz1sbn563463mzkdp7nd35d"
else else
badArch; badArch;

View File

@ -5,7 +5,7 @@
, ghostscript, gawk, gnugrep, gnused, gnutar, gzip, libiconv, zlib , ghostscript, gawk, gnugrep, gnused, gnutar, gzip, libiconv, zlib
, withGui ? true }: , withGui ? true }:
assert stdenv.system != "powerpc-linux"; assert stdenv.hostPlatform.system != "powerpc-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
ver = "1.23.7"; ver = "1.23.7";

View File

@ -23,12 +23,12 @@ let
name = "lightworks-${version}"; name = "lightworks-${version}";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "http://downloads.lwks.com/v14/lwks-14.0.0-amd64.deb"; url = "http://downloads.lwks.com/v14/lwks-14.0.0-amd64.deb";
sha256 = "66eb9f9678d979db76199f1c99a71df0ddc017bb47dfda976b508849ab305033"; sha256 = "66eb9f9678d979db76199f1c99a71df0ddc017bb47dfda976b508849ab305033";
} }
else throw "${name} is not supported on ${stdenv.system}"; else throw "${name} is not supported on ${stdenv.hostPlatform.system}";
buildInputs = [ dpkg makeWrapper ]; buildInputs = [ dpkg makeWrapper ];

View File

@ -60,13 +60,13 @@ let
let let
dir = http://www.mplayerhq.hu/MPlayer/releases/codecs/; dir = http://www.mplayerhq.hu/MPlayer/releases/codecs/;
in in
if stdenv.system == "i686-linux" then fetchurl { if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
url = "${dir}/essential-20071007.tar.bz2"; url = "${dir}/essential-20071007.tar.bz2";
sha256 = "18vls12n12rjw0mzw4pkp9vpcfmd1c21rzha19d7zil4hn7fs2ic"; sha256 = "18vls12n12rjw0mzw4pkp9vpcfmd1c21rzha19d7zil4hn7fs2ic";
} else if stdenv.system == "x86_64-linux" then fetchurl { } else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
url = "${dir}/essential-amd64-20071007.tar.bz2"; url = "${dir}/essential-amd64-20071007.tar.bz2";
sha256 = "13xf5b92w1ra5hw00ck151lypbmnylrnznq9hhb0sj36z5wz290x"; sha256 = "13xf5b92w1ra5hw00ck151lypbmnylrnznq9hhb0sj36z5wz290x";
} else if stdenv.system == "powerpc-linux" then fetchurl { } else if stdenv.hostPlatform.system == "powerpc-linux" then fetchurl {
url = "${dir}/essential-ppc-20071007.tar.bz2"; url = "${dir}/essential-ppc-20071007.tar.bz2";
sha256 = "18mlj8dp4wnz42xbhdk1jlz2ygra6fbln9wyrcyvynxh96g1871z"; sha256 = "18mlj8dp4wnz42xbhdk1jlz2ygra6fbln9wyrcyvynxh96g1871z";
} else null; } else null;

View File

@ -42,13 +42,13 @@
version = "0.20.0"; version = "0.20.0";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v0.20.0/webtorrent-desktop_${version}-1_amd64.deb"; url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v0.20.0/webtorrent-desktop_${version}-1_amd64.deb";
sha256 = "1kkrnbimiip5pn2nwpln35bbdda9gc3cgrjwphq4fqasbjf2781k"; sha256 = "1kkrnbimiip5pn2nwpln35bbdda9gc3cgrjwphq4fqasbjf2781k";
} }
else else
throw "Webtorrent is not currently supported on ${stdenv.system}"; throw "Webtorrent is not currently supported on ${stdenv.hostPlatform.system}";
phases = [ "unpackPhase" "installPhase" ]; phases = [ "unpackPhase" "installPhase" ];
nativeBuildInputs = [ dpkg ]; nativeBuildInputs = [ dpkg ];
unpackPhase = "dpkg-deb -x $src ."; unpackPhase = "dpkg-deb -x $src .";

View File

@ -22,7 +22,7 @@
with stdenv.lib; with stdenv.lib;
let let
audio = optionalString (hasSuffix "linux" stdenv.system) "alsa," audio = optionalString (hasSuffix "linux" stdenv.hostPlatform.system) "alsa,"
+ optionalString pulseSupport "pa," + optionalString pulseSupport "pa,"
+ optionalString sdlSupport "sdl,"; + optionalString sdlSupport "sdl,";

View File

@ -44,23 +44,23 @@ stdenv.mkDerivation {
''; '';
buildCommand = with xorg; '' buildCommand = with xorg; ''
${if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then '' ${if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then ''
isoinfo -J -i $src -x /VBoxLinuxAdditions.run > ./VBoxLinuxAdditions.run isoinfo -J -i $src -x /VBoxLinuxAdditions.run > ./VBoxLinuxAdditions.run
chmod 755 ./VBoxLinuxAdditions.run chmod 755 ./VBoxLinuxAdditions.run
./VBoxLinuxAdditions.run --noexec --keep ./VBoxLinuxAdditions.run --noexec --keep
'' ''
else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions")
} }
# Unpack files # Unpack files
cd install cd install
${if stdenv.system == "i686-linux" then '' ${if stdenv.hostPlatform.system == "i686-linux" then ''
tar xfvj VBoxGuestAdditions-x86.tar.bz2 tar xfvj VBoxGuestAdditions-x86.tar.bz2
'' ''
else if stdenv.system == "x86_64-linux" then '' else if stdenv.hostPlatform.system == "x86_64-linux" then ''
tar xfvj VBoxGuestAdditions-amd64.tar.bz2 tar xfvj VBoxGuestAdditions-amd64.tar.bz2
'' ''
else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions")
} }
cd ../ cd ../
@ -81,13 +81,13 @@ stdenv.mkDerivation {
# Change the interpreter for various binaries # Change the interpreter for various binaries
for i in sbin/VBoxService bin/{VBoxClient,VBoxControl} other/mount.vboxsf for i in sbin/VBoxService bin/{VBoxClient,VBoxControl} other/mount.vboxsf
do do
${if stdenv.system == "i686-linux" then '' ${if stdenv.hostPlatform.system == "i686-linux" then ''
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $i patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $i
'' ''
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 $i patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $i
'' ''
else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions")
} }
patchelf --set-rpath ${lib.makeLibraryPath [ stdenv.cc.cc dbus libX11 libXt libXext libXmu libXfixes libXrandr libXcursor ]} $i patchelf --set-rpath ${lib.makeLibraryPath [ stdenv.cc.cc dbus libX11 libXt libXext libXmu libXfixes libXrandr libXcursor ]} $i
done done

View File

@ -36,9 +36,9 @@ stdenv.mkDerivation rec {
# they shouldn't, and then even once that's fixed have some # they shouldn't, and then even once that's fixed have some
# perl-related errors later on. For more, see # perl-related errors later on. For more, see
# https://github.com/NixOS/nixpkgs/issues/7957 # https://github.com/NixOS/nixpkgs/issues/7957
doCheck = false; # stdenv.system == "x86_64-linux"; doCheck = false; # stdenv.hostPlatform.system == "x86_64-linux";
checkPhase = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") checkPhase = stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux")
'' ''
(cd testcases && xvfb-run ./complete-run.pl -p 1 --keep-xserver-output) (cd testcases && xvfb-run ./complete-run.pl -p 1 --keep-xserver-output)
! grep -q '^not ok' testcases/latest/complete-run.log ! grep -q '^not ok' testcases/latest/complete-run.log

View File

@ -1,4 +1,4 @@
{ stdenv, buildEnv, writeText, pkgs, pkgsi686Linux, system }: { stdenv, buildEnv, writeText, pkgs, pkgsi686Linux }:
{ name, profile ? "" { name, profile ? ""
, targetPkgs ? pkgs: [], multiPkgs ? pkgs: [] , targetPkgs ? pkgs: [], multiPkgs ? pkgs: []
@ -22,7 +22,7 @@
# /lib will link to /lib32 # /lib will link to /lib32
let let
is64Bit = system == "x86_64-linux"; is64Bit = stdenv.hostPlatform.parsed.cpu.bits == 64;
isMultiBuild = multiPkgs != null && is64Bit; isMultiBuild = multiPkgs != null && is64Bit;
isTargetBuild = !isMultiBuild; isTargetBuild = !isMultiBuild;

View File

@ -148,7 +148,7 @@ stdenv.mkDerivation (
postPhases = postPhases ++ ["finalPhase"]; postPhases = postPhases ++ ["finalPhase"];
meta = (if args ? meta then args.meta else {}) // { meta = (if args ? meta then args.meta else {}) // {
description = if doCoverageAnalysis then "Coverage analysis" else "Nix package for ${stdenv.system}"; description = if doCoverageAnalysis then "Coverage analysis" else "Nix package for ${stdenv.hostPlatform.system}";
}; };
} }

View File

@ -157,7 +157,7 @@ let
"-net vde,vlan=0,sock=$QEMU_VDE_SOCKET" "-net vde,vlan=0,sock=$QEMU_VDE_SOCKET"
]); ]);
maybeKvm64 = optional (stdenv.system == "x86_64-linux") "-cpu kvm64"; maybeKvm64 = optional (stdenv.hostPlatform.system == "x86_64-linux") "-cpu kvm64";
cygwinQemuArgs = concatStringsSep " " (maybeKvm64 ++ [ cygwinQemuArgs = concatStringsSep " " (maybeKvm64 ++ [
"-monitor unix:$MONITOR_SOCKET,server,nowait" "-monitor unix:$MONITOR_SOCKET,server,nowait"

View File

@ -17,7 +17,7 @@ let
}; };
cygwinCross = (import ../../../../.. { cygwinCross = (import ../../../../.. {
inherit (stdenv) system; localSystem = stdenv.hostPlatform;
crossSystem = { crossSystem = {
libc = "msvcrt"; libc = "msvcrt";
platform = {}; platform = {};

View File

@ -13,15 +13,19 @@ assert withTeensyduino -> withGui;
# xdotool script; the cause of this hang is not yet known. # xdotool script; the cause of this hang is not yet known.
# TODO: There is a fair chance that Teensyduino works with arm-linux, but it # TODO: There is a fair chance that Teensyduino works with arm-linux, but it
# has not yet been tested. # has not yet been tested.
if withTeensyduino && (stdenv.system != "x86_64-linux") then throw if withTeensyduino && (stdenv.hostPlatform.system != "x86_64-linux") then throw
"Teensyduino is only supported on x86_64-linux at this time (patches welcome)." "Teensyduino is only supported on x86_64-linux at this time (patches welcome)."
else else
let let
externalDownloads = import ./downloads.nix {inherit fetchurl; inherit (lib) optionalAttrs; inherit (stdenv) system;}; externalDownloads = import ./downloads.nix {
inherit fetchurl;
inherit (lib) optionalAttrs;
inherit (stdenv.hostPlatform) system;
};
# Some .so-files are later copied from .jar-s to $HOME, so patch them beforehand # Some .so-files are later copied from .jar-s to $HOME, so patch them beforehand
patchelfInJars = patchelfInJars =
lib.optional (stdenv.system == "x86_64-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86_64.so";} lib.optional (stdenv.hostPlatform.system == "x86_64-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86_64.so";}
++ lib.optional (stdenv.system == "i686-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86.so";} ++ lib.optional (stdenv.hostPlatform.system == "i686-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86.so";}
; ;
# abiVersion 6 is default, but we need 5 for `avrdude_bin` executable # abiVersion 6 is default, but we need 5 for `avrdude_bin` executable
ncurses5 = ncurses.override { abiVersion = "5"; }; ncurses5 = ncurses.override { abiVersion = "5"; };
@ -46,9 +50,9 @@ let
zlib zlib
]; ];
teensy_architecture = teensy_architecture =
lib.optionalString (stdenv.system == "x86_64-linux") "linux64" lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "linux64"
+ lib.optionalString (stdenv.system == "i686-linux") "linux32" + lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "linux32"
+ lib.optionalString (stdenv.system == "arm-linux") "linuxarm"; + lib.optionalString (stdenv.hostPlatform.system == "arm-linux") "linuxarm";
flavor = (if withTeensyduino then "teensyduino" else "arduino") flavor = (if withTeensyduino then "teensyduino" else "arduino")
+ stdenv.lib.optionalString (!withGui) "-core"; + stdenv.lib.optionalString (!withGui) "-core";

View File

@ -29,7 +29,7 @@ let
}; };
armv6l-linux = armv7l-linux; armv6l-linux = armv7l-linux;
}; };
cfg = options."${stdenv.system}" or (throw "missing source url for platform ${stdenv.system}"); cfg = options."${stdenv.hostPlatform.system}" or (throw "missing source url for platform ${stdenv.hostPlatform.system}");
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {

View File

@ -4,11 +4,11 @@ stdenv.mkDerivation rec {
name = "clean-2.4"; name = "clean-2.4";
src = src =
if stdenv.system == "i686-linux" then (fetchurl { if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
url = "http://clean.cs.ru.nl/download/Clean24/linux/clean2.4_boot.tar.gz"; url = "http://clean.cs.ru.nl/download/Clean24/linux/clean2.4_boot.tar.gz";
sha256 = "1w8vvmkwzq8g51639r62apcy75sj69nm08082a34xvqm9ymfgkq5"; sha256 = "1w8vvmkwzq8g51639r62apcy75sj69nm08082a34xvqm9ymfgkq5";
}) })
else if stdenv.system == "x86_64-linux" then (fetchurl { else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
url = "https://clean.cs.ru.nl/download/Clean24/linux/clean2.4_64_boot.tar.gz"; url = "https://clean.cs.ru.nl/download/Clean24/linux/clean2.4_64_boot.tar.gz";
sha256 = "08gsa1pjl5wyzh4ah8ccfx8a7mdcn6ycsn1lzkrr9adygv1gmm7r"; sha256 = "08gsa1pjl5wyzh4ah8ccfx8a7mdcn6ycsn1lzkrr9adygv1gmm7r";
}) })

Some files were not shown because too many files have changed in this diff Show More