Merge pull request #45820 from obsidiansystems/dont-use-obsolete-platform-aliases

treewide: Dont use obsolete platform aliases

Changed files
+1139 -1180
doc
languages-frameworks
old
nixos
pkgs
applications
altcoins
audio
baudline
google-musicmanager
mpg123
renoise
transcribe
editors
eclipse
ed
jetbrains
kodestudio
music
tuxguitar
sublime
typora
vim
vscode
graphics
ImageMagick
gcolor2
sane
backends
brscan4
unigine-valley
misc
1password
adobe-reader
cura
googleearth
icesl
kdbplus
kiwix
playonlinux
rescuetime
sweethome3d
xmind
networking
apache-directory-studio
bittorrentsync
browsers
firefox
firefox-bin
mozilla-plugins
flashplayer
google-talk-plugin
trezor
tor-browser-bundle-bin
cluster
minikube
dropbox
instant-messengers
franz
mattermost-desktop
rambox
sencha
skypeforlinux
slack
wire-desktop
zoom-us
insync
mailreaders
nylas-mail-bin
thunderbird-bin
p2p
frostwire
soulseekqt
remote
anydesk
putty
resilio-sync
spideroak
super-productivity
office
jameica
mendeley
moneyplex
wpsoffice
science
electronics
eagle
logic
isabelle
saw-tools
math
mathematica
scilab-bin
search
recoll
video
lightworks
mplayer
omxplayer
webtorrent_desktop
virtualization
qemu
virtualbox
guest-additions
vpcs
window-managers
build-support
build-fhs-userenv
kernel
release
rust
vm
windows
controller
cygwin-iso
development
arduino
arduino-core
compilers
haskell-modules
interpreters
dart
guile
python
cpython
spidermonkey
libraries
SDL
apr
attr
audio
libbass
boehm-gc
boost
bootil
c-ares
crypto++
ffmpeg
ffmpeg-full
fontconfig
gcc
libgcc
gdbm
gettext
glew
glibc
gmp
gpgme
gsl
icu
java
libav
libb2
libelf
libffi
libiconv
libjpeg-turbo
libpng
libspotify
libssh2
libvpx
libxml2
libxslt
live555
mesa
microsoft_gsl
mpfr
msgpack
ncurses
nettle
nlohmann_json
opencv
openssl
oracle-instantclient
pcre
physics
geant4
readline
science
math
openblas
scmccid
skalibs
tachyon
v8
vigra
vxl
wtk
zlib
misc
amdapp-sdk
mobile
node-packages
python-modules
numpy
pyserial
ruby-modules
testing
tools
analysis
cov-build
valgrind
build-managers
cmake
meson
electron
github
github-release
google-app-engine-go-sdk
misc
binutils
cflow
gdb
gnum4
help2man
iozone
kibana
libtool
lsof
saleae-logic
neoload
node-webkit
nwjs
phantomjs
sauce-connect
selenium
chromedriver
xcbuild
web
remarkjs
games
andyetitmoves
dwarf-fortress
eduke32
ezquake
factorio
nethack
oilrush
openarena
racer
scummvm
sdlmame
steam
ut2004
vessel
worldofgoo
xjump
zandronum
misc
base16-builder
cups
drivers
cnijfilter_4_00
kyocera
kyodialog3
samsung
drivers
gutenprint
hplip
emulators
os-specific
shells
bash
stdenv
tools
X11
xwinwrap
admin
bluemix-cli
google-cloud-sdk
archivers
gnutar
zpaq
bootloaders
refind
compression
bzip2
filesystems
sshfs-fuse
graphics
optipng
pngout
misc
bandwidth
coreutils
execline
findutils
grub
mongodb-compass
mprime
ocz-ssd-guru
os-prober
otfcc
s6-portable-utils
staruml
ttyrec
networking
airfield
filegive
logmein-hamachi
ngrok-2
s6-dns
s6-networking
strongswan
package-management
cargo-edit
cargo-update
checkinstall
nix
nixui
security
afl
encryptr
enpass
pcsc-scm-scl011
sshuttle
system
s6
s6-rc
storebrowse
text
gawk
gnupatch
html-tidy
xidel
typesetting
kindlegen
top-level
+4 -4
doc/languages-frameworks/rust.section.md
···
```
# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
-
{ lib, buildPlatform, buildRustCrate, fetchgit }:
-
let kernel = buildPlatform.parsed.kernel.name;
+
{ lib, stdenv, buildRustCrate, fetchgit }:
+
let kernel = stdenv.buildPlatform.parsed.kernel.name;
# ... (content skipped)
in
rec {
···
```
# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
-
{ lib, buildPlatform, buildRustCrate, fetchgit }:
-
let kernel = buildPlatform.parsed.kernel.name;
+
{ lib, stdenv, buildRustCrate, fetchgit }:
+
let kernel = stdenv.buildPlatform.parsed.kernel.name;
# ... (content skipped)
in
rec {
+1 -1
doc/old/cross.txt
···
---
{stdenv, fetchurl}:
-
assert stdenv.system == "i686-linux";
+
assert stdenv.buildPlatform.system == "i686-linux";
stdenv.mkDerivation {
name = "linux-headers-2.6.13.1-arm";
+1 -1
nixos/lib/make-system-tarball.nix
···
{ 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'
+2 -2
nixos/lib/qemu-flags.nix
···
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";
}
+1 -1
nixos/modules/installer/cd-dvd/installation-cd-base.nix
···
];
# 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";
+2 -1
nixos/modules/installer/cd-dvd/sd-image-aarch64.nix
···
];
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";
};
+2 -1
nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
···
];
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";
};
+2 -1
nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
···
];
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";
};
+2 -2
nixos/modules/installer/cd-dvd/sd-image.nix
···
{
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.
'';
···
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
+1 -1
nixos/modules/installer/netboot/netboot.nix
···
# !!! 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 ]);
+1 -1
nixos/modules/services/misc/gitit.nix
···
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));
+1 -1
nixos/modules/services/networking/vsftpd.nix
···
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}
+1 -1
nixos/modules/system/boot/luksroot.nix
···
[ "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).
+1 -1
nixos/modules/virtualisation/azure-agent.nix
···
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";
+1 -1
nixos/modules/virtualisation/brightbox-image.nix
···
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 ];
+1 -1
nixos/modules/virtualisation/google-compute-image.nix
···
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
'';
+1 -1
nixos/modules/virtualisation/virtualbox-guest.nix
···
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 ];
+5 -5
nixos/modules/virtualisation/virtualbox-image.nix
···
};
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.
'';
···
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 \
+1 -1
nixos/modules/virtualisation/vmware-guest.nix
···
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 ];
+1 -1
nixos/modules/virtualisation/xen-dom0.nix
···
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";
+2 -2
pkgs/applications/altcoins/mist.nix
···
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";
···
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 ];
+3 -3
pkgs/applications/audio/baudline/default.nix
···
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 ];
+1 -1
pkgs/applications/audio/google-musicmanager/default.nix
···
{ 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
+3 -3
pkgs/applications/audio/mpg123/default.nix
···
{ stdenv
, fetchurl, alsaLib
-
, hostPlatform
}:
stdenv.mkDerivation rec {
···
buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
-
configureFlags =
-
stdenv.lib.optional (hostPlatform ? mpg123) "--with-cpu=${hostPlatform.mpg123.cpu}";
+
configureFlags = stdenv.lib.optional
+
(stdenv.hostPlatform ? mpg123)
+
"--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
meta = {
description = "Fast console MPEG Audio Player and decoder library";
+2 -2
pkgs/applications/audio/renoise/default.nix
···
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";
···
}
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";
+2 -2
pkgs/applications/audio/transcribe/default.nix
···
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";
+1 -1
pkgs/applications/editors/eclipse/build-eclipse.nix
···
, 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;
+7 -7
pkgs/applications/editors/eclipse/default.nix
···
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";
···
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";
···
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";
···
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";
+1 -2
pkgs/applications/editors/ed/default.nix
···
{ stdenv, fetchurl, lzip
-
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation (rec {
···
maintainers = [ ];
platforms = stdenv.lib.platforms.unix;
};
-
} // stdenv.lib.optionalAttrs (hostPlatform != buildPlatform) {
+
} // stdenv.lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
# This may be moved above during a stdenv rebuild.
preConfigure = ''
configureFlagsArray+=("CC=$CC")
+1 -1
pkgs/applications/editors/jetbrains/common.nix
···
}
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
+7 -7
pkgs/applications/editors/kodestudio/default.nix
···
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
···
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)" \
+2 -2
pkgs/applications/editors/music/tuxguitar/default.nix
···
{ 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"; };
+1 -1
pkgs/applications/editors/sublime/2/default.nix
···
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;
+2 -2
pkgs/applications/editors/sublime/3/common.nix
···
++ 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";
+1 -1
pkgs/applications/editors/typora/default.nix
···
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";
+2 -3
pkgs/applications/editors/vim/default.nix
···
}
# apple frameworks
, Carbon, Cocoa
-
, buildPlatform, hostPlatform
}:
let
···
nativeBuildInputs = [ gettext pkgconfig ];
buildInputs = [ ncurses ]
-
++ stdenv.lib.optionals hostPlatform.isDarwin [ Carbon Cocoa ];
+
++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ];
configureFlags = [
"--enable-multibyte"
"--enable-nls"
-
] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [
+
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"vim_cv_toupper_broken=no"
"--with-tlib=ncurses"
"vim_cv_terminfo=yes"
+6 -6
pkgs/applications/editors/vscode/default.nix
···
"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
···
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
···
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}" \
+7 -8
pkgs/applications/graphics/ImageMagick/7.0.nix
···
, bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg
, lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp, libheif
, ApplicationServices
-
, hostPlatform
}:
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 = {
···
[ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts"
"--with-gslib"
]
-
++ lib.optionals hostPlatform.isMinGW
+
++ lib.optionals stdenv.hostPlatform.isMinGW
[ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM
;
···
[ zlib fontconfig freetype ghostscript
libpng libtiff libxml2 libheif
]
-
++ lib.optionals (!hostPlatform.isMinGW)
+
++ lib.optionals (!stdenv.hostPlatform.isMinGW)
[ openexr librsvg openjpeg ]
++ lib.optional stdenv.isDarwin ApplicationServices;
propagatedBuildInputs =
[ bzip2 freetype libjpeg lcms2 ]
-
++ lib.optionals (!hostPlatform.isMinGW)
+
++ lib.optionals (!stdenv.hostPlatform.isMinGW)
[ libX11 libXext libXt libwebp ]
;
+8 -9
pkgs/applications/graphics/ImageMagick/default.nix
···
, bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg
, lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp, fftw, libheif, libde265
, ApplicationServices
-
, hostPlatform
}:
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 = {
···
}
# Freeze version on mingw so we don't need to port the patch too often.
# FIXME: This version has multiple security vulnerabilities
-
// lib.optionalAttrs (hostPlatform.isMinGW) {
+
// lib.optionalAttrs (stdenv.hostPlatform.isMinGW) {
version = "6.9.2-0";
sha256 = "17ir8bw1j7g7srqmsz3rx780sgnc21zfn0kwyj78iazrywldx8h7";
patches = [(fetchpatch {
···
[ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts"
"--with-gslib"
]
-
++ lib.optionals (hostPlatform.isMinGW)
+
++ lib.optionals (stdenv.hostPlatform.isMinGW)
[ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM
;
···
[ zlib fontconfig freetype ghostscript
libpng libtiff libxml2 libheif libde265
]
-
++ lib.optionals (!hostPlatform.isMinGW)
+
++ lib.optionals (!stdenv.hostPlatform.isMinGW)
[ openexr librsvg openjpeg ]
++ lib.optional stdenv.isDarwin ApplicationServices;
propagatedBuildInputs =
[ bzip2 freetype libjpeg lcms2 fftw ]
-
++ lib.optionals (!hostPlatform.isMinGW)
+
++ lib.optionals (!stdenv.hostPlatform.isMinGW)
[ libX11 libXext libXt libwebp ]
;
+2 -2
pkgs/applications/graphics/gcolor2/default.nix
···
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";
···
'';
# 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
[ ];
+3 -3
pkgs/applications/graphics/sane/backends/brscan4/default.nix
···
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
+3 -3
pkgs/applications/graphics/unigine-valley/default.nix
···
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 {
+3 -3
pkgs/applications/misc/1password/default.nix
···
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";
+1 -1
pkgs/applications/misc/adobe-reader/default.nix
···
{ 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
+3 -3
pkgs/applications/misc/cura/lulzbot.nix
···
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;
+3 -3
pkgs/applications/misc/googleearth/default.nix
···
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"
+2 -2
pkgs/applications/misc/icesl/default.nix
···
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";
+1 -1
pkgs/applications/misc/kdbplus/default.nix
···
{ stdenv, requireFile, unzip, rlwrap, bash }:
-
assert (stdenv.system == "i686-linux");
+
assert (stdenv.hostPlatform.system == "i686-linux");
let
libPath = stdenv.lib.makeLibraryPath
+1 -1
pkgs/applications/misc/kiwix/default.nix
···
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; };
+4 -4
pkgs/applications/misc/playonlinux/default.nix
···
];
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 ];
···
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 ''
+1 -1
pkgs/applications/misc/rescuetime/default.nix
···
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";
+1 -1
pkgs/applications/misc/sweethome3d/default.nix
···
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}"
'';
dontStrip = true;
+1 -1
pkgs/applications/misc/sweethome3d/editors.nix
···
cp "${editorItem}/share/applications/"* $out/share/applications
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 ${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;
+3 -3
pkgs/applications/misc/xmind/default.nix
···
name = "xmind-${version}";
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";
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";
sha256 = "1j2ynhk7p3m3vd6c4mjwpnlzqgfj5c4q3zydab3nfwncwx6gaqj9";
-
} else throw "platform ${stdenv.system} not supported!";
+
} else throw "platform ${stdenv.hostPlatform.system} not supported!";
nativeBuildInputs = [ dpkg makeWrapper ];
+3 -3
pkgs/applications/networking/apache-directory-studio/default.nix
···
version = "2.0.0.v20170904-M13";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86_64.tar.gz";
sha256 = "1jfnm6m0ijk31r30hhrxxnizk742dm317iny041p29v897rma7aq";
}
-
else if stdenv.system == "i686-linux" then
+
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86.tar.gz";
sha256 = "1bxmgram42qyhrqkgp5k8770f5mjjdd4c6xl4gj09smiycm1qa4n";
}
-
else throw "Unsupported system: ${stdenv.system}";
+
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
buildInputs = [ makeWrapper ];
+3 -3
pkgs/applications/networking/bittorrentsync/generic.nix
···
arch = {
"x86_64-linux" = "x64";
"i686-linux" = "i386";
-
}.${stdenv.system} or throwSystem;
+
}.${stdenv.hostPlatform.system} or throwSystem;
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ];
-
throwSystem = throw "Unsupported system: ${stdenv.system}";
+
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
in
stdenv.mkDerivation rec {
···
"https://download-cdn.getsync.com/${version}/linux-${arch}/BitTorrent-Sync_${arch}.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
+1 -1
pkgs/applications/networking/browsers/firefox-bin/default.nix
···
"x86_64-linux" = "linux-x86_64";
};
-
arch = mozillaPlatforms.${stdenv.system};
+
arch = mozillaPlatforms.${stdenv.hostPlatform.system};
isPrefixOf = prefix: string:
builtins.substring 0 (builtins.stringLength prefix) string == prefix;
+4 -4
pkgs/applications/networking/browsers/firefox/wrapper.nix
···
jre = cfg.jre or false;
icedtea = cfg.icedtea or false;
supportsJDK =
-
stdenv.system == "i686-linux" ||
-
stdenv.system == "x86_64-linux" ||
-
stdenv.system == "armv7l-linux" ||
-
stdenv.system == "aarch64-linux";
+
stdenv.hostPlatform.system == "i686-linux" ||
+
stdenv.hostPlatform.system == "x86_64-linux" ||
+
stdenv.hostPlatform.system == "armv7l-linux" ||
+
stdenv.hostPlatform.system == "aarch64-linux";
plugins =
assert !(jre && icedtea);
+3 -3
pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix
···
let
arch =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
"x86_64"
-
else if stdenv.system == "i686-linux" then
+
else if stdenv.hostPlatform.system == "i686-linux" then
"i386"
else throw "Flash Player is not supported on this platform";
lib_suffix =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
"64"
else
"";
+2 -2
pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix
···
version = "5.41.3.0";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "${baseURL}/google-talkplugin_${version}-1_amd64.deb";
sha1 = "0bbc3d6997ba22ce712d93e5bc336c894b54fc81";
}
-
else if stdenv.system == "i686-linux" then
+
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "${baseURL}/google-talkplugin_${version}-1_i386.deb";
sha1 = "6eae0544858f85c68b0cc46d7786e990bd94f139";
+1 -1
pkgs/applications/networking/browsers/mozilla-plugins/trezor/default.nix
···
};
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = https://mytrezor.com/data/plugin/1.0.5/browser-plugin-trezor_1.0.5_amd64.deb;
sha256 = "0097h4v88yca4aayzprrh4pk03xvvj7ncz2mi83chm81gsr2v67z";
+1 -1
pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
···
name = "tor-browser-bundle-bin-${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;
allowSubstitutes = false;
+4 -4
pkgs/applications/networking/cluster/minikube/default.nix
···
{ stdenv, buildGoPackage, fetchFromGitHub, go-bindata, libvirt, qemu
-
, gpgme, makeWrapper, hostPlatform, vmnet, python
+
, gpgme, makeWrapper, vmnet, python
, docker-machine-kvm, docker-machine-kvm2
, extraDrivers ? []
}:
···
sha256 = "0c36rzsdzxf9q6l4hl506bsd4qwmw033i0k1xhqszv9agg7qjlmm";
};
-
buildInputs = [ go-bindata makeWrapper gpgme ] ++ stdenv.lib.optional hostPlatform.isDarwin vmnet;
-
subPackages = [ "cmd/minikube" ] ++ stdenv.lib.optional hostPlatform.isDarwin "cmd/drivers/hyperkit";
+
buildInputs = [ go-bindata makeWrapper gpgme ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin vmnet;
+
subPackages = [ "cmd/minikube" ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "cmd/drivers/hyperkit";
preBuild = ''
pushd go/src/${goPackagePath} >/dev/null
···
postFixup = ''
wrapProgram $bin/bin/${pname} --prefix PATH : $bin/bin:${stdenv.lib.makeBinPath binPath}
-
'' + stdenv.lib.optionalString hostPlatform.isDarwin ''
+
'' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
mv $bin/bin/hyperkit $bin/bin/docker-machine-driver-hyperkit
'';
+2 -2
pkgs/applications/networking/dropbox/default.nix
···
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.
# The client is self-updating, so the actual version may be newer.
···
arch = {
"x86_64-linux" = "x86_64";
"i686-linux" = "x86";
-
}.${stdenv.system};
+
}.${stdenv.hostPlatform.system};
installer = "https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.${arch}-${version}.tar.gz";
in
+1 -1
pkgs/applications/networking/instant-messengers/franz/default.nix
···
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
let
-
bits = if stdenv.system == "x86_64-linux" then "x64"
+
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
else "ia32";
version = "4.0.4";
+3 -3
pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix
···
version = "4.1.2";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-x64.tar.gz";
sha256 = "16dn6870bs1nfl2082ym9gwvmqb3i5sli48qprap80p7riph6k9s";
}
-
else if stdenv.system == "i686-linux" then
+
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-ia32.tar.gz";
sha256 = "145zb1l37fa2slfrrlprlwzcc5km3plxs374yhgix25mlg2afkqr";
}
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" ];
installPhase = ''
+1 -1
pkgs/applications/networking/instant-messengers/rambox/sencha/bare.nix
···
inherit version;
name = "sencha-bare-${version}";
-
src = srcs.${stdenv.system};
+
src = srcs.${stdenv.hostPlatform.system};
nativeBuildInputs = [ gzip which unzip ];
buildInputs = [ jdk ];
+2 -2
pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix
···
] + ":${stdenv.cc.cc.lib}/lib64";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb";
sha256 = "1kydf71qbz35dx4674h3nxfx8a88k620217906i54ic4qq2mgy2x";
}
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 {
name = "skypeforlinux-${version}";
+2 -2
pkgs/applications/networking/instant-messengers/slack/default.nix
···
] + ":${stdenv.cc.cc.lib}/lib64";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb";
sha256 = "095dpkwvvnwlxsglyg6wi9126wpalzi736b6g6j3bd6d93z9afah";
}
else
-
throw "Slack is not supported on ${stdenv.system}";
+
throw "Slack is not supported on ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation {
name = "slack-${version}";
+2 -2
pkgs/applications/networking/instant-messengers/wire-desktop/default.nix
···
plat = {
"i686-linux" = "i386";
"x86_64-linux" = "amd64";
-
}.${stdenv.system};
+
}.${stdenv.hostPlatform.system};
sha256 = {
"i686-linux" = "071ddh2d8wmiybwafwyb97962zj358l0fq7g2r44231653sgybvq";
"x86_64-linux" = "0qp9ms94smnm7k47b0n0jdzvnm1b7gj25hyinsfc6lghrb6jqw3r";
-
}.${stdenv.system};
+
}.${stdenv.hostPlatform.system};
in
stdenv.mkDerivation rec {
+2 -2
pkgs/applications/networking/instant-messengers/zoom-us/default.nix
···
-
{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook, env
+
{ stdenv, fetchurl, makeWrapper, makeDesktopItem, autoPatchelfHook, env
# Dynamic libraries
, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative
, qtimageformats, qtlocation, qtquickcontrols, qtquickcontrols2, qtscript, qtsvg
···
in stdenv.mkDerivation {
name = "zoom-us-${version}";
-
src = srcs.${system};
+
src = srcs.${stdenv.hostPlatform.system};
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
+2 -2
pkgs/applications/networking/insync/default.nix
···
name = "insync-${version}";
version = "1.4.5.37069";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "http://s.insynchq.com/builds/insync-portable_${version}_amd64.tar.bz2";
sha256 = "0mkqgpq4isngkj20c0ygmxf4cj975d446svhwvl3cqdrjkjm1ybd";
}
else
-
throw "${name} is not supported on ${stdenv.system}";
+
throw "${name} is not supported on ${stdenv.hostPlatform.system}";
buildInputs = [ makeWrapper ];
+2 -2
pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix
···
subVersion = "fec7941";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://edgehill.s3.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb";
sha256 = "40060aa1dc3b5187b8ed4a07b9de3427e3c5a291df98c2c82395647fa2aa4ada";
}
else
-
throw "NylasMail is not supported on ${stdenv.system}";
+
throw "NylasMail is not supported on ${stdenv.hostPlatform.system}";
propagatedBuildInputs = [
alsaLib
+1 -1
pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
···
with (import ./release_sources.nix);
let
-
arch = if stdenv.system == "i686-linux"
+
arch = if stdenv.hostPlatform.system == "i686-linux"
then "linux-i686"
else "linux-x86_64";
+1 -1
pkgs/applications/networking/p2p/frostwire/default.nix
···
cp ${ { x86_64-darwin = "desktop/lib/native/*.dylib";
x86_64-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}.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
cp -dpR ${desktopItem}/share $out
+1 -1
pkgs/applications/networking/p2p/soulseekqt/default.nix
···
name = "soulseekqt-${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;
+2 -2
pkgs/applications/networking/remote/anydesk/default.nix
···
sha256 = {
"x86_64-linux" = "0g19sac4j3m1nf400vn6qcww7prqg2p4k4zsj74i109kk1396aa2";
"i686-linux" = "1dd4ai2pclav9g872xil3x67bxy32gvz9pb3w76383pcsdh5zh45";
-
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
+
}."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported");
arch = {
"x86_64-linux" = "amd64";
"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";
+9 -8
pkgs/applications/networking/remote/putty/default.nix
···
-
{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool
+
{ stdenv, lib, fetchurl, autoconf, automake, pkgconfig, libtool
, gtk2, halibut, ncurses, perl
-
, hostPlatform, lib }:
+
}:
stdenv.mkDerivation rec {
version = "0.70";
···
sha256 = "1gmhwwj1y7b5hgkrkxpf4jddjpk9l5832zq5ibhsiicndsfs92mv";
};
-
preConfigure = lib.optionalString hostPlatform.isUnix ''
+
preConfigure = lib.optionalString stdenv.hostPlatform.isUnix ''
perl mkfiles.pl
( cd doc ; make );
sed -e '/AM_PATH_GTK(/d' \
···
-e '/AC_OUTPUT/iAM_PROG_AR' -i configure.ac
./mkauto.sh
cd unix
-
'' + lib.optionalString hostPlatform.isWindows ''
+
'' + lib.optionalString stdenv.hostPlatform.isWindows ''
cd windows
'';
TOOLPATH = stdenv.cc.targetPrefix;
-
makefile = if hostPlatform.isWindows then "Makefile.mgw" else null;
+
makefile = if stdenv.hostPlatform.isWindows then "Makefile.mgw" else null;
-
installPhase = if hostPlatform.isWindows then ''
+
installPhase = if stdenv.hostPlatform.isWindows then ''
for exe in *.exe; do
install -D $exe $out/bin/$exe
done
'' else null;
nativeBuildInputs = [ autoconf automake halibut libtool perl pkgconfig ];
-
buildInputs = []
-
++ lib.optionals hostPlatform.isUnix [ gtk2 ncurses ];
+
buildInputs = lib.optionals stdenv.hostPlatform.isUnix [
+
gtk2 ncurses
+
];
enableParallelBuilding = true;
meta = with lib; {
+2 -2
pkgs/applications/networking/resilio-sync/default.nix
···
arch = {
"x86_64-linux" = "x64";
"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 ];
in stdenv.mkDerivation rec {
···
sha256 = {
"x86_64-linux" = "0041axi9carspkfaxvyirfvsa29zz55al01x90nh93nzxvpvywsz";
"i686-linux" = "1ar36lp4f6a1z9i82g3gpak4q4ny09faqxdd59q1pvfzq25ypdhs";
-
}.${stdenv.system};
+
}.${stdenv.hostPlatform.system};
};
dontStrip = true; # Don't strip, otherwise patching the rpaths breaks
+9 -9
pkgs/applications/networking/spideroak/default.nix
···
}:
let
-
arch = if stdenv.system == "x86_64-linux" then "x64"
-
else if stdenv.system == "i686-linux" then "x86"
-
else throw "Spideroak client for: ${stdenv.system} not supported!";
+
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "x86"
+
else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
-
interpreter = if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2"
-
else if stdenv.system == "i686-linux" then "ld-linux.so.2"
-
else throw "Spideroak client for: ${stdenv.system} not supported!";
+
interpreter = if stdenv.hostPlatform.system == "x86_64-linux" then "ld-linux-x86-64.so.2"
+
else if stdenv.hostPlatform.system == "i686-linux" then "ld-linux.so.2"
+
else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
-
sha256 = if stdenv.system == "x86_64-linux" then "a88e5a8fe4a565ac500668bd53cf5784752d7c9253304ddce39ee7b01d078533"
-
else if stdenv.system == "i686-linux" then "668f3b83a974a3877d16c8743c233a427ea0a44ab84b7f9aec19a2995db66c16"
-
else throw "Spideroak client for: ${stdenv.system} not supported!";
+
sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "a88e5a8fe4a565ac500668bd53cf5784752d7c9253304ddce39ee7b01d078533"
+
else if stdenv.hostPlatform.system == "i686-linux" then "668f3b83a974a3877d16c8743c233a427ea0a44ab84b7f9aec19a2995db66c16"
+
else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
ldpath = stdenv.lib.makeLibraryPath [
fontconfig freetype glib libICE libSM
+2 -2
pkgs/applications/networking/super-productivity/default.nix
···
] + ":${stdenv.cc.cc.lib}/lib64";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity_${version}_amd64.deb";
sha256 = "0jfi0lfijnhij9jvkhxgyvq8m1jzaym8n1c7707fv3hjh1h0vxn1";
}
else
-
throw "super-productivity is not supported on ${stdenv.system}";
+
throw "super-productivity is not supported on ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation {
name = "super-productivity-${version}";
+4 -4
pkgs/applications/office/jameica/default.nix
···
version = "${_version}-${_build}";
name = "jameica-${version}";
-
swtSystem = if stdenv.system == "i686-linux" then "linux"
-
else if stdenv.system == "x86_64-linux" then "linux64"
-
else if stdenv.system == "x86_64-darwin" then "macos64"
-
else throw "Unsupported system: ${stdenv.system}";
+
swtSystem = if stdenv.hostPlatform.system == "i686-linux" then "linux"
+
else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64"
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then "macos64"
+
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
desktopItem = makeDesktopItem {
name = "jameica";
+2 -2
pkgs/applications/office/mendeley/default.nix
···
let
arch32 = "i686-linux";
-
arch = if stdenv.system == arch32
+
arch = if stdenv.hostPlatform.system == arch32
then "i386"
else "amd64";
···
version = "${shortVersion}_${arch}";
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"
else "1dzwa2cnn9xakrhhq159fhh71gw5wlbf017rrikdlia694m8akq6";
+2 -2
pkgs/applications/office/moneyplex/default.nix
···
name = "moneyplex-${version}";
version = "16.0.22424";
-
src = fetchurl (if stdenv.system == "i686-linux" then src_i686
-
else if stdenv.system == "x86_64-linux" then src_x86_64
+
src = fetchurl (if stdenv.hostPlatform.system == "i686-linux" then src_i686
+
else if stdenv.hostPlatform.system == "x86_64-linux" then src_x86_64
else throw "moneyplex requires i686-linux or x86_64-linux");
+1 -1
pkgs/applications/office/wpsoffice/default.nix
···
, zlib, libpng12, libICE, libXrender, cups }:
let
-
bits = if stdenv.system == "x86_64-linux" then "x86_64"
+
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
else "x86";
version = "10.1.0.5672";
+3 -3
pkgs/applications/science/electronics/eagle/eagle7.nix
···
version = "7.7.0";
src =
-
if stdenv.system == "i686-linux" then
+
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "ftp://ftp.cadsoft.de/eagle/program/7.7/eagle-lin32-${version}.run";
sha256 = "16fa66p77xigc7zvzfm7737mllrcs6nrgk2p7wvkjw3p9lvbz7z1";
}
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "ftp://ftp.cadsoft.de/eagle/program/7.7/eagle-lin64-${version}.run";
sha256 = "18dcn6wqph1sqh0ah98qzfi05wip8a8ifbkaq79iskbrsi8iqnrg";
}
else
-
throw "Unsupported system: ${stdenv.system}";
+
throw "Unsupported system: ${stdenv.hostPlatform.system}";
desktopItem = makeDesktopItem {
name = "eagle";
+1 -1
pkgs/applications/science/logic/isabelle/default.nix
···
rm -rf $comp/x86*
done
'' + (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
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f"
done
+1 -1
pkgs/applications/science/logic/saw-tools/default.nix
···
url = "https://github.com/GaloisInc/saw-script/releases/download";
saw-bin =
-
if stdenv.system == "i686-linux"
+
if stdenv.hostPlatform.system == "i686-linux"
then fetchurl {
url = url + "/v0.1.1-dev/saw-0.1.1-dev-2015-07-31-CentOS6-32.tar.gz";
sha256 = "126iag5nnvndi78c921z7vjrjfwcspn1hlxwwhzmqm4rvbhhr9v9";
+2 -2
pkgs/applications/science/math/mathematica/10.nix
···
let
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"
else
throw "Mathematica requires i686-linux or x86_64 linux";
···
]);
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);
phases = "unpackPhase installPhase fixupPhase";
+2 -2
pkgs/applications/science/math/mathematica/9.nix
···
let
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"
else
throw "Mathematica requires i686-linux or x86_64 linux";
···
]);
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);
phases = "unpackPhase installPhase fixupPhase";
+1 -1
pkgs/applications/science/math/mathematica/default.nix
···
]);
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);
phases = "unpackPhase installPhase fixupPhase";
+4 -4
pkgs/applications/science/math/scilab-bin/default.nix
···
badArch = throw "${name} requires i686-linux or x86_64-linux";
architecture =
-
if stdenv.system == "i686-linux" then
+
if stdenv.hostPlatform.system == "i686-linux" then
"i686"
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
"x86_64"
else
badArch;
···
src = fetchurl {
url = "https://www.scilab.org/download/${ver}/scilab-${ver}.bin.linux-${architecture}.tar.gz";
sha256 =
-
if stdenv.system == "i686-linux" then
+
if stdenv.hostPlatform.system == "i686-linux" then
"0fgjc2ak3b2qi6yin3fy50qwk2bcj0zbz1h4lyyic9n1n1qcliib"
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
"1scswlznc14vyzg0gqa1q9gcpwx05kz1sbn563463mzkdp7nd35d"
else
badArch;
+1 -1
pkgs/applications/search/recoll/default.nix
···
, ghostscript, gawk, gnugrep, gnused, gnutar, gzip, libiconv, zlib
, withGui ? true }:
-
assert stdenv.system != "powerpc-linux";
+
assert stdenv.hostPlatform.system != "powerpc-linux";
stdenv.mkDerivation rec {
ver = "1.23.7";
+2 -2
pkgs/applications/video/lightworks/default.nix
···
name = "lightworks-${version}";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "http://downloads.lwks.com/v14/lwks-14.0.0-amd64.deb";
sha256 = "66eb9f9678d979db76199f1c99a71df0ddc017bb47dfda976b508849ab305033";
}
-
else throw "${name} is not supported on ${stdenv.system}";
+
else throw "${name} is not supported on ${stdenv.hostPlatform.system}";
buildInputs = [ dpkg makeWrapper ];
+3 -3
pkgs/applications/video/mplayer/default.nix
···
let
dir = http://www.mplayerhq.hu/MPlayer/releases/codecs/;
in
-
if stdenv.system == "i686-linux" then fetchurl {
+
if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
url = "${dir}/essential-20071007.tar.bz2";
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";
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";
sha256 = "18mlj8dp4wnz42xbhdk1jlz2ygra6fbln9wyrcyvynxh96g1871z";
} else null;
+3 -4
pkgs/applications/video/omxplayer/default.nix
···
{ stdenv, fetchurl
, raspberrypifw, pcre, boost, freetype, zlib
-
, hostPlatform
}:
let
···
configurePlatforms = [];
configureFlags = [
-
"--arch=${hostPlatform.parsed.cpu.name}"
+
"--arch=${stdenv.hostPlatform.parsed.cpu.name}"
] ++ stdenv.lib.optionals stdenv.hostPlatform.isAarch32 [
# TODO be better with condition
"--cpu=arm1176jzf-s"
···
"--enable-hardcoded-tables"
"--disable-runtime-cpudetect"
"--disable-debug"
-
"--arch=${hostPlatform.parsed.cpu.name}"
-
"--target_os=${hostPlatform.parsed.kernel.name}"
+
"--arch=${stdenv.hostPlatform.parsed.cpu.name}"
+
"--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--cross-prefix=${stdenv.cc.targetPrefix}"
"--enable-cross-compile"
+2 -2
pkgs/applications/video/webtorrent_desktop/default.nix
···
version = "0.20.0";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v0.20.0/webtorrent-desktop_${version}-1_amd64.deb";
sha256 = "1kkrnbimiip5pn2nwpln35bbdda9gc3cgrjwphq4fqasbjf2781k";
}
else
-
throw "Webtorrent is not currently supported on ${stdenv.system}";
+
throw "Webtorrent is not currently supported on ${stdenv.hostPlatform.system}";
phases = [ "unpackPhase" "installPhase" ];
nativeBuildInputs = [ dpkg ];
unpackPhase = "dpkg-deb -x $src .";
+1 -1
pkgs/applications/virtualization/qemu/default.nix
···
with stdenv.lib;
let
-
audio = optionalString (hasSuffix "linux" stdenv.system) "alsa,"
+
audio = optionalString (hasSuffix "linux" stdenv.hostPlatform.system) "alsa,"
+ optionalString pulseSupport "pa,"
+ optionalString sdlSupport "sdl,";
+8 -8
pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
···
'';
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
chmod 755 ./VBoxLinuxAdditions.run
./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
cd install
-
${if stdenv.system == "i686-linux" then ''
+
${if stdenv.hostPlatform.system == "i686-linux" then ''
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
''
-
else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
+
else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions")
}
cd ../
···
# Change the interpreter for various binaries
for i in sbin/VBoxService bin/{VBoxClient,VBoxControl} other/mount.vboxsf
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
''
-
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
''
-
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
done
+2 -2
pkgs/applications/virtualization/vpcs/default.nix
···
-
{ stdenv, fetchurl, glibc, buildPlatform }:
+
{ stdenv, fetchurl, glibc }:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
···
buildPhase = ''(
cd src
-
./mk.sh ${buildPlatform.platform.kernelArch}
+
./mk.sh ${stdenv.buildPlatform.platform.kernelArch}
)'';
installPhase = ''
+2 -2
pkgs/applications/window-managers/i3/default.nix
···
# they shouldn't, and then even once that's fixed have some
# perl-related errors later on. For more, see
# 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)
! grep -q '^not ok' testcases/latest/complete-run.log
+2 -2
pkgs/applications/window-managers/way-cooler/way-cooler.nix
···
# Generated by carnix 0.6.5: carnix -o way-cooler.nix Cargo.lock
-
{ lib, buildPlatform, buildRustCrate, fetchgit }:
-
let kernel = buildPlatform.parsed.kernel.name;
+
{ lib, stdenv, buildRustCrate, fetchgit }:
+
let kernel = stdenv.buildPlatform.parsed.kernel.name;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
+2 -2
pkgs/applications/window-managers/way-cooler/wc-bg.nix
···
# Generated by carnix 0.6.5: carnix -o wc-bg.nix Cargo.lock
-
{ lib, buildPlatform, buildRustCrate, fetchgit }:
-
let kernel = buildPlatform.parsed.kernel.name;
+
{ lib, stdenv, buildRustCrate, fetchgit }:
+
let kernel = stdenv.buildPlatform.parsed.kernel.name;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
+2 -2
pkgs/applications/window-managers/way-cooler/wc-grab.nix
···
# Generated by carnix 0.6.5: carnix -o wc-grab.nix Cargo.lock
-
{ lib, buildPlatform, buildRustCrate, fetchgit }:
-
let kernel = buildPlatform.parsed.kernel.name;
+
{ lib, stdenv, buildRustCrate, fetchgit }:
+
let kernel = stdenv.hostPlatform.parsed.kernel.name;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
+2 -2
pkgs/applications/window-managers/way-cooler/wc-lock.nix
···
# Generated by carnix 0.6.5: carnix -o wc-lock.nix Cargo.lock
-
{ lib, buildPlatform, buildRustCrate, fetchgit }:
-
let kernel = buildPlatform.parsed.kernel.name;
+
{ lib, stdenv, buildRustCrate, fetchgit }:
+
let kernel = stdenv.hostPlatform.parsed.kernel.name;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
+2 -2
pkgs/build-support/build-fhs-userenv/env.nix
···
-
{ stdenv, buildEnv, writeText, pkgs, pkgsi686Linux, system }:
+
{ stdenv, buildEnv, writeText, pkgs, pkgsi686Linux }:
{ name, profile ? ""
, targetPkgs ? pkgs: [], multiPkgs ? pkgs: []
···
# /lib will link to /lib32
let
-
is64Bit = system == "x86_64-linux";
+
is64Bit = stdenv.hostPlatform.parsed.cpu.bits == 64;
isMultiBuild = multiPkgs != null && is64Bit;
isTargetBuild = !isMultiBuild;
+1 -2
pkgs/build-support/kernel/make-initrd.nix
···
# argument.
{ stdenv, perl, cpio, contents, compressor, prepend, ubootTools
-
, hostPlatform
}:
stdenv.mkDerivation rec {
name = "initrd";
builder = ./make-initrd.sh;
-
makeUInitrd = hostPlatform.platform.kernelTarget == "uImage";
+
makeUInitrd = stdenv.hostPlatform.platform.kernelTarget == "uImage";
nativeBuildInputs = [ perl cpio ]
++ stdenv.lib.optional makeUInitrd ubootTools;
+1 -1
pkgs/build-support/release/nix-build.nix
···
postPhases = postPhases ++ ["finalPhase"];
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}";
};
}
+12 -12
pkgs/build-support/rust/build-rust-crate.nix
···
# This can be useful for deploying packages with NixOps, and to share
# binary dependencies between projects.
-
{ lib, buildPlatform, stdenv, defaultCrateOverrides, fetchCrate, ncurses, rustc }:
+
{ lib, stdenv, defaultCrateOverrides, fetchCrate, ncurses, rustc }:
let makeDeps = dependencies:
(lib.concatMapStringsSep " " (dep:
···
(if dep.crateType == "lib" then
" --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}.rlib"
else
-
" --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}${buildPlatform.extensions.sharedLibrary}")
+
" --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}")
) dependencies);
# This doesn't appear to be officially documented anywhere yet.
# See https://github.com/rust-lang-nursery/rust-forge/issues/101.
-
target_os = if buildPlatform.isDarwin
+
target_os = if stdenv.hostPlatform.isDarwin
then "macos"
-
else buildPlatform.parsed.kernel.name;
+
else stdenv.hostPlatform.parsed.kernel.name;
echo_build_heading = colors: ''
echo_build_heading() {
···
export CARGO_PKG_VERSION=${crateVersion}
export CARGO_PKG_AUTHORS="${authors}"
-
export CARGO_CFG_TARGET_ARCH=${buildPlatform.parsed.cpu.name}
+
export CARGO_CFG_TARGET_ARCH=${stdenv.hostPlatform.parsed.cpu.name}
export CARGO_CFG_TARGET_OS=${target_os}
export CARGO_CFG_TARGET_FAMILY="unix"
export CARGO_CFG_UNIX=1
export CARGO_CFG_TARGET_ENV="gnu"
-
export CARGO_CFG_TARGET_ENDIAN=${if buildPlatform.parsed.cpu.significantByte.name == "littleEndian" then "little" else "big"}
-
export CARGO_CFG_TARGET_POINTER_WIDTH=${toString buildPlatform.parsed.cpu.bits}
-
export CARGO_CFG_TARGET_VENDOR=${buildPlatform.parsed.vendor.name}
+
export CARGO_CFG_TARGET_ENDIAN=${if stdenv.hostPlatform.parsed.cpu.significantByte.name == "littleEndian" then "little" else "big"}
+
export CARGO_CFG_TARGET_POINTER_WIDTH=${toString stdenv.hostPlatform.parsed.cpu.bits}
+
export CARGO_CFG_TARGET_VENDOR=${stdenv.hostPlatform.parsed.vendor.name}
export CARGO_MANIFEST_DIR="."
export DEBUG="${toString (!release)}"
export OPT_LEVEL="${toString optLevel}"
-
export TARGET="${buildPlatform.config}"
-
export HOST="${buildPlatform.config}"
+
export TARGET="${stdenv.hostPlatform.config}"
+
export HOST="${stdenv.hostPlatform.config}"
export PROFILE=${if release then "release" else "debug"}
export OUT_DIR=$(pwd)/target/build/${crateName}.out
export CARGO_PKG_VERSION_MAJOR=${builtins.elemAt version 0}
···
$BUILD_OUT_DIR $EXTRA_BUILD $EXTRA_FEATURES --color ${colors}
EXTRA_LIB=" --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}.rlib"
-
if [ -e target/deps/lib$CRATE_NAME-${metadata}${buildPlatform.extensions.sharedLibrary} ]; then
-
EXTRA_LIB="$EXTRA_LIB --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}${buildPlatform.extensions.sharedLibrary}"
+
if [ -e target/deps/lib$CRATE_NAME-${metadata}${stdenv.hostPlatform.extensions.sharedLibrary} ]; then
+
EXTRA_LIB="$EXTRA_LIB --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}${stdenv.hostPlatform.extensions.sharedLibrary}"
fi
}
+3 -3
pkgs/build-support/rust/cargo-vendor/cargo-vendor.nix
···
# Generated by carnix 0.5.2: carnix Cargo.lock -o cargo-vendor.nix
-
{ lib, buildPlatform, buildRustCrate }:
-
let kernel = buildPlatform.parsed.kernel.name;
-
abi = buildPlatform.parsed.abi.name;
+
{ lib, stdenv, buildRustCrate }:
+
let kernel = stdenv.hostPlatform.parsed.kernel.name;
+
abi = stdenv.hostPlatform.parsed.abi.name;
hasFeature = feature:
lib.lists.any
(originName: feature.${originName})
+3 -3
pkgs/build-support/rust/carnix.nix
···
# Generated by carnix 0.7.2: carnix nix
-
{ lib, buildPlatform, buildRustCrate, fetchgit }:
-
let kernel = buildPlatform.parsed.kernel.name;
-
abi = buildPlatform.parsed.abi.name;
+
{ lib, stdenv, buildRustCrate, fetchgit }:
+
let kernel = stdenv.hostPlatform.parsed.kernel.name;
+
abi = stdenv.hostPlatform.parsed.abi.name;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
+1 -1
pkgs/build-support/vm/windows/controller/default.nix
···
"-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 ++ [
"-monitor unix:$MONITOR_SOCKET,server,nowait"
+1 -1
pkgs/build-support/vm/windows/cygwin-iso/default.nix
···
};
cygwinCross = (import ../../../../.. {
-
inherit (stdenv) system;
+
localSystem = stdenv.hostPlatform;
crossSystem = {
libc = "msvcrt";
platform = {};
+11 -7
pkgs/development/arduino/arduino-core/default.nix
···
# 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
# 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)."
else
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
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.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 == "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 == "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
ncurses5 = ncurses.override { abiVersion = "5"; };
···
zlib
];
teensy_architecture =
-
lib.optionalString (stdenv.system == "x86_64-linux") "linux64"
-
+ lib.optionalString (stdenv.system == "i686-linux") "linux32"
-
+ lib.optionalString (stdenv.system == "arm-linux") "linuxarm";
+
lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "linux64"
+
+ lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "linux32"
+
+ lib.optionalString (stdenv.hostPlatform.system == "arm-linux") "linuxarm";
flavor = (if withTeensyduino then "teensyduino" else "arduino")
+ stdenv.lib.optionalString (!withGui) "-core";
+1 -1
pkgs/development/compilers/ccl/default.nix
···
};
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
stdenv.mkDerivation rec {
+2 -2
pkgs/development/compilers/clean/default.nix
···
name = "clean-2.4";
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";
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";
sha256 = "08gsa1pjl5wyzh4ah8ccfx8a7mdcn6ycsn1lzkrr9adygv1gmm7r";
})
+1 -1
pkgs/development/compilers/cmucl/binary.nix
···
{stdenv, fetchurl}:
let
-
inherit (stdenv) system;
+
inherit (stdenv.hostPlatform) system;
version = "21b";
downloadUrl = arch:
"http://common-lisp.net/project/cmucl/downloads/release/" +
+2 -2
pkgs/development/compilers/crystal/default.nix
···
"x86_64-linux" = "linux-x86_64";
"i686-linux" = "linux-i686";
"x86_64-darwin" = "darwin-x86_64";
-
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
+
}."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported");
in fetchurl {
url = "https://github.com/crystal-lang/crystal/releases/download/0.26.0/${prebuiltName}-${arch}.tar.gz";
sha256 = {
"x86_64-linux" = "1xban102yiiwmlklxvn3xp3q546bp8hlxxpakayajkhhnpl6yv45";
"i686-linux" = "1igspf1lrv7wpmz0pfrkbx8m1ykvnv4zhic53cav4nicppm2v0ic";
"x86_64-darwin" = "0hzc65ccajr0yhmvi5vbdgbzbp1gbjy56da24ds3zwwkam1ddk0k";
-
}."${stdenv.system}";
+
}."${stdenv.hostPlatform.system}";
};
unpackPhase = ''
+3 -3
pkgs/development/compilers/fpc/binary.nix
···
name = "fpc-2.6.0-binary";
src =
-
if stdenv.system == "i686-linux" then
+
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "mirror://sourceforge/project/freepascal/Linux/2.6.0/fpc-2.6.0.i386-linux.tar";
sha256 = "08yklvrfxvk59bxsd4rh1i6s3cjn0q06dzjs94h9fbq3n1qd5zdf";
}
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "mirror://sourceforge/project/freepascal/Linux/2.6.0/fpc-2.6.0.x86_64-linux.tar";
sha256 = "0k9vi75k39y735fng4jc2vppdywp82j4qhzn7x4r6qjkad64d8lx";
}
-
else throw "Not supported on ${stdenv.system}.";
+
else throw "Not supported on ${stdenv.hostPlatform.system}.";
builder = ./binary-builder.sh;
+1 -1
pkgs/development/compilers/fpc/default.nix
···
buildInputs = [ startFPC gawk ];
preConfigure =
-
if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then ''
+
if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then ''
sed -e "s@'/lib/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
sed -e "s@'/lib64/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
'' else "";
+8 -6
pkgs/development/compilers/gcc/4.8/default.nix
···
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
-
, langObjC ? targetPlatform.isDarwin
-
, langObjCpp ? targetPlatform.isDarwin
+
, langObjC ? stdenv.targetPlatform.isDarwin
+
, langObjCpp ? stdenv.targetPlatform.isDarwin
, langJava ? false
, langGo ? false
, profiledCompiler ? false
···
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
, x11Support ? langJava
, enableMultilib ? false
-
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
+
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, crossStageStatic ? false
, # Strip kills static libs of other archs (hence no cross)
-
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
+
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+
&& stdenv.targetPlatform == stdenv.hostPlatform
, gnused ? null
-
, buildPlatform, hostPlatform, targetPlatform
, buildPackages
}:
···
assert libelf != null -> zlib != null;
# Make sure we get GNU sed.
-
assert hostPlatform.isDarwin -> gnused != null;
+
assert stdenv.hostPlatform.isDarwin -> gnused != null;
# The go frontend is written in c++
assert langGo -> langCC;
···
let version = "4.8.5";
enableParallelBuilding = true;
+
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
patches = [ ]
++ optional enableParallelBuilding ../parallel-bconfig.patch
+8 -6
pkgs/development/compilers/gcc/4.9/default.nix
···
{ stdenv, targetPackages, fetchurl, noSysDirs, fetchpatch
, langC ? true, langCC ? true, langFortran ? false
-
, langObjC ? targetPlatform.isDarwin
-
, langObjCpp ? targetPlatform.isDarwin
+
, langObjC ? stdenv.targetPlatform.isDarwin
+
, langObjCpp ? stdenv.targetPlatform.isDarwin
, langJava ? false
, langGo ? false
, profiledCompiler ? false
···
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
, x11Support ? langJava
, enableMultilib ? false
-
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
+
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, crossStageStatic ? false
, # Strip kills static libs of other archs (hence no cross)
-
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
+
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+
&& stdenv.targetPlatform == stdenv.hostPlatform
, gnused ? null
-
, buildPlatform, hostPlatform, targetPlatform
, buildPackages
}:
···
assert libelf != null -> zlib != null;
# Make sure we get GNU sed.
-
assert hostPlatform.isDarwin -> gnused != null;
+
assert stdenv.hostPlatform.isDarwin -> gnused != null;
# The go frontend is written in c++
assert langGo -> langCC;
···
let version = "4.9.4";
enableParallelBuilding = true;
+
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
patches =
[ ../use-source-date-epoch.patch ]
+8 -6
pkgs/development/compilers/gcc/5/default.nix
···
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
-
, langObjC ? targetPlatform.isDarwin
-
, langObjCpp ? targetPlatform.isDarwin
+
, langObjC ? stdenv.targetPlatform.isDarwin
+
, langObjCpp ? stdenv.targetPlatform.isDarwin
, langJava ? false
, langGo ? false
, profiledCompiler ? false
···
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
, x11Support ? langJava
, enableMultilib ? false
-
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
+
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, crossStageStatic ? false
, # Strip kills static libs of other archs (hence no cross)
-
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
+
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+
&& stdenv.targetPlatform == stdenv.hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
-
, buildPlatform, hostPlatform, targetPlatform
, buildPackages
}:
···
assert libelf != null -> zlib != null;
# Make sure we get GNU sed.
-
assert hostPlatform.isDarwin -> gnused != null;
+
assert stdenv.hostPlatform.isDarwin -> gnused != null;
# The go frontend is written in c++
assert langGo -> langCC;
···
sha256 = "11zd1hgzkli3b2v70qsm2hyqppngd4616qc96lmm9zl2kl9yl32k";
enableParallelBuilding = true;
+
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
patches =
[ ../use-source-date-epoch.patch ]
+8 -6
pkgs/development/compilers/gcc/6/default.nix
···
{ stdenv, targetPackages, fetchurl, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
-
, langObjC ? targetPlatform.isDarwin
-
, langObjCpp ? targetPlatform.isDarwin
+
, langObjC ? stdenv.targetPlatform.isDarwin
+
, langObjCpp ? stdenv.targetPlatform.isDarwin
, langJava ? false
, langGo ? false
, profiledCompiler ? false
···
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
, x11Support ? langJava
, enableMultilib ? false
-
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
+
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, crossStageStatic ? false
, # Strip kills static libs of other archs (hence no cross)
-
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
+
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+
&& stdenv.targetPlatform == stdenv.hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
-
, buildPlatform, hostPlatform, targetPlatform
, buildPackages
}:
···
assert libelf != null -> zlib != null;
# Make sure we get GNU sed.
-
assert hostPlatform.isDarwin -> gnused != null;
+
assert stdenv.hostPlatform.isDarwin -> gnused != null;
# The go frontend is written in c++
assert langGo -> langCC;
···
let version = "6.4.0";
enableParallelBuilding = true;
+
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
patches =
[ ../use-source-date-epoch.patch ]
+8 -6
pkgs/development/compilers/gcc/7/default.nix
···
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
-
, langObjC ? targetPlatform.isDarwin
-
, langObjCpp ? targetPlatform.isDarwin
+
, langObjC ? stdenv.targetPlatform.isDarwin
+
, langObjCpp ? stdenv.targetPlatform.isDarwin
, langGo ? false
, profiledCompiler ? false
, staticCompiler ? false
···
, isl ? null # optional, for the Graphite optimization framework.
, zlib ? null
, enableMultilib ? false
-
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
+
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, crossStageStatic ? false
, # Strip kills static libs of other archs (hence no cross)
-
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
+
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+
&& stdenv.targetPlatform == stdenv.hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
-
, buildPlatform, hostPlatform, targetPlatform
, buildPackages
}:
···
assert libelf != null -> zlib != null;
# Make sure we get GNU sed.
-
assert hostPlatform.isDarwin -> gnused != null;
+
assert stdenv.hostPlatform.isDarwin -> gnused != null;
# The go frontend is written in c++
assert langGo -> langCC;
···
let version = "7.3.0";
enableParallelBuilding = true;
+
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
patches =
[ # https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html
+8 -6
pkgs/development/compilers/gcc/8/default.nix
···
{ stdenv, targetPackages, fetchurl, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
-
, langObjC ? targetPlatform.isDarwin
-
, langObjCpp ? targetPlatform.isDarwin
+
, langObjC ? stdenv.targetPlatform.isDarwin
+
, langObjCpp ? stdenv.targetPlatform.isDarwin
, langGo ? false
, profiledCompiler ? false
, staticCompiler ? false
···
, isl ? null # optional, for the Graphite optimization framework.
, zlib ? null
, enableMultilib ? false
-
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
+
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, crossStageStatic ? false
, # Strip kills static libs of other archs (hence no cross)
-
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
+
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+
&& stdenv.targetPlatform == stdenv.hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
-
, buildPlatform, hostPlatform, targetPlatform
, buildPackages
}:
···
assert libelf != null -> zlib != null;
# Make sure we get GNU sed.
-
assert hostPlatform.isDarwin -> gnused != null;
+
assert stdenv.hostPlatform.isDarwin -> gnused != null;
# The go frontend is written in c++
assert langGo -> langCC;
···
let version = "8.2.0";
enableParallelBuilding = true;
+
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
patches =
optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
+8 -6
pkgs/development/compilers/gcc/snapshot/default.nix
···
{ stdenv, targetPackages, fetchurl, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
-
, langObjC ? targetPlatform.isDarwin
-
, langObjCpp ? targetPlatform.isDarwin
+
, langObjC ? stdenv.targetPlatform.isDarwin
+
, langObjCpp ? stdenv.targetPlatform.isDarwin
, langGo ? false
, profiledCompiler ? false
, staticCompiler ? false
···
, isl ? null # optional, for the Graphite optimization framework.
, zlib ? null
, enableMultilib ? false
-
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
+
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, crossStageStatic ? false
, # Strip kills static libs of other archs (hence no cross)
-
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
+
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+
&& stdenv.targetPlatform == stdenv.hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, flex ? null
-
, buildPlatform, hostPlatform, targetPlatform
, buildPackages
}:
···
assert libelf != null -> zlib != null;
# Make sure we get GNU sed.
-
assert hostPlatform.isDarwin -> gnused != null;
+
assert stdenv.hostPlatform.isDarwin -> gnused != null;
# The go frontend is written in c++
assert langGo -> langCC;
···
let version = "7-20170409";
enableParallelBuilding = true;
+
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
patches =
[ ]
+5 -4
pkgs/development/compilers/ghc/7.10.3.nix
···
{ stdenv, targetPackages
-
, buildPlatform, hostPlatform, targetPlatform
# build-tools
, bootPkgs, hscolour
···
, libiconv ? null, ncurses
-
, useLLVM ? !targetPlatform.isx86
+
, useLLVM ? !stdenv.targetPlatform.isx86
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
···
enableIntegerSimple ? !(gmp.meta.available or false), gmp
, # If enabled, use -fPIC when compiling static libs.
-
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
+
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
···
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
-
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
+
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
}:
let
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
inherit (bootPkgs) ghc;
# TODO(@Ericson2314) Make unconditional
+5 -4
pkgs/development/compilers/ghc/8.0.2.nix
···
{ stdenv, targetPackages
-
, buildPlatform, hostPlatform, targetPlatform
# build-tools
, bootPkgs, hscolour
···
, libiconv ? null, ncurses
-
, useLLVM ? !targetPlatform.isx86
+
, useLLVM ? !stdenv.targetPlatform.isx86
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
···
enableIntegerSimple ? !(gmp.meta.available or false), gmp
, # If enabled, use -fPIC when compiling static libs.
-
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
+
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
···
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
-
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
+
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
}:
assert !enableIntegerSimple -> gmp != null;
let
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
inherit (bootPkgs) ghc;
# TODO(@Ericson2314) Make unconditional
+5 -4
pkgs/development/compilers/ghc/8.2.2.nix
···
{ stdenv, targetPackages
-
, buildPlatform, hostPlatform, targetPlatform
# build-tools
, bootPkgs, alex, happy, hscolour
···
, libiconv ? null, ncurses
-
, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform)
+
, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
···
enableIntegerSimple ? !(gmp.meta.available or false), gmp
, # If enabled, use -fPIC when compiling static libs.
-
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
+
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
···
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
-
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
+
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
, # Whether to backport https://phabricator.haskell.org/D4388 for
# deterministic profiling symbol names, at the cost of a slightly
# non-standard GHC API
···
assert !enableIntegerSimple -> gmp != null;
let
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
inherit (bootPkgs) ghc;
# TODO(@Ericson2314) Make unconditional
+7 -6
pkgs/development/compilers/ghc/8.4.3.nix
···
{ stdenv, targetPackages
-
, buildPlatform, hostPlatform, targetPlatform
# build-tools
, bootPkgs, alex, happy, hscolour
···
, libiconv ? null, ncurses
-
, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform)
+
, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
···
enableIntegerSimple ? !(gmp.meta.available or false), gmp
, # If enabled, use -fPIC when compiling static libs.
-
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
+
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
-
enableShared ? !targetPlatform.isWindows && !targetPlatform.useiOSPrebuilt
+
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
, # Whetherto build terminfo.
-
enableTerminfo ? !targetPlatform.isWindows
+
enableTerminfo ? !stdenv.targetPlatform.isWindows
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
-
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
+
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
, # Whether to backport https://phabricator.haskell.org/D4388 for
# deterministic profiling symbol names, at the cost of a slightly
# non-standard GHC API
···
assert !enableIntegerSimple -> gmp != null;
let
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
inherit (bootPkgs) ghc;
# TODO(@Ericson2314) Make unconditional
+7 -6
pkgs/development/compilers/ghc/8.6.1.nix
···
{ stdenv, targetPackages
-
, buildPlatform, hostPlatform, targetPlatform
# build-tools
, bootPkgs, alex, happy, hscolour
···
, libiconv ? null, ncurses
-
, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform)
+
, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
···
enableIntegerSimple ? !(gmp.meta.available or false), gmp
, # If enabled, use -fPIC when compiling static libs.
-
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
+
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
-
enableShared ? !targetPlatform.isWindows && !targetPlatform.useiOSPrebuilt
+
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
, # Whetherto build terminfo.
-
enableTerminfo ? !targetPlatform.isWindows
+
enableTerminfo ? !stdenv.targetPlatform.isWindows
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
-
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
+
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
}:
assert !enableIntegerSimple -> gmp != null;
let
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
inherit (bootPkgs) ghc;
# TODO(@Ericson2314) Make unconditional
+7 -6
pkgs/development/compilers/ghc/head.nix
···
{ stdenv, targetPackages
-
, buildPlatform, hostPlatform, targetPlatform
# build-tools
, bootPkgs, alex, happy, hscolour
···
, libiconv ? null, ncurses
-
, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform)
+
, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
···
enableIntegerSimple ? !(gmp.meta.available or false), gmp
, # If enabled, use -fPIC when compiling static libs.
-
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
+
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
-
enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt
+
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useAndroidPrebuilt
, # Whetherto build terminfo.
-
enableTerminfo ? !targetPlatform.isWindows
+
enableTerminfo ? !stdenv.targetPlatform.isWindows
, version ? "8.5.20180118"
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
-
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
+
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
}:
let
+
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
inherit (bootPkgs) ghc;
# TODO(@Ericson2314) Make unconditional
+1 -1
pkgs/development/compilers/ghcjs-ng/default.nix
···
};
bootGhcjs = haskellLib.justStaticExecutables passthru.bootPkgs.ghcjs;
-
libexec = "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin" "i686"] ["osx" "i386"] stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}";
+
libexec = "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin" "i686"] ["osx" "i386"] stdenv.buildPlatform.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}";
in stdenv.mkDerivation {
name = bootGhcjs.name;
+3 -3
pkgs/development/compilers/go/1.10.nix
···
GOOS = if stdenv.isDarwin then "darwin" else "linux";
GOARCH = if stdenv.isDarwin then "amd64"
-
else if stdenv.system == "i686-linux" then "386"
-
else if stdenv.system == "x86_64-linux" then "amd64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "386"
+
else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if stdenv.isAarch32 then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported system";
-
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
+
GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
+5 -5
pkgs/development/compilers/go/1.11.nix
···
GOOS = if stdenv.isDarwin then "darwin" else "linux";
GOARCH = if stdenv.isDarwin then "amd64"
-
else if stdenv.system == "i686-linux" then "386"
-
else if stdenv.system == "x86_64-linux" then "amd64"
-
else if stdenv.isAarch32 then "arm"
-
else if stdenv.isAarch64 then "arm64"
+
else if stdenv.targetPlatform.isi686 then "386"
+
else if stdenv.targetPlatform.isx86_64 then "amd64"
+
else if stdenv.targetPlatform.isAarch32 then "arm"
+
else if stdenv.targetPlatform.isAarch64 then "arm64"
else throw "Unsupported system";
-
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
+
GOARM = stdenv.targetPlatform.parsed.cpu.version or "";
GO386 = 387; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
+3 -3
pkgs/development/compilers/go/1.4.nix
···
GOOS = if stdenv.isDarwin then "darwin" else "linux";
GOARCH = if stdenv.isDarwin then "amd64"
-
else if stdenv.system == "i686-linux" then "386"
-
else if stdenv.system == "x86_64-linux" then "amd64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "386"
+
else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if stdenv.isAarch32 then "arm"
else throw "Unsupported system";
-
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
+
GOARM = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 0;
+3 -3
pkgs/development/compilers/go/1.9.nix
···
GOOS = if stdenv.isDarwin then "darwin" else "linux";
GOARCH = if stdenv.isDarwin then "amd64"
-
else if stdenv.system == "i686-linux" then "386"
-
else if stdenv.system == "x86_64-linux" then "amd64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "386"
+
else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if stdenv.isAarch32 then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported system";
-
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
+
GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
+2 -2
pkgs/development/compilers/jetbrains-jdk/default.nix
···
version = "152b1248.6";
name = pname + "-" + version;
-
src = if stdenv.system == "x86_64-linux" then
+
src = if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbsdk8u${version}_linux_x64.tar.gz";
sha256 = "12l81g8zhaymh4rzyfl9nyzmpkgzc7wrphm3j4plxx129yn9i7d7";
}
else
-
throw "unsupported system: ${stdenv.system}";
+
throw "unsupported system: ${stdenv.hostPlatform.system}";
nativeBuildInputs = [ file ];
+1 -1
pkgs/development/compilers/julia/default.nix
···
makeFlags =
let
-
arch = head (splitString "-" stdenv.system);
+
arch = head (splitString "-" stdenv.hostPlatform.system);
march = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}"
or (throw "unsupported architecture: ${arch}");
# Julia requires Pentium 4 (SSE2) or better
+3 -5
pkgs/development/compilers/llvm/3.9/llvm.nix
···
, zlib
, compiler-rt_src
, debugVersion ? false
-
, enableSharedLibraries ? (buildPlatform == hostPlatform)
+
, enableSharedLibraries ? (stdenv.buildPlatform == stdenv.hostPlatform)
, buildPackages
-
, buildPlatform
-
, hostPlatform
}:
-
assert (hostPlatform != buildPlatform) -> !enableSharedLibraries;
+
assert (stdenv.hostPlatform != stdenv.buildPlatform) -> !enableSharedLibraries;
let
src = fetch "llvm" "1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z";
···
++ stdenv.lib.optionals (isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
-
] ++ stdenv.lib.optionals (buildPlatform != hostPlatform) [
+
] ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildPackages.llvmPackages_39.llvm}/bin/llvm-tblgen"
] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
+3 -3
pkgs/development/compilers/mlton/default.nix
···
name = "mlton-${version}";
binSrc =
-
if stdenv.system == "i686-linux" then (fetchurl {
+
if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.x86-linux.tgz";
sha256 = "1kxjjmnw4xk2d9hpvz43w9dvyhb3025k4zvjx785c33nrwkrdn4j";
})
-
else if stdenv.system == "x86_64-linux" then (fetchurl {
+
else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.amd64-linux.tgz";
sha256 = "0fyhwxb4nmpirjbjcvk9f6w67gmn2gkz7xcgz0xbfih9kc015ygn";
})
-
else if stdenv.system == "x86_64-darwin" then (fetchurl {
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then (fetchurl {
url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.amd64-darwin.gmp-macports.tgz";
sha256 = "044wnh9hhg6if886xy805683k0as347xd37r0r1yi4x7qlxzzgx9";
})
+1 -1
pkgs/development/compilers/mozart/binary.nix
···
preferLocalBuild = true;
-
src = binaries."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}");
+
src = binaries."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}");
libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.cc
+3 -3
pkgs/development/compilers/nvidia-cg-toolkit/default.nix
···
name = "nvidia-cg-toolkit-${version}";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86_64.tgz";
sha256 = "e8ff01e6cc38d1b3fd56a083f5860737dbd2f319a39037528fb1a74a89ae9878";
}
-
else if stdenv.system == "i686-linux" then
+
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "http://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86.tgz";
sha256 = "cef3591e436f528852db0e8c145d3842f920e0c89bcfb219c466797cb7b18879";
}
-
else throw "nvidia-cg-toolkit does not support platform ${stdenv.system}";
+
else throw "nvidia-cg-toolkit does not support platform ${stdenv.hostPlatform.system}";
installPhase = ''
for b in cgc cgfxcat cginfo
+3 -3
pkgs/development/compilers/opendylan/bin.nix
···
stdenv.mkDerivation {
name = "opendylan-2013.2";
-
src = if stdenv.system == "x86_64-linux" then fetchurl {
+
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
url = https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86_64-linux.tar.bz2;
sha256 = "035brbw3hm7zrs593q4zc42yglj1gmmkw3b1r7zzlw3ks4i2lg7h";
}
-
else if stdenv.system == "i686-linux" then fetchurl {
+
else if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
url = https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86-linux.tar.bz2;
sha256 = "0c61ihvblcsjrw6ncr8x8ylhskcrqs8pajs4mg5di36cvqw12nq5";
}
-
else throw "platform ${stdenv.system} not supported.";
+
else throw "platform ${stdenv.hostPlatform.system} not supported.";
buildInputs = [ patchelf boehmgc gnused makeWrapper ];
+3 -3
pkgs/development/compilers/opendylan/default.nix
···
fetchSubmodules = true;
};
-
buildInputs = (if stdenv.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [
+
buildInputs = (if stdenv.hostPlatform.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [
opendylan-bootstrap boehmgc gnused autoconf automake perl makeWrapper
];
-
preConfigure = if stdenv.system == "i686-linux" then ''
+
preConfigure = if stdenv.hostPlatform.system == "i686-linux" then ''
mkdir -p $TMPDIR/mps
tar --strip-components=1 -xf ${mps.src} -C $TMPDIR/mps
./autogen.sh
···
'';
configureFlags = [
-
(if stdenv.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}")
+
(if stdenv.hostPlatform.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}")
];
buildPhase = "make 3-stage-bootstrap";
+1 -1
pkgs/development/compilers/openjdk/10.nix
···
* The JRE libraries are in directories that depend on the CPU.
*/
architecture =
-
if stdenv.system == "i686-linux" then
+
if stdenv.hostPlatform.system == "i686-linux" then
"i386"
else "amd64";
+3 -3
pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
···
x86_64-linux = "amd64";
armv7l-linux = "arm";
aarch64-linux = "aarch64";
-
}.${stdenv.system};
+
}.${stdenv.hostPlatform.system};
jce =
if installjce then
···
x86_64-linux = "jdk-${productVersion}u${patchVersion}-linux-x64.tar.gz";
armv7l-linux = "jdk-${productVersion}u${patchVersion}-linux-arm32-vfp-hflt.tar.gz";
aarch64-linux = "jdk-${productVersion}u${patchVersion}-linux-arm64-vfp-hflt.tar.gz";
-
}.${stdenv.system};
+
}.${stdenv.hostPlatform.system};
url = downloadUrl;
-
sha256 = sha256.${stdenv.system};
+
sha256 = sha256.${stdenv.hostPlatform.system};
};
nativeBuildInputs = [ file ]
+1 -1
pkgs/development/compilers/orc/default.nix
···
'';
# https://bugzilla.gnome.org/show_bug.cgi?id=728129#c15
-
doCheck = stdenv.system != "i686-linux"; # not sure about cross-compiling
+
doCheck = stdenv.hostPlatform.system != "i686-linux"; # not sure about cross-compiling
meta = with stdenv.lib; {
description = "The Oil Runtime Compiler";
+2 -2
pkgs/development/compilers/picat/default.nix
···
sha256 = "0wvl95gf4pjs93632g4wi0mw1glzzhjp9g4xg93ll2zxggbxibli";
};
-
ARCH = if stdenv.system == "i686-linux" then "linux32"
-
else if stdenv.system == "x86_64-linux" then "linux64"
+
ARCH = if stdenv.hostPlatform.system == "i686-linux" then "linux32"
+
else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64"
else throw "Unsupported system";
hardeningDisable = [ "format" ];
+7 -7
pkgs/development/compilers/rust/bootstrap.nix
···
};
platform =
-
if stdenv.system == "i686-linux"
+
if stdenv.hostPlatform.system == "i686-linux"
then "i686-unknown-linux-gnu"
-
else if stdenv.system == "x86_64-linux"
+
else if stdenv.hostPlatform.system == "x86_64-linux"
then "x86_64-unknown-linux-gnu"
-
else if stdenv.system == "armv7l-linux"
+
else if stdenv.hostPlatform.system == "armv7l-linux"
then "armv7-unknown-linux-gnueabihf"
-
else if stdenv.system == "aarch64-linux"
+
else if stdenv.hostPlatform.system == "aarch64-linux"
then "aarch64-unknown-linux-gnu"
-
else if stdenv.system == "i686-darwin"
+
else if stdenv.hostPlatform.system == "i686-darwin"
then "i686-apple-darwin"
-
else if stdenv.system == "x86_64-darwin"
+
else if stdenv.hostPlatform.system == "x86_64-darwin"
then "x86_64-apple-darwin"
-
else throw "missing bootstrap url for platform ${stdenv.system}";
+
else throw "missing bootstrap url for platform ${stdenv.hostPlatform.system}";
src = fetchurl {
url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
-1
pkgs/development/compilers/rust/rustc.nix
···
, targetToolchains
, doCheck ? true
, broken ? false
-
, buildPlatform, hostPlatform
}:
let
+2 -2
pkgs/development/compilers/sbcl/bootstrap.nix
···
sha256 = "05c12fmac4ha72k1ckl6i780rckd7jh4g5s5hiic7fjxnf1kx8d0";
};
};
-
cfg = options.${stdenv.system};
+
cfg = options.${stdenv.hostPlatform.system};
in
-
assert builtins.hasAttr stdenv.system options;
+
assert builtins.hasAttr stdenv.hostPlatform.system options;
stdenv.mkDerivation rec {
name = "sbcl-bootstrap-${version}";
version = cfg.version;
+1 -1
pkgs/development/compilers/sbcl/default.nix
···
{ stdenv, fetchurl, writeText, sbclBootstrap
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
-
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.system)
+
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
# Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
# Note that the created binaries still need `patchelf --set-interpreter ...`
# to get rid of ${glibc} dependency.
+8 -9
pkgs/development/haskell-modules/generic-builder.nix
···
{ stdenv, buildPackages, buildHaskellPackages, ghc
, jailbreak-cabal, hscolour, cpphs, nodejs
-
, buildPlatform, hostPlatform
}:
let
-
isCross = buildPlatform != hostPlatform;
+
isCross = stdenv.buildPlatform != stdenv.hostPlatform;
inherit (buildPackages)
fetchurl removeReferencesTo
pkgconfig coreutils gnugrep gnused glibcLocales;
···
, enableSharedExecutables ? false
, enableSharedLibraries ? (ghc.enableShared or false)
, enableDeadCodeElimination ? (!stdenv.isDarwin) # TODO: use -dead_strip for darwin
-
, enableStaticLibraries ? !hostPlatform.isWindows
-
, enableHsc2hsViaAsm ? hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4"
+
, enableStaticLibraries ? !stdenv.hostPlatform.isWindows
+
, enableHsc2hsViaAsm ? stdenv.hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4"
, extraLibraries ? [], librarySystemDepends ? [], executableSystemDepends ? []
# On macOS, statically linking against system frameworks is not supported;
# see https://developer.apple.com/library/content/qa/qa1118/_index.html
···
# --enable-static does not work on windows. This is a bug in GHC.
# --enable-static will pass -staticlib to ghc, which only works for mach-o and elf.
-
assert hostPlatform.isWindows -> enableStaticLibraries == false;
+
assert stdenv.hostPlatform.isWindows -> enableStaticLibraries == false;
let
···
(optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names")
(optionalString enableParallelBuilding "--ghc-option=-j$NIX_BUILD_CORES")
(optionalString useCpphs "--with-cpphs=${cpphs}/bin/cpphs --ghc-options=-cpp --ghc-options=-pgmP${cpphs}/bin/cpphs --ghc-options=-optP--cpp")
-
(enableFeature (enableDeadCodeElimination && !hostPlatform.isAarch32 && !hostPlatform.isAarch64 && (versionAtLeast "8.0.1" ghc.version)) "split-objs")
+
(enableFeature (enableDeadCodeElimination && !stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64 && (versionAtLeast "8.0.1" ghc.version)) "split-objs")
(enableFeature enableLibraryProfiling "library-profiling")
(optionalString ((enableExecutableProfiling || enableLibraryProfiling) && versionOlder "8" ghc.version) "--profiling-detail=${profilingDetail}")
(enableFeature enableExecutableProfiling (if versionOlder ghc.version "8" then "executable-profiling" else "profiling"))
···
] ++ optionals isGhcjs [
"--ghcjs"
] ++ optionals isCross ([
-
"--configure-option=--host=${hostPlatform.config}"
+
"--configure-option=--host=${stdenv.hostPlatform.config}"
] ++ crossCabalFlags);
setupCompileFlags = [
···
fi
''
# It is not clear why --extra-framework-dirs does work fine on Linux
-
+ optionalString (!buildPlatform.isDarwin || versionAtLeast nativeGhc.version "8.0") ''
+
+ optionalString (!stdenv.buildPlatform.isDarwin || versionAtLeast nativeGhc.version "8.0") ''
if [[ -d "$p/Library/Frameworks" ]]; then
configureFlags+=" --extra-framework-dirs=$p/Library/Frameworks"
fi
···
// optionalAttrs (postFixup != "") { inherit postFixup; }
// optionalAttrs (dontStrip) { inherit dontStrip; }
// optionalAttrs (hardeningDisable != []) { inherit hardeningDisable; }
-
// optionalAttrs (buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; }
+
// optionalAttrs (stdenv.buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; }
)
+3 -3
pkgs/development/haskell-modules/with-packages-wrapper.nix
···
-
{ lib, targetPlatform, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
+
{ lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
, withLLVM ? false
, postBuild ? ""
, ghcLibdir ? null # only used by ghcjs, when resolving plugins
···
# https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm
llvm = lib.makeBinPath
([ llvmPackages.llvm ]
-
++ lib.optional targetPlatform.isDarwin llvmPackages.clang);
+
++ lib.optional stdenv.targetPlatform.isDarwin llvmPackages.clang);
in
if paths == [] && !withLLVM then ghc else
symlinkJoin {
···
--set "NIX_${ghcCommandCaps}_LIBDIR" "${libDir}"
fi
-
'' + (lib.optionalString (targetPlatform.isDarwin && !isGhcjs && !targetPlatform.isiOS) ''
+
'' + (lib.optionalString (stdenv.targetPlatform.isDarwin && !isGhcjs && !stdenv.targetPlatform.isiOS) ''
# Work around a linker limit in macOS Sierra (see generic-builder.nix):
local packageConfDir="$out/lib/${ghc.name}/package.conf.d";
local dynamicLinksDir="$out/lib/links"
+1 -1
pkgs/development/interpreters/dart/default.nix
···
unzip
];
-
src = sources."${version}-${stdenv.system}" or (throw "unsupported version/system: ${version}/${stdenv.system}");
+
src = sources."${version}-${stdenv.hostPlatform.system}" or (throw "unsupported version/system: ${version}/${stdenv.hostPlatform.system}");
installPhase = ''
mkdir -p $out
+1 -2
pkgs/development/interpreters/guile/1.8.nix
···
{ stdenv, buildPackages
-
, buildPlatform, hostPlatform
, fetchurl, makeWrapper, gawk, pkgconfig
, libtool, readline, gmp
}:
···
"--with-threads=no";
depsBuildBuild = [ buildPackages.stdenv.cc ]
-
++ stdenv.lib.optional (hostPlatform != buildPlatform)
+
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
buildPackages.buildPackages.guile_1_8;
nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
buildInputs = [ readline libtool ];
+1 -2
pkgs/development/interpreters/guile/2.0.nix
···
{ stdenv, buildPackages
-
, buildPlatform, hostPlatform
, fetchpatch, fetchurl, makeWrapper, gawk, pkgconfig
, libffi, libtool, readline, gmp, boehmgc, libunistring
, coverageAnalysis ? null
···
setOutputFlags = false; # $dev gets into the library otherwise
depsBuildBuild = [ buildPackages.stdenv.cc ]
-
++ stdenv.lib.optional (hostPlatform != buildPlatform)
+
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
buildPackages.buildPackages.guile_2_0;
nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
buildInputs = [ readline libtool libunistring libffi ];
+1 -2
pkgs/development/interpreters/guile/default.nix
···
{ stdenv, buildPackages
-
, buildPlatform, hostPlatform
, fetchurl, makeWrapper, gawk, pkgconfig
, libffi, libtool, readline, gmp, boehmgc, libunistring
, coverageAnalysis ? null
···
setOutputFlags = false; # $dev gets into the library otherwise
depsBuildBuild = [ buildPackages.stdenv.cc ]
-
++ stdenv.lib.optional (hostPlatform != buildPlatform)
+
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
buildPackages.buildPackages.guile;
nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
buildInputs = [ readline libtool libunistring libffi ];
+11 -11
pkgs/development/interpreters/python/cpython/2.7/default.nix
···
-
{ stdenv, hostPlatform, buildPlatform, buildPackages, fetchurl
+
{ stdenv, buildPackages, fetchurl
, bzip2
, gdbm
, fetchpatch
···
# libuuid, slowing down program startup a lot).
./no-ldconfig.patch
-
] ++ optionals hostPlatform.isCygwin [
+
] ++ optionals stdenv.hostPlatform.isCygwin [
./2.5.2-ctypes-util-find_library.patch
./2.5.2-tkinter-x11.patch
./2.6.2-ssl-threads.patch
···
"--enable-shared"
"--with-threads"
"--enable-unicode=ucs${toString ucsEncoding}"
-
] ++ optionals (hostPlatform.isCygwin || hostPlatform.isAarch64) [
+
] ++ optionals (stdenv.hostPlatform.isCygwin || stdenv.hostPlatform.isAarch64) [
"--with-system-ffi"
-
] ++ optionals hostPlatform.isCygwin [
+
] ++ optionals stdenv.hostPlatform.isCygwin [
"--with-system-expat"
"ac_cv_func_bind_textdomain_codeset=yes"
] ++ optionals stdenv.isDarwin [
"--disable-toolbox-glue"
-
] ++ optionals (hostPlatform != buildPlatform) [
+
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"PYTHON_FOR_BUILD=${getBin buildPackages.python}/bin/python"
"ac_cv_buggy_getaddrinfo=no"
# Assume little-endian IEEE 754 floating point when cross compiling
···
]
# Never even try to use lchmod on linux,
# don't rely on detecting glibc-isms.
-
++ optional hostPlatform.isLinux "ac_cv_func_lchmod=no";
+
++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no";
buildInputs =
optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
[ bzip2 openssl zlib ]
-
++ optional (hostPlatform.isCygwin || hostPlatform.isAarch64) libffi
-
++ optional hostPlatform.isCygwin expat
+
++ optional (stdenv.hostPlatform.isCygwin || stdenv.hostPlatform.isAarch64) libffi
+
++ optional stdenv.hostPlatform.isCygwin expat
++ [ db gdbm ncurses sqlite readline ]
++ optionals x11Support [ tcl tk xlibsWrapper libX11 ]
++ optionals stdenv.isDarwin ([ CF ] ++ optional (configd != null) configd);
nativeBuildInputs =
-
optionals (hostPlatform != buildPlatform)
+
optionals (stdenv.hostPlatform != stdenv.buildPlatform)
[ buildPackages.stdenv.cc buildPackages.python ];
mkPaths = paths: {
···
inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH;
NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2"
-
+ optionalString hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000";
+
+ optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000";
DETERMINISTIC_BUILD = 1;
setupHook = python-setup-hook sitePackages;
···
find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i -
-
'' + optionalString hostPlatform.isCygwin ''
+
'' + optionalString stdenv.hostPlatform.isCygwin ''
cp libpython2.7.dll.a $out/lib
'';
+1 -1
pkgs/development/interpreters/spidermonkey/1.8.5.nix
···
# of polkit, which is what matters most, it does not override the allocator
# so the failure of that test does not matter much.
configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ] ++
-
stdenv.lib.optionals (stdenv.system == "armv5tel-linux") [
+
stdenv.lib.optionals (stdenv.hostPlatform.system == "armv5tel-linux") [
"--with-cpu-arch=armv5t"
"--disable-tracejit" ];
+2 -3
pkgs/development/libraries/SDL/default.nix
···
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, audiofile, libcap, libiconv
, openglSupport ? false, libGL, libGLU
, alsaSupport ? true, alsaLib
-
, x11Support ? hostPlatform == buildPlatform, libXext, libICE, libXrandr
+
, x11Support ? stdenv.hostPlatform == stdenv.buildPlatform, libXext, libICE, libXrandr
, pulseaudioSupport ? true, libpulseaudio
, OpenGL, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa
-
, hostPlatform, buildPlatform
}:
# NOTE: When editing this expression see if the same change applies to
···
++ optional stdenv.isDarwin Cocoa;
buildInputs = [ ]
-
++ optional (!hostPlatform.isMinGW) audiofile
+
++ optional (!stdenv.hostPlatform.isMinGW) audiofile
++ optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ];
configureFlags = [
+1 -1
pkgs/development/libraries/apr/default.nix
···
configureFlags =
# Including the Windows headers breaks unistd.h.
# Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2
-
stdenv.lib.optional (stdenv.system == "i686-cygwin") "ac_cv_header_windows_h=no";
+
stdenv.lib.optional (stdenv.hostPlatform.system == "i686-cygwin") "ac_cv_header_windows_h=no";
enableParallelBuilding = true;
+2 -2
pkgs/development/libraries/attr/default.nix
···
-
{ stdenv, fetchurl, gettext, hostPlatform }:
+
{ stdenv, fetchurl, gettext }:
stdenv.mkDerivation rec {
name = "attr-2.4.47";
···
installTargets = [ "install" "install-lib" "install-dev" ];
-
patches = if (hostPlatform.libc == "musl") then [ ./fix-headers-musl.patch ] else null;
+
patches = if (stdenv.hostPlatform.libc == "musl") then [ ./fix-headers-musl.patch ] else null;
postPatch = ''
for script in install-sh include/install-sh; do
+2 -2
pkgs/development/libraries/audio/libbass/default.nix
···
dontBuild = true;
installPhase =
let so =
-
if bass.so ? ${stdenv.system} then bass.so.${stdenv.system}
-
else throw "${name} not packaged for ${stdenv.system} (yet).";
+
if bass.so ? ${stdenv.hostPlatform.system} then bass.so.${stdenv.hostPlatform.system}
+
else throw "${name} not packaged for ${stdenv.hostPlatform.system} (yet).";
in ''
mkdir -p $out/{lib,include}
install -m644 -t $out/lib/ ${so}
+2 -3
pkgs/development/libraries/boehm-gc/default.nix
···
{ lib, stdenv, fetchurl, fetchpatch, pkgconfig, libatomic_ops
, enableLargeConfig ? false # doc: https://github.com/ivmai/bdwgc/blob/v7.6.6/doc/README.macros#L179
-
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation rec {
···
sha256 = "1gydwlklvci30f5dpp5ccw2p2qpph5y41r55wx9idamjlq66fbb3";
}) ] ++
# https://github.com/ivmai/bdwgc/pull/208
-
lib.optional hostPlatform.isRiscV ./riscv.patch;
+
lib.optional stdenv.hostPlatform.isRiscV ./riscv.patch;
configureFlags =
[ "--enable-cplusplus" ]
···
doCheck = true; # not cross;
# Don't run the native `strip' when cross-compiling.
-
dontStrip = hostPlatform != buildPlatform;
+
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
enableParallelBuilding = true;
+1 -1
pkgs/development/libraries/boost/1.66.nix
···
-
{ stdenv, callPackage, fetchurl, hostPlatform, buildPlatform, ... } @ args:
+
{ stdenv, callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "1.66_0";
+1 -1
pkgs/development/libraries/boost/1.67.nix
···
-
{ stdenv, callPackage, fetchurl, fetchpatch, hostPlatform, buildPlatform, ... } @ args:
+
{ stdenv, callPackage, fetchurl, fetchpatch, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "1.67_0";
+1 -1
pkgs/development/libraries/boost/1.68.nix
···
-
{ stdenv, callPackage, fetchurl, fetchpatch, hostPlatform, buildPlatform, ... } @ args:
+
{ stdenv, callPackage, fetchurl, fetchpatch, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "1.68_0";
+19 -19
pkgs/development/libraries/boost/generic.nix
···
{ stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv
, which
-
, buildPackages, buildPlatform, hostPlatform
+
, buildPackages
, toolset ? /**/ if stdenv.cc.isClang then "clang"
else null
, enableRelease ? true
, enableDebug ? false
, enableSingleThreaded ? false
, enableMultiThreaded ? true
-
, enableShared ? !(hostPlatform.libc == "msvcrt") # problems for now
+
, enableShared ? !(stdenv.hostPlatform.libc == "msvcrt") # problems for now
, enableStatic ? !enableShared
, enablePython ? false
, enableNumpy ? false
···
assert enableShared || enableStatic;
# Python isn't supported when cross-compiling
-
assert enablePython -> hostPlatform == buildPlatform;
+
assert enablePython -> stdenv.hostPlatform == stdenv.buildPlatform;
assert enableNumpy -> enablePython;
with stdenv.lib;
···
"-sEXPAT_LIBPATH=${expat.out}/lib"
# TODO: make this unconditional
-
] ++ optionals (hostPlatform != buildPlatform) [
-
"address-model=${toString hostPlatform.parsed.cpu.bits}"
-
"architecture=${toString hostPlatform.parsed.cpu.family}"
-
"binary-format=${toString hostPlatform.parsed.kernel.execFormat.name}"
-
"target-os=${toString hostPlatform.parsed.kernel.name}"
+
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+
"address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}"
+
"architecture=${toString stdenv.hostPlatform.parsed.cpu.family}"
+
"binary-format=${toString stdenv.hostPlatform.parsed.kernel.execFormat.name}"
+
"target-os=${toString stdenv.hostPlatform.parsed.kernel.name}"
# adapted from table in boost manual
# https://www.boost.org/doc/libs/1_66_0/libs/context/doc/html/context/architectures.html
-
"abi=${if hostPlatform.parsed.cpu.family == "arm" then "aapcs"
-
else if hostPlatform.isWindows then "ms"
-
else if hostPlatform.isMips then "o32"
+
"abi=${if stdenv.hostPlatform.parsed.cpu.family == "arm" then "aapcs"
+
else if stdenv.hostPlatform.isWindows then "ms"
+
else if stdenv.hostPlatform.isMips then "o32"
else "sysv"}"
] ++ optional (link != "static") "runtime-link=${runtime-link}"
++ optional (variant == "release") "debug-symbols=off"
++ optional (toolset != null) "toolset=${toolset}"
-
++ optional (mpi != null || hostPlatform != buildPlatform) "--user-config=user-config.jam"
-
++ optionals (hostPlatform.libc == "msvcrt") [
+
++ optional (mpi != null || stdenv.hostPlatform != stdenv.buildPlatform) "--user-config=user-config.jam"
+
++ optionals (stdenv.hostPlatform.libc == "msvcrt") [
"threadapi=win32"
]);
···
inherit src;
-
patchFlags = optionalString (hostPlatform.libc == "msvcrt") "-p0";
+
patchFlags = optionalString (stdenv.hostPlatform.libc == "msvcrt") "-p0";
patches = patches
++ optional stdenv.isDarwin ./darwin-no-system-python.patch
-
++ optional (hostPlatform.libc == "msvcrt") (fetchurl {
+
++ optional (stdenv.hostPlatform.libc == "msvcrt") (fetchurl {
url = "https://svn.boost.org/trac/boost/raw-attachment/tickaet/7262/"
+ "boost-mingw.patch";
sha256 = "0s32kwll66k50w6r5np1y5g907b7lcpsjhfgr7rsw7q5syhzddyj";
···
cat << EOF >> user-config.jam
using mpi : ${mpi}/bin/mpiCC ;
EOF
-
'' + optionalString (hostPlatform != buildPlatform) ''
+
'' + optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
cat << EOF >> user-config.jam
using gcc : cross : ${stdenv.cc.targetPrefix}c++ ;
EOF
···
nativeBuildInputs = [ which buildPackages.stdenv.cc ];
buildInputs = [ expat zlib bzip2 libiconv ]
-
++ optional (hostPlatform == buildPlatform) icu
+
++ optional (stdenv.hostPlatform == stdenv.buildPlatform) icu
++ optional stdenv.isDarwin fixDarwinDylibNames
++ optional enablePython python
++ optional enableNumpy python.pkgs.numpy;
···
"--includedir=$(dev)/include"
"--libdir=$(out)/lib"
] ++ optional enablePython "--with-python=${python.interpreter}"
-
++ [ (if hostPlatform == buildPlatform then "--with-icu=${icu.dev}" else "--without-icu") ]
+
++ [ (if stdenv.hostPlatform == stdenv.buildPlatform then "--with-icu=${icu.dev}" else "--without-icu") ]
++ optional (toolset != null) "--with-toolset=${toolset}";
buildPhase = ''
···
# Make boost header paths relative so that they are not runtime dependencies
cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \
-exec sed '1i#line 1 "{}"' -i '{}' \;
-
'' + optionalString (hostPlatform.libc == "msvcrt") ''
+
'' + optionalString (stdenv.hostPlatform.libc == "msvcrt") ''
$RANLIB "$out/lib/"*.a
'';
+1 -1
pkgs/development/libraries/bootil/default.nix
···
platform =
if stdenv.isLinux then "linux"
else if stdenv.isDarwin then "macosx"
-
else throw "unrecognized system ${stdenv.system}";
+
else throw "unrecognized system ${stdenv.hostPlatform.system}";
buildInputs = [ premake4 ];
+3 -3
pkgs/development/libraries/c-ares/default.nix
···
-
{ targetPlatform, stdenv, fetchurl, writeTextDir }:
+
{ stdenv, fetchurl, writeTextDir }:
let self =
stdenv.mkDerivation rec {
···
)
set_property(TARGET c-ares::cares APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(c-ares::cares PROPERTIES
-
IMPORTED_LOCATION_RELEASE "${self}/lib/libcares${targetPlatform.extensions.sharedLibrary}"
-
IMPORTED_SONAME_RELEASE "libcares${targetPlatform.extensions.sharedLibrary}"
+
IMPORTED_LOCATION_RELEASE "${self}/lib/libcares${stdenv.targetPlatform.extensions.sharedLibrary}"
+
IMPORTED_SONAME_RELEASE "libcares${stdenv.targetPlatform.extensions.sharedLibrary}"
)
add_library(c-ares::cares_shared INTERFACE IMPORTED)
set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")
+4 -3
pkgs/development/libraries/crypto++/default.nix
···
sha256 = "1yk7jyf4va9425cg05llskpls2jm7n3jwy2hj5jm74zkr4mwpvl7";
};
-
patches = with stdenv;
-
lib.optional (system != "i686-cygwin") ./dll.patch
-
++ lib.optional isDarwin ./GNUmakefile-darwin.patch;
+
patches = stdenv.lib.concatLists [
+
(stdenv.lib.optional (stdenv.hostPlatform.system != "i686-cygwin") ./dll.patch)
+
(stdenv.lib.optional stdenv.hostPlatform.isDarwin ./GNUmakefile-darwin.patch)
+
];
configurePhase = let
+2 -3
pkgs/development/libraries/ffmpeg-full/default.nix
···
{ stdenv, fetchurl, pkgconfig, perl, texinfo, yasm
-
, hostPlatform
/*
* Licensing options (yes some are listed twice, filters and such are not listed)
*/
···
configurePlatforms = [];
configureFlags = [
-
"--target_os=${hostPlatform.parsed.kernel.name}"
-
"--arch=${hostPlatform.parsed.cpu.name}"
+
"--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
+
"--arch=${stdenv.hostPlatform.parsed.cpu.name}"
/*
* Licensing flags
*/
+2 -3
pkgs/development/libraries/ffmpeg/generic.nix
···
, alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
, libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr
, x264, x265, xvidcore, zlib, libopus
-
, hostPlatform
, openglSupport ? false, libGLU_combined ? null
# Build options
, runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
···
configurePlatforms = [];
configureFlags = [
-
"--arch=${hostPlatform.parsed.cpu.name}"
-
"--target_os=${hostPlatform.parsed.kernel.name}"
+
"--arch=${stdenv.hostPlatform.parsed.cpu.name}"
+
"--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
# License
"--enable-gpl"
"--enable-version3"
+2 -3
pkgs/development/libraries/fontconfig/2.10.nix
···
{ stdenv, fetchurl, pkgconfig, freetype, expat
-
, hostPlatform
}:
stdenv.mkDerivation rec {
···
buildInputs = [ expat ];
configureFlags = [
-
"--with-arch=${hostPlatform.parsed.cpu.name}"
+
"--with-arch=${stdenv.hostPlatform.parsed.cpu.name}"
"--sysconfdir=/etc"
"--with-cache-dir=/var/cache/fontconfig"
"--disable-docs"
"--with-default-fonts="
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
-
"--with-arch=${hostPlatform.parsed.cpu.name}"
+
"--with-arch=${stdenv.hostPlatform.parsed.cpu.name}"
];
enableParallelBuilding = true;
+2 -3
pkgs/development/libraries/fontconfig/default.nix
···
{ stdenv, substituteAll, fetchurl
, pkgconfig, freetype, expat, libxslt, gperf, dejavu_fonts
-
, hostPlatform
}:
/** Font configuration scheme
···
buildInputs = [ expat ];
configureFlags = [
-
"--with-arch=${hostPlatform.parsed.cpu.name}"
+
"--with-arch=${stdenv.hostPlatform.parsed.cpu.name}"
"--with-cache-dir=/var/cache/fontconfig" # otherwise the fallback is in $out/
"--disable-docs"
# just <1MB; this is what you get when loading config fails for some reason
"--with-default-fonts=${dejavu_fonts.minimal}"
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
-
"--with-arch=${hostPlatform.parsed.cpu.name}"
+
"--with-arch=${stdenv.hostPlatform.parsed.cpu.name}"
];
enableParallelBuilding = true;
+12 -12
pkgs/development/libraries/gcc/libgcc/default.nix
···
-
{ stdenvNoLibs, buildPackages, buildPlatform, hostPlatform
+
{ stdenvNoLibs, buildPackages
, gcc, glibc
, libiberty
}:
···
# Drop in libiberty, as external builds are not expected
+ ''
(
-
mkdir -p build-${buildPlatform.config}/libiberty/
-
cd build-${buildPlatform.config}/libiberty/
+
mkdir -p build-${stdenvNoLibs.buildPlatform.config}/libiberty/
+
cd build-${stdenvNoLibs.buildPlatform.config}/libiberty/
ln -s ${buildPackages.libiberty}/lib/libiberty.a ./
)
''
···
''
# Preparing to configure + build libgcc itself
+ ''
-
mkdir -p "$buildRoot/gcc/${hostPlatform.config}/libgcc"
-
cd "$buildRoot/gcc/${hostPlatform.config}/libgcc"
+
mkdir -p "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc"
+
cd "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc"
configureScript=$sourceRoot/configure
chmod +x "$configureScript"
···
'';
gccConfigureFlags = [
-
"--build=${buildPlatform.config}"
-
"--host=${buildPlatform.config}"
-
"--target=${hostPlatform.config}"
+
"--build=${stdenvNoLibs.buildPlatform.config}"
+
"--host=${stdenvNoLibs.buildPlatform.config}"
+
"--target=${stdenvNoLibs.hostPlatform.config}"
"--disable-bootstrap"
"--disable-multilib" "--with-multilib-list="
···
"--disable-vtable-verify"
"--with-system-zlib"
-
] ++ stdenvNoLibs.lib.optional (hostPlatform.libc == "glibc")
+
] ++ stdenvNoLibs.lib.optional (stdenvNoLibs.hostPlatform.libc == "glibc")
"--with-glibc-version=${glibc.version}";
configurePlatforms = [ "build" "host" ];
···
makeFlags = [ "MULTIBUILDTOP:=../" ];
postInstall = ''
-
moveToOutput "lib/gcc/${hostPlatform.config}/${version}/include" "$dev"
+
moveToOutput "lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}/include" "$dev"
mkdir -p "$out/lib" "$dev/include"
-
ln -s "$out/lib/gcc/${hostPlatform.config}/${version}"/* "$out/lib"
-
ln -s "$dev/lib/gcc/${hostPlatform.config}/${version}/include"/* "$dev/include/"
+
ln -s "$out/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}"/* "$out/lib"
+
ln -s "$dev/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}/include"/* "$dev/include/"
'';
}
+2 -2
pkgs/development/libraries/gdbm/default.nix
···
-
{ stdenv, lib, buildPlatform, fetchurl }:
+
{ stdenv, lib, fetchurl }:
stdenv.mkDerivation rec {
name = "gdbm-1.17";
···
# Disable dbmfetch03.at test because it depends on unlink()
# failing on a link in a chmod -w directory, which cygwin
# apparently allows.
-
postPatch = lib.optionalString buildPlatform.isCygwin ''
+
postPatch = lib.optionalString stdenv.buildPlatform.isCygwin ''
substituteInPlace tests/Makefile.in --replace \
'_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la' \
'_LDADD = ../compat/libgdbm_compat.la ../src/libgdbm.la'
+4 -4
pkgs/development/libraries/gettext/default.nix
···
-
{ stdenv, lib, hostPlatform, fetchurl, libiconv, xz }:
+
{ stdenv, lib, fetchurl, libiconv, xz }:
stdenv.mkDerivation rec {
name = "gettext-${version}";
···
substituteInPlace gettext-tools/projects/KDE/trigger --replace "/bin/pwd" pwd
substituteInPlace gettext-tools/projects/GNOME/trigger --replace "/bin/pwd" pwd
substituteInPlace gettext-tools/src/project-id --replace "/bin/pwd" pwd
-
'' + lib.optionalString hostPlatform.isCygwin ''
+
'' + lib.optionalString stdenv.hostPlatform.isCygwin ''
sed -i -e "s/\(cldr_plurals_LDADD = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in
sed -i -e "s/\(libgettextsrc_la_LDFLAGS = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in
'';
nativeBuildInputs = [ xz xz.bin ];
# HACK, see #10874 (and 14664)
-
buildInputs = stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv;
+
buildInputs = stdenv.lib.optional (!stdenv.isLinux && !stdenv.hostPlatform.isCygwin) libiconv;
setupHooks = [
../../../build-support/setup-hooks/role.bash
./gettext-setup-hook.sh
];
-
gettextNeedsLdflags = hostPlatform.libc != "glibc" && !hostPlatform.isMusl;
+
gettextNeedsLdflags = stdenv.hostPlatform.libc != "glibc" && !stdenv.hostPlatform.isMusl;
enableParallelBuilding = true;
+2 -3
pkgs/development/libraries/glew/1.10.nix
···
{ stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi
-
, buildPlatform, hostPlatform
, AGL ? null
}:
···
patchPhase = ''
sed -i 's|lib64|lib|' config/Makefile.linux
-
${optionalString (hostPlatform != buildPlatform) ''
+
${optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile
''}
'';
···
'';
makeFlags = [
-
"SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel.name}"
+
"SYSTEM=${if stdenv.hostPlatform.isMinGW then "mingw" else stdenv.hostPlatform.parsed.kernel.name}"
];
meta = with stdenv.lib; {
+2 -3
pkgs/development/libraries/glew/default.nix
···
{ stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi
-
, buildPlatform, hostPlatform
}:
with stdenv.lib;
···
patchPhase = ''
sed -i 's|lib64|lib|' config/Makefile.linux
substituteInPlace config/Makefile.darwin --replace /usr/local "$out"
-
${optionalString (hostPlatform != buildPlatform) ''
+
${optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile
''}
'';
···
'';
makeFlags = [
-
"SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel.name}"
+
"SYSTEM=${if stdenv.hostPlatform.isMinGW then "mingw" else stdenv.hostPlatform.parsed.kernel.name}"
];
enableParallelBuilding = true;
+5 -6
pkgs/development/libraries/glibc/common.nix
···
*/
{ stdenv, lib
-
, buildPlatform, hostPlatform
, buildPackages
, fetchurl ? null
, linuxHeaders ? null
···
else "--disable-profile")
] ++ lib.optionals withLinuxHeaders [
"--enable-kernel=3.2.0" # can't get below with glibc >= 2.26
-
] ++ lib.optionals (hostPlatform != buildPlatform) [
-
(if hostPlatform.platform.gcc.float or (hostPlatform.parsed.abi.float or "hard") == "soft"
+
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+
(if stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft"
then "--without-fp"
else "--with-fp")
"--with-__thread"
-
] ++ lib.optionals (hostPlatform == buildPlatform && hostPlatform.isAarch32) [
+
] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [
"--host=arm-linux-gnueabi"
"--build=arm-linux-gnueabi"
···
}
-
'' + lib.optionalString (hostPlatform != buildPlatform) ''
+
'' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig"
cat > config.cache << "EOF"
···
} // meta;
}
-
// lib.optionalAttrs (hostPlatform != buildPlatform) {
+
// lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
preInstall = null; # clobber the native hook
dontStrip = true;
+2 -2
pkgs/development/libraries/gmp/6.x.nix
···
-
{ stdenv, fetchurl, m4, cxx ? !hostPlatform.useAndroidPrebuilt
-
, buildPackages, hostPlatform
+
{ stdenv, fetchurl, m4, cxx ? !stdenv.hostPlatform.useAndroidPrebuilt
+
, buildPackages
, withStatic ? false }:
let inherit (stdenv.lib) optional optionalString; in
+4 -1
pkgs/development/libraries/gpgme/default.nix
···
, withPython ? false, swig2 ? null, python ? null
}:
-
let inherit (stdenv) lib system; in
+
let
+
inherit (stdenv) lib;
+
inherit (stdenv.hostPlatform) system;
+
in
stdenv.mkDerivation rec {
name = "gpgme-${version}";
+1 -1
pkgs/development/libraries/gsl/default.nix
···
];
# https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html
-
doCheck = stdenv.system != "i686-linux" && stdenv.system != "aarch64-linux";
+
doCheck = stdenv.hostPlatform.system != "i686-linux" && stdenv.hostPlatform.system != "aarch64-linux";
meta = {
description = "The GNU Scientific Library, a large numerical library";
+2 -2
pkgs/development/libraries/icu/base.nix
···
{ version, sha256, patches ? [], patchFlags ? "" }:
{ stdenv, fetchurl, fixDarwinDylibNames
# Cross-compiled icu4c requires a build-root of a native compile
-
, buildRootOnly ? false, nativeBuildRoot, buildPlatform, hostPlatform
+
, buildRootOnly ? false, nativeBuildRoot
}:
let
···
configureFlags = [ "--disable-debug" ]
++ stdenv.lib.optional (stdenv.isFreeBSD || stdenv.isDarwin) "--enable-rpath"
-
++ stdenv.lib.optional (buildPlatform != hostPlatform) "--with-cross-build=${nativeBuildRoot}";
+
++ stdenv.lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--with-cross-build=${nativeBuildRoot}";
enableParallelBuilding = true;
+1 -1
pkgs/development/libraries/java/jzmq/default.nix
···
buildInputs = [ zeromq3 jdk ];
preConfigure = ''
-
${if stdenv.system == "x86_64-darwin" then
+
${if stdenv.hostPlatform.system == "x86_64-darwin" then
'' sed -i -e 's~/Headers~/include~' -e 's~_JNI_INC_SUBDIRS=\".*\"~_JNI_INC_SUBDIRS=\"darwin\"~' configure
'' else ""}
'';
+1 -1
pkgs/development/libraries/java/swt/default.nix
···
sha256 = "00k1mfbncvyh8klgmk0891w8jwnd5niqb16j1j8yacrm2smmlb05"; };
};
-
metadata = assert platformMap ? ${stdenv.system}; platformMap.${stdenv.system};
+
metadata = assert platformMap ? ${stdenv.hostPlatform.system}; platformMap.${stdenv.hostPlatform.system};
in stdenv.mkDerivation rec {
version = "4.5";
+2 -3
pkgs/development/libraries/libav/default.nix
···
, SDL # only for avplay in $bin, adds nontrivial closure to it
, enableGPL ? true # ToDo: some additional default stuff may need GPL
, enableUnfree ? faacSupport
-
, hostPlatform
}:
assert faacSupport -> enableUnfree;
···
configurePlatforms = [];
configureFlags = assert stdenv.lib.all (x: x!=null) buildInputs; [
-
"--arch=${hostPlatform.parsed.cpu.name}"
-
"--target_os=${hostPlatform.parsed.kernel.name}"
+
"--arch=${stdenv.hostPlatform.parsed.cpu.name}"
+
"--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
#"--enable-postproc" # it's now a separate package in upstream
"--disable-avserver" # upstream says it's in a bad state
"--enable-avplay"
+2 -2
pkgs/development/libraries/libb2/default.nix
···
-
{ stdenv, hostPlatform, fetchurl, autoconf, automake, libtool }:
+
{ stdenv, fetchurl, autoconf, automake, libtool }:
stdenv.mkDerivation rec {
name = "libb2-${version}";
···
./autogen.sh
'';
-
configureFlags = stdenv.lib.optional hostPlatform.isx86 "--enable-fat=yes";
+
configureFlags = stdenv.lib.optional stdenv.hostPlatform.isx86 "--enable-fat=yes";
nativeBuildInputs = [ autoconf automake libtool ];
+3 -4
pkgs/development/libraries/libelf/default.nix
···
{ stdenv
, fetchurl, autoreconfHook, gettext
-
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation rec {
···
configureFlags = []
# Configure check for dynamic lib support is broken, see
# http://lists.uclibc.org/pipermail/uclibc-cvs/2005-August/019383.html
-
++ stdenv.lib.optional (hostPlatform != buildPlatform) "mr_cv_target_elf=yes"
+
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "mr_cv_target_elf=yes"
# Libelf's custom NLS macros fail to determine the catalog file extension
# on Darwin, so disable NLS for now.
-
++ stdenv.lib.optional hostPlatform.isDarwin "--disable-nls";
+
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "--disable-nls";
nativeBuildInputs = [ gettext ]
# Need to regenerate configure script with newer version in order to pass
# "mr_cv_target_elf=yes", but `autoreconfHook` brings in `makeWrapper`
# which doesn't work with the bootstrapTools bash, so can only do this
# for cross builds when `stdenv.shell` is a newer bash.
-
++ stdenv.lib.optional (hostPlatform != buildPlatform) autoreconfHook;
+
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) autoreconfHook;
meta = {
description = "ELF object file access library";
+5 -5
pkgs/development/libraries/libffi/default.nix
···
{ stdenv, fetchurl, fetchpatch
-
, buildPlatform, hostPlatform, autoreconfHook
+
, autoreconfHook
# libffi is used in darwin stdenv
# we cannot run checks within it
···
url = https://src.fedoraproject.org/rpms/libffi/raw/ccffc1700abfadb0969495a6e51b964117fc03f6/f/libffi-aarch64-rhbz1174037.patch;
sha256 = "1vpirrgny43hp0885rswgv3xski8hg7791vskpbg3wdjdpb20wbc";
})
-
++ stdenv.lib.optional hostPlatform.isMusl (fetchpatch {
+
++ stdenv.lib.optional stdenv.hostPlatform.isMusl (fetchpatch {
name = "gnu-linux-define.patch";
url = "https://git.alpinelinux.org/cgit/aports/plain/main/libffi/gnu-linux-define.patch?id=bb024fd8ec6f27a76d88396c9f7c5c4b5800d580";
sha256 = "11pvy3xkhyvnjfyy293v51f1xjy3x0azrahv1nw9y9mw8bifa2j2";
})
-
++ stdenv.lib.optional hostPlatform.isRiscV (fetchpatch {
+
++ stdenv.lib.optional stdenv.hostPlatform.isRiscV (fetchpatch {
name = "riscv-support.patch";
url = https://github.com/sorear/libffi-riscv/commit/e46492e8bb1695a19bc1053ed869e6c2bab02ff2.patch;
sha256 = "1vl1vbvdkigs617kckxvj8j4m2cwg62kxm1clav1w5rnw9afxg0y";
···
outputs = [ "out" "dev" "man" "info" ];
-
nativeBuildInputs = stdenv.lib.optional hostPlatform.isRiscV autoreconfHook;
+
nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isRiscV autoreconfHook;
configureFlags = [
"--with-gcc-arch=generic" # no detection of -march= or -mtune=
···
inherit doCheck;
-
dontStrip = hostPlatform != buildPlatform; # Don't run the native `strip' when cross-compiling.
+
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; # Don't run the native `strip' when cross-compiling.
# Install headers and libs in the right places.
postFixup = ''
+2 -3
pkgs/development/libraries/libiconv/default.nix
···
{ fetchurl, stdenv, lib
-
, buildPlatform, hostPlatform
, enableStatic ? stdenv.hostPlatform.useAndroidPrebuilt
, enableShared ? !stdenv.hostPlatform.useAndroidPrebuilt
}:
-
# assert !stdenv.isLinux || hostPlatform != buildPlatform; # TODO: improve on cross
+
# assert !stdenv.hostPlatform.isLinux || stdenv.hostPlatform != stdenv.buildPlatform; # TODO: improve on cross
stdenv.mkDerivation rec {
name = "libiconv-${version}";
···
];
postPatch =
-
lib.optionalString ((hostPlatform != buildPlatform && hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc)
+
lib.optionalString ((stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc)
''
sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h
''
+1 -2
pkgs/development/libraries/libjpeg-turbo/default.nix
···
{ stdenv, fetchurl, nasm
-
, hostPlatform
}:
stdenv.mkDerivation rec {
···
}; # github releases still need autotools, surprisingly
patches =
-
stdenv.lib.optional (hostPlatform.libc or null == "msvcrt")
+
stdenv.lib.optional (stdenv.hostPlatform.libc or null == "msvcrt")
./mingw-boolean.patch;
outputs = [ "bin" "dev" "out" "man" "doc" ];
+2 -4
pkgs/development/libraries/libpng/12.nix
···
-
{ stdenv, fetchurl, zlib
-
, buildPlatform, hostPlatform
-
}:
+
{ stdenv, fetchurl, zlib }:
-
assert hostPlatform == buildPlatform -> zlib != null;
+
assert stdenv.hostPlatform == stdenv.buildPlatform -> zlib != null;
stdenv.mkDerivation rec {
name = "libpng-1.2.57";
+6 -6
pkgs/development/libraries/libspotify/default.nix
···
let
version = "12.1.51";
-
isLinux = (stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux");
+
isLinux = (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "i686-linux");
in
-
if (stdenv.system != "x86_64-linux" && stdenv.system != "x86_64-darwin" && stdenv.system != "i686-linux")
+
if (stdenv.hostPlatform.system != "x86_64-linux" && stdenv.hostPlatform.system != "x86_64-darwin" && stdenv.hostPlatform.system != "i686-linux")
then throw "Check https://developer.spotify.com/technologies/libspotify/ for a tarball for your system and add it here"
else stdenv.mkDerivation {
name = "libspotify-${version}";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-x86_64-release.tar.gz";
sha256 = "0n0h94i4xg46hfba95n3ypah93crwb80bhgsg00f6sms683lx8a3";
}
-
else if stdenv.system == "x86_64-darwin" then
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then
fetchurl {
url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Darwin-universal.zip";
sha256 = "1gcgrc8arim3hnszcc886lmcdb4iigc08abkaa02l6gng43ky1c0";
}
-
else if stdenv.system == "i686-linux" then
+
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-i686-release.tar.gz";
sha256 = "1bjmn64gbr4p9irq426yap4ipq9rb84zsyhjjr7frmmw22xb86ll";
···
# darwin-specific
-
buildInputs = stdenv.lib.optional (stdenv.system == "x86_64-darwin") unzip;
+
buildInputs = stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") unzip;
# linux-specific
installFlags = stdenv.lib.optionalString (isLinux)
+2 -4
pkgs/development/libraries/libssh2/default.nix
···
-
{ stdenv, fetchurlBoot, openssl, zlib, windows
-
, hostPlatform
-
}:
+
{ stdenv, fetchurlBoot, openssl, zlib, windows }:
stdenv.mkDerivation rec {
name = "libssh2-1.8.0";
···
outputs = [ "out" "dev" "devdoc" ];
buildInputs = [ openssl zlib ]
-
++ stdenv.lib.optional hostPlatform.isMinGW windows.mingw_w64;
+
++ stdenv.lib.optional stdenv.hostPlatform.isMinGW windows.mingw_w64;
meta = {
description = "A client-side C library implementing the SSH2 protocol";
+9 -10
pkgs/development/libraries/libvpx/default.nix
···
{ stdenv, fetchFromGitHub, perl, yasm
-
, hostPlatform
, vp8DecoderSupport ? true # VP8 decoder
, vp8EncoderSupport ? true # VP8 encoder
, vp9DecoderSupport ? true # VP9 decoder
···
# libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
# See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
# Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14
-
"--force-target=${hostPlatform.config}${
-
if hostPlatform.isDarwin then
-
if hostPlatform.osxMinVersion == "10.10" then "14"
-
else if hostPlatform.osxMinVersion == "10.9" then "13"
-
else if hostPlatform.osxMinVersion == "10.8" then "12"
-
else if hostPlatform.osxMinVersion == "10.7" then "11"
-
else if hostPlatform.osxMinVersion == "10.6" then "10"
-
else if hostPlatform.osxMinVersion == "10.5" then "9"
+
"--force-target=${stdenv.hostPlatform.config}${
+
if stdenv.hostPlatform.isDarwin then
+
if stdenv.hostPlatform.osxMinVersion == "10.10" then "14"
+
else if stdenv.hostPlatform.osxMinVersion == "10.9" then "13"
+
else if stdenv.hostPlatform.osxMinVersion == "10.8" then "12"
+
else if stdenv.hostPlatform.osxMinVersion == "10.7" then "11"
+
else if stdenv.hostPlatform.osxMinVersion == "10.6" then "10"
+
else if stdenv.hostPlatform.osxMinVersion == "10.5" then "9"
else "8"
else ""}-gcc"
-
(if hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
+
(if stdenv.hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
] # Experimental features
++ optional experimentalSpatialSvcSupport "--enable-spatial-svc"
++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
+9 -10
pkgs/development/libraries/libvpx/git.nix
···
{ stdenv, fetchgit, perl, yasm
-
, hostPlatform
, vp8DecoderSupport ? true # VP8 decoder
, vp8EncoderSupport ? true # VP8 encoder
, vp9DecoderSupport ? true # VP9 decoder
···
# libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
# See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
# Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14
-
"--force-target=${hostPlatform.config}${
-
if hostPlatform.isDarwin then
-
if hostPlatform.osxMinVersion == "10.10" then "14"
-
else if hostPlatform.osxMinVersion == "10.9" then "13"
-
else if hostPlatform.osxMinVersion == "10.8" then "12"
-
else if hostPlatform.osxMinVersion == "10.7" then "11"
-
else if hostPlatform.osxMinVersion == "10.6" then "10"
-
else if hostPlatform.osxMinVersion == "10.5" then "9"
+
"--force-target=${stdenv.hostPlatform.config}${
+
if stdenv.hostPlatform.isDarwin then
+
if stdenv.hostPlatform.osxMinVersion == "10.10" then "14"
+
else if stdenv.hostPlatform.osxMinVersion == "10.9" then "13"
+
else if stdenv.hostPlatform.osxMinVersion == "10.8" then "12"
+
else if stdenv.hostPlatform.osxMinVersion == "10.7" then "11"
+
else if stdenv.hostPlatform.osxMinVersion == "10.6" then "10"
+
else if stdenv.hostPlatform.osxMinVersion == "10.5" then "9"
else "8"
else ""}-gcc"
-
(if hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
+
(if stdenv.hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
] # Experimental features
++ optional experimentalSpatialSvcSupport "--enable-spatial-svc"
++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
+3 -4
pkgs/development/libraries/libxml2/default.nix
···
{ stdenv, lib, fetchurl, fetchpatch
, zlib, xz, python2, findXMLCatalogs
-
, buildPlatform, hostPlatform
-
, pythonSupport ? buildPlatform == hostPlatform
+
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
, icuSupport ? false, icu ? null
-
, enableShared ? hostPlatform.libc != "msvcrt"
+
, enableShared ? stdenv.hostPlatform.libc != "msvcrt"
, enableStatic ? !enableShared,
}:
···
enableParallelBuilding = true;
doCheck = (stdenv.hostPlatform == stdenv.buildPlatform) && !stdenv.isDarwin &&
-
hostPlatform.libc != "musl";
+
stdenv.hostPlatform.libc != "musl";
preInstall = lib.optionalString pythonSupport
''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"'';
+2 -3
pkgs/development/libraries/libxslt/default.nix
···
{ stdenv, fetchurl, libxml2, findXMLCatalogs, python2
-
, buildPlatform, hostPlatform
, cryptoSupport ? false
-
, pythonSupport ? buildPlatform == hostPlatform
+
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
}:
assert pythonSupport -> python2 != null;
···
patches = stdenv.lib.optional stdenv.isSunOS ./patch-ah.patch;
# fixes: can't build x86_64-unknown-cygwin shared library unless -no-undefined is specified
-
postPatch = optionalString hostPlatform.isCygwin ''
+
postPatch = optionalString stdenv.hostPlatform.isCygwin ''
substituteInPlace tests/plugins/Makefile.in \
--replace 'la_LDFLAGS =' 'la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS)'
'';
+1 -1
pkgs/development/libraries/live555/default.nix
···
i686-linux = "linux";
x86_64-linux = "linux-64bit";
aarch64-linux = "linux-64bit";
-
}.${stdenv.system}}
+
}.${stdenv.hostPlatform.system}}
'';
installPhase = ''
+1 -1
pkgs/development/libraries/mesa/default.nix
···
with stdenv.lib;
-
if ! lists.elem stdenv.system platforms.mesaPlatforms then
+
if ! lists.elem stdenv.hostPlatform.system platforms.mesaPlatforms then
throw "unsupported platform for Mesa"
else
+1 -2
pkgs/development/libraries/microsoft_gsl/default.nix
···
{ stdenv, fetchgit, cmake
-
, hostPlatform, buildPlatform
}:
let
-
nativeBuild = hostPlatform == buildPlatform;
+
nativeBuild = stdenv.hostPlatform == stdenv.buildPlatform;
in
stdenv.mkDerivation rec {
name = "microsoft_gsl-${version}";
+3 -5
pkgs/development/libraries/mpfr/default.nix
···
-
{ stdenv, fetchurl, gmp
-
, hostPlatform
-
}:
+
{ stdenv, fetchurl, gmp }:
stdenv.mkDerivation rec {
version = "4.0.1";
···
propagatedBuildInputs = [ gmp ];
configureFlags =
-
stdenv.lib.optional hostPlatform.isSunOS "--disable-thread-safe" ++
-
stdenv.lib.optional hostPlatform.is64bit "--with-pic";
+
stdenv.lib.optional stdenv.hostPlatform.isSunOS "--disable-thread-safe" ++
+
stdenv.lib.optional stdenv.hostPlatform.is64bit "--with-pic";
doCheck = true; # not cross;
+1 -2
pkgs/development/libraries/msgpack/generic.nix
···
{ stdenv, cmake
, version, src, patches ? [ ]
-
, hostPlatform
, ...
}:
···
cmakeFlags = []
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
"-DMSGPACK_BUILD_EXAMPLES=OFF"
-
++ stdenv.lib.optional (hostPlatform.libc == "msvcrt")
+
++ stdenv.lib.optional (stdenv.hostPlatform.libc == "msvcrt")
"-DCMAKE_SYSTEM_NAME=Windows"
;
+3 -4
pkgs/development/libraries/ncurses/default.nix
···
, gpm
-
, buildPlatform, hostPlatform
, buildPackages
}:
···
] ++ lib.optional unicode "--enable-widec"
++ lib.optional (!withCxx) "--without-cxx"
++ lib.optional (abiVersion == "5") "--with-abi-version=5"
-
++ lib.optionals hostPlatform.isWindows [
+
++ lib.optionals stdenv.hostPlatform.isWindows [
"--enable-sp-funcs"
"--enable-term-driver"
];
···
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [
pkgconfig
-
] ++ lib.optionals (buildPlatform != hostPlatform) [
+
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
buildPackages.ncurses
];
buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;
···
moveToOutput "bin/infotocap" "$out"
'';
-
preFixup = lib.optionalString (!hostPlatform.isCygwin && !enableStatic) ''
+
preFixup = lib.optionalString (!stdenv.hostPlatform.isCygwin && !enableStatic) ''
rm "$out"/lib/*.a
'';
+2 -2
pkgs/development/libraries/nettle/generic.nix
···
nativeBuildInputs = [ gnum4 ];
propagatedBuildInputs = [ gmp ];
-
doCheck = (stdenv.system != "i686-cygwin" && !stdenv.isDarwin);
+
doCheck = (stdenv.hostPlatform.system != "i686-cygwin" && !stdenv.isDarwin);
enableParallelBuilding = true;
-
patches = stdenv.lib.optional (stdenv.system == "i686-cygwin")
+
patches = stdenv.lib.optional (stdenv.hostPlatform.system == "i686-cygwin")
./cygwin.patch;
meta = with stdenv.lib; {
+1 -2
pkgs/development/libraries/nlohmann_json/default.nix
···
{ stdenv, fetchFromGitHub, cmake
-
, hostPlatform
}:
stdenv.mkDerivation rec {
···
cmakeFlags = [
"-DBuildTests=${if doCheck then "ON" else "OFF"}"
-
] ++ stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [
+
] ++ stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [
"-DCMAKE_SYSTEM_NAME=Windows"
];
+3 -3
pkgs/development/libraries/opencv/3.x.nix
···
sha256 = "1ys9mshfpm8iy8h4ml792gnqrq959dsrcv26axx14niivxyjbji8";
} + "/ippicv";
files = let name = platform : "ippicv_2017u3_${platform}_general_20180518.tgz"; in
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
{ ${name "lnx_intel64"} = "b7cc351267db2d34b9efa1cd22ff0572"; }
-
else if stdenv.system == "i686-linux" then
+
else if stdenv.hostPlatform.system == "i686-linux" then
{ ${name "lnx_ia32"} = "ea72de74dae3c604eb6348395366e78e"; }
-
else if stdenv.system == "x86_64-darwin" then
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then
{ ${name "mac_intel64"} = "3ae52b9be0fe73dd45bc5e9429cd3732"; }
else
throw "ICV is not available for this platform (or not yet supported by this package)";
+14 -15
pkgs/development/libraries/openssl/default.nix
···
{ stdenv, fetchurl, buildPackages, perl
-
, buildPlatform, hostPlatform
, withCryptodev ? false, cryptodevHeaders
, enableSSL2 ? false
, static ? false
···
(args.patches or [])
++ [ ./nix-ssl-cert-file.patch ]
++ optional (versionOlder version "1.1.0")
-
(if hostPlatform.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch)
-
++ optional (versionOlder version "1.0.2" && hostPlatform.isDarwin)
+
(if stdenv.hostPlatform.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch)
+
++ optional (versionOlder version "1.0.2" && stdenv.hostPlatform.isDarwin)
./darwin-arch.patch;
postPatch = ''
···
outputs = [ "bin" "dev" "out" "man" ];
setOutputFlags = false;
-
separateDebugInfo = hostPlatform.isLinux;
+
separateDebugInfo = stdenv.hostPlatform.isLinux;
nativeBuildInputs = [ perl ];
buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders;
···
configureScript = {
"x86_64-darwin" = "./Configure darwin64-x86_64-cc";
"x86_64-solaris" = "./Configure solaris64-x86_64-gcc";
-
}.${hostPlatform.system} or (
-
if hostPlatform == buildPlatform
+
}.${stdenv.hostPlatform.system} or (
+
if stdenv.hostPlatform == stdenv.buildPlatform
then "./config"
-
else if hostPlatform.isMinGW
+
else if stdenv.hostPlatform.isMinGW
then "./Configure mingw${optionalString
-
(hostPlatform.parsed.cpu.bits != 32)
-
(toString hostPlatform.parsed.cpu.bits)}"
-
else if hostPlatform.isLinux
-
then "./Configure linux-generic${toString hostPlatform.parsed.cpu.bits}"
-
else if hostPlatform.isiOS
-
then "./Configure ios${toString hostPlatform.parsed.cpu.bits}-cross"
+
(stdenv.hostPlatform.parsed.cpu.bits != 32)
+
(toString stdenv.hostPlatform.parsed.cpu.bits)}"
+
else if stdenv.hostPlatform.isLinux
+
then "./Configure linux-generic${toString stdenv.hostPlatform.parsed.cpu.bits}"
+
else if stdenv.hostPlatform.isiOS
+
then "./Configure ios${toString stdenv.hostPlatform.parsed.cpu.bits}-cross"
else
-
throw "Not sure what configuration to use for ${hostPlatform.config}"
+
throw "Not sure what configuration to use for ${stdenv.hostPlatform.config}"
);
configureFlags = [
···
"-DHAVE_CRYPTODEV"
"-DUSE_CRYPTODEV_DIGESTS"
] ++ stdenv.lib.optional enableSSL2 "enable-ssl2"
-
++ stdenv.lib.optional (versionAtLeast version "1.1.0" && hostPlatform.isAarch64) "no-afalgeng";
+
++ stdenv.lib.optional (versionAtLeast version "1.1.0" && stdenv.hostPlatform.isAarch64) "no-afalgeng";
makeFlags = [ "MANDIR=$(man)/share/man" ];
+3 -3
pkgs/development/libraries/oracle-instantclient/default.nix
···
sha256 = hash;
});
-
throwSystem = throw "Unsupported system: ${stdenv.system}";
+
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
arch = {
"x86_64-linux" = "linux.x64";
"x86_64-darwin" = "macos.x64";
-
}."${stdenv.system}" or throwSystem;
+
}."${stdenv.hostPlatform.system}" or throwSystem;
srcs = {
"x86_64-linux" = [
···
(requireSource "sdk" arch version "2" "e0befca9c4e71ebc9f444957ffa70f01aeeec5976ea27c40406471b04c34848b")
(requireSource "sqlplus" arch version "2" "d147cbb5b2a954fdcb4b642df4f0bd1153fd56e0f56e7fa301601b4f7e2abe0e") ]
++ optional odbcSupport (requireSource "odbc" arch version "2" "1805c1ab6c8c5e8df7bdcc35d7f2b94c329ecf4dff9bde55d5f9b159ecd8b64e");
-
}."${stdenv.system}" or throwSystem;
+
}."${stdenv.hostPlatform.system}" or throwSystem;
extLib = stdenv.hostPlatform.extensions.sharedLibrary;
in stdenv.mkDerivation rec {
+3 -4
pkgs/development/libraries/pcre/default.nix
···
{ stdenv, fetchurl
, pcre, windows ? null
-
, buildPlatform, hostPlatform
, variant ? null
}:
···
outputs = [ "bin" "dev" "out" "doc" "man" ];
-
configureFlags = optional (!hostPlatform.isRiscV) "--enable-jit" ++ [
+
configureFlags = optional (!stdenv.hostPlatform.isRiscV) "--enable-jit" ++ [
"--enable-unicode-properties"
"--disable-cpp"
]
++ optional (variant != null) "--enable-${variant}";
-
buildInputs = optional (hostPlatform.libc == "msvcrt") windows.mingw_w64_pthreads;
+
buildInputs = optional (stdenv.hostPlatform.libc == "msvcrt") windows.mingw_w64_pthreads;
# https://bugs.exim.org/show_bug.cgi?id=2173
patches = [ ./stacksize-detection.patch ];
···
patchShebangs RunGrepTest
'';
-
doCheck = !(with hostPlatform; isCygwin || isFreeBSD) && hostPlatform == buildPlatform;
+
doCheck = !(with stdenv.hostPlatform; isCygwin || isFreeBSD) && stdenv.hostPlatform == stdenv.buildPlatform;
# XXX: test failure on Cygwin
# we are running out of stack on both freeBSDs on Hydra
+1 -1
pkgs/development/libraries/physics/geant4/fetch.nix
···
{ stdenv, fetchurl }:
let
-
fetch = { version, src ? builtins.getAttr stdenv.system sources, sources ? null }:
+
fetch = { version, src ? builtins.getAttr stdenv.hostPlatform.system sources, sources ? null }:
{
inherit version src;
};
+1 -2
pkgs/development/libraries/readline/6.2.nix
···
{ fetchurl, stdenv, ncurses
-
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation (rec {
···
//
# Don't run the native `strip' when cross-compiling.
-
(if hostPlatform != buildPlatform
+
(if stdenv.hostPlatform != stdenv.buildPlatform
then { dontStrip = true; }
else { }))
+2 -4
pkgs/development/libraries/readline/6.3.nix
···
-
{ fetchurl, stdenv, ncurses
-
, buildPlatform, hostPlatform
-
}:
+
{ fetchurl, stdenv, ncurses }:
stdenv.mkDerivation rec {
name = "readline-6.3p08";
···
import ./readline-6.3-patches.nix patch);
# Don't run the native `strip' when cross-compiling.
-
dontStrip = hostPlatform != buildPlatform;
+
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
bash_cv_func_sigsetjmp = if stdenv.isCygwin then "missing" else null;
meta = with stdenv.lib; {
+1 -2
pkgs/development/libraries/readline/7.0.nix
···
{ fetchurl, stdenv, ncurses
-
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation rec {
···
++ upstreamPatches;
# Don't run the native `strip' when cross-compiling.
-
dontStrip = hostPlatform != buildPlatform;
+
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
bash_cv_func_sigsetjmp = if stdenv.isCygwin then "missing" else null;
meta = with stdenv.lib; {
+3 -3
pkgs/development/libraries/science/math/openblas/default.nix
···
let
config =
-
configs.${stdenv.system}
-
or (throw "unsupported system: ${stdenv.system}");
+
configs.${stdenv.hostPlatform.system}
+
or (throw "unsupported system: ${stdenv.hostPlatform.system}");
in
let
blas64 =
if blas64_ != null
then blas64_
-
else hasPrefix "x86_64" stdenv.system;
+
else hasPrefix "x86_64" stdenv.hostPlatform.system;
in
stdenv.mkDerivation rec {
name = "openblas-${version}";
+2 -2
pkgs/development/libraries/scmccid/default.nix
···
stdenv.mkDerivation rec {
name = "scmccid-5.0.11";
-
src = if stdenv.system == "i686-linux" then (fetchurl {
+
src = if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux.tar.gz";
sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm";
})
-
else if stdenv.system == "x86_64-linux" then (fetchurl {
+
else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux_x64.tar.gz";
sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i";
})
+1 -1
pkgs/development/libraries/skalibs/default.nix
···
# Explicitly setting target ensures code can be compiled against a skalibs
# binary built on a different version of darwin.
# http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
-
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
+
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/skalibs
+9 -9
pkgs/development/libraries/tachyon/default.nix
···
export USEPNG=" -DUSEPNG"
export PNGLIB=" -lpng -lz"
'';
-
arch = if stdenv.system == "x86_64-linux" then "linux-64-thr" else
-
if stdenv.system == "i686-linux" then "linux-thr" else
-
if stdenv.system == "aarch64-linux" then "linux-arm-thr" else
-
if stdenv.system == "armv7l-linux" then "linux-arm-thr" else
-
if stdenv.system == "x86_64-darwin" then "macosx-thr" else
-
if stdenv.system == "i686-darwin" then "macosx-64-thr" else
-
if stdenv.system == "i686-cygwin" then "win32" else
-
if stdenv.system == "x86_64-freebsd" then "bsd" else
-
if stdenv.system == "x686-freebsd" then "bsd" else
+
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "linux-64-thr" else
+
if stdenv.hostPlatform.system == "i686-linux" then "linux-thr" else
+
if stdenv.hostPlatform.system == "aarch64-linux" then "linux-arm-thr" else
+
if stdenv.hostPlatform.system == "armv7l-linux" then "linux-arm-thr" else
+
if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx-thr" else
+
if stdenv.hostPlatform.system == "i686-darwin" then "macosx-64-thr" else
+
if stdenv.hostPlatform.system == "i686-cygwin" then "win32" else
+
if stdenv.hostPlatform.system == "x86_64-freebsd" then "bsd" else
+
if stdenv.hostPlatform.system == "x686-freebsd" then "bsd" else
throw "Don't know what arch to select for tachyon build";
makeFlags = "${arch}";
patches = [
+1 -1
pkgs/development/libraries/v8/3.14.nix
···
installPhase = ''
install -vD out/Release/d8 "$out/bin/d8"
-
${if stdenv.system == "x86_64-darwin" then ''
+
${if stdenv.hostPlatform.system == "x86_64-darwin" then ''
install -vD out/Release/lib.target/libv8.dylib "$out/lib/libv8.dylib"
'' else ''
install -vD out/Release/lib.target/libv8.so "$out/lib/libv8.so"
+1 -1
pkgs/development/libraries/vigra/default.nix
···
preConfigure = "cmakeFlags+=\" -DVIGRANUMPY_INSTALL_DIR=$out/lib/${python.libPrefix}/site-packages\"";
cmakeFlags = [ "-DWITH_OPENEXR=1" ]
-
++ stdenv.lib.optionals (stdenv.system == "x86_64-linux")
+
++ stdenv.lib.optionals (stdenv.hostPlatform.system == "x86_64-linux")
[ "-DCMAKE_CXX_FLAGS=-fPIC" "-DCMAKE_C_FLAGS=-fPIC" ];
enableParallelBuilding = true;
+1 -1
pkgs/development/libraries/vxl/default.nix
···
# in stdenv linux headers
# BUILD_BRL fails to find open()
cmakeFlags = "-DBUILD_TESTING=OFF -DBUILD_OUL=OFF -DBUILD_BRL=OFF -DBUILD_CONTRIB=OFF "
-
+ (if stdenv.system == "x86_64-linux" then
+
+ (if stdenv.hostPlatform.system == "x86_64-linux" then
"-DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC"
else
"");
+1 -1
pkgs/development/libraries/wtk/default.nix
···
{ stdenv, requireFile, unzip, xorg }:
-
assert stdenv.system == "i686-linux";
+
assert stdenv.hostPlatform.system == "i686-linux";
stdenv.mkDerivation rec {
name = "sun-java-wtk-2.5.2_01";
+8 -9
pkgs/development/libraries/zlib/default.nix
···
{ stdenv
, fetchurl
-
, buildPlatform, hostPlatform
, static ? false
}:
···
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1";
};
-
patches = stdenv.lib.optional hostPlatform.isCygwin ./disable-cygwin-widechar.patch;
+
patches = stdenv.lib.optional stdenv.hostPlatform.isCygwin ./disable-cygwin-widechar.patch;
-
postPatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
+
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure \
--replace '/usr/bin/libtool' 'ar' \
--replace 'AR="libtool"' 'AR="ar"' \
···
# jww (2015-01-06): Sometimes this library install as a .so, even on
# Darwin; others time it installs as a .dylib. I haven't yet figured out
# what causes this difference.
-
+ stdenv.lib.optionalString hostPlatform.isDarwin ''
+
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
for file in $out/lib/*.so* $out/lib/*.dylib* ; do
install_name_tool -id "$file" $file
done
''
# Non-typical naming confuses libtool which then refuses to use zlib's DLL
# in some cases, e.g. when compiling libpng.
-
+ stdenv.lib.optionalString (hostPlatform.libc == "msvcrt") ''
+
+ stdenv.lib.optionalString (stdenv.hostPlatform.libc == "msvcrt") ''
ln -s zlib1.dll $out/bin/libz.dll
'';
# As zlib takes part in the stdenv building, we don't want references
# to the bootstrap-tools libgcc (as uses to happen on arm/mips)
-
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!hostPlatform.isDarwin) "-static-libgcc";
+
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.hostPlatform.isDarwin) "-static-libgcc";
-
dontStrip = hostPlatform != buildPlatform && static;
+
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform && static;
configurePlatforms = [];
-
installFlags = stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [
+
installFlags = stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [
"BINARY_PATH=$(out)/bin"
"INCLUDE_PATH=$(dev)/include"
"LIBRARY_PATH=$(out)/lib"
···
makeFlags = [
"PREFIX=${stdenv.cc.targetPrefix}"
-
] ++ stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [
+
] ++ stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [
"-f" "win32/Makefile.gcc"
] ++ stdenv.lib.optionals (!static) [
"SHARED_MODE=1"
+2 -2
pkgs/development/misc/amdapp-sdk/default.nix
···
let
-
bits = if stdenv.system == "x86_64-linux" then "64"
+
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "64"
else "32";
-
arch = if stdenv.system == "x86_64-linux" then "x86_64"
+
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
else "x86";
src_info = {
+14 -14
pkgs/development/mobile/androidenv/androidndk-pkgs.nix
···
-
{ lib, hostPlatform, targetPlatform
+
{ lib
, makeWrapper
, runCommand, wrapBintoolsWith, wrapCCWith
, buildAndroidndk, androidndk, targetAndroidndkPkgs
···
}.${config} or
(throw "Android NDK doesn't support ${config}, as far as we know");
-
hostInfo = ndkInfoFun hostPlatform;
-
targetInfo = ndkInfoFun targetPlatform;
+
hostInfo = ndkInfoFun stdenv.hostPlatform;
+
targetInfo = ndkInfoFun stdenv.targetPlatform;
in
···
mkdir -p $out/bin
for prog in ${ndkBinDir}/${targetInfo.triple}-*; do
prog_suffix=$(basename $prog | sed 's/${targetInfo.triple}-//')
-
ln -s $prog $out/bin/${targetPlatform.config}-$prog_suffix
+
ln -s $prog $out/bin/${stdenv.targetPlatform.config}-$prog_suffix
done
'';
···
bintools = binutils;
libc = targetAndroidndkPkgs.libraries;
extraBuildCommands = ''
-
echo "-D__ANDROID_API__=${targetPlatform.sdkVer}" >> $out/nix-support/cc-cflags
+
echo "-D__ANDROID_API__=${stdenv.targetPlatform.sdkVer}" >> $out/nix-support/cc-cflags
''
-
+ lib.optionalString targetPlatform.isAarch32 (let
-
p = targetPlatform.platform.gcc or {}
-
// targetPlatform.parsed.abi;
+
+ lib.optionalString stdenv.targetPlatform.isAarch32 (let
+
p = stdenv.targetPlatform.platform.gcc or {}
+
// stdenv.targetPlatform.parsed.abi;
flags = lib.concatLists [
(lib.optional (p ? arch) "-march=${p.arch}")
(lib.optional (p ? cpu) "-mcpu=${p.cpu}")
···
];
in ''
sed -E -i \
-
$out/bin/${targetPlatform.config}-cc \
-
$out/bin/${targetPlatform.config}-c++ \
-
$out/bin/${targetPlatform.config}-gcc \
-
$out/bin/${targetPlatform.config}-g++ \
+
$out/bin/${stdenv.targetPlatform.config}-cc \
+
$out/bin/${stdenv.targetPlatform.config}-c++ \
+
$out/bin/${stdenv.targetPlatform.config}-gcc \
+
$out/bin/${stdenv.targetPlatform.config}-g++ \
-e '130i extraBefore+=(-Wl,--fix-cortex-a8)' \
-e 's|^(extraBefore=)\(\)$|\1(${builtins.toString flags})|'
'')
···
libraries =
let
includePath = if buildAndroidndk.version == "10e" then
-
"${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/include/"
+
"${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${stdenv.hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/include/"
else
"${buildAndroidndk}/libexec/${buildAndroidndk.name}/sysroot/usr/include";
-
libPath = "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/lib/";
+
libPath = "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${stdenv.hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/lib/";
in
runCommand "bionic-prebuilt" {} ''
mkdir -p $out
+2 -2
pkgs/development/mobile/androidenv/androidndk.nix
···
name = "android-ndk-r${version}";
inherit version;
-
src = if stdenv.system == "x86_64-linux" then fetchurl {
+
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
url = "https://dl.google.com/android/repository/${name}-linux-x86_64.zip";
inherit sha256;
-
} else throw "platform ${stdenv.system} not supported!";
+
} else throw "platform ${stdenv.hostPlatform.system} not supported!";
phases = "buildPhase";
+3 -3
pkgs/development/mobile/androidenv/androidndk_r8e.nix
···
stdenv.mkDerivation rec {
name = "android-ndk-r8e";
-
src = if stdenv.system == "i686-linux"
+
src = if stdenv.hostPlatform.system == "i686-linux"
then fetchurl {
url = "http://dl.google.com/android/ndk/${name}-linux-x86.tar.bz2";
sha256 = "c2c4e0c8b3037149a0f5dbb08d72f814a52af4da9fff9d80328c675457e95a98";
}
-
else if stdenv.system == "x86_64-linux" then fetchurl {
+
else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
url = "http://dl.google.com/android/ndk/${name}-linux-x86_64.tar.bz2";
sha256 = "093gf55zbh38p2gk5bdykj1vg9p5l774wjdzw5mhk4144jm1wdq7";
}
-
else throw "platform ${stdenv.system} not supported!";
+
else throw "platform ${stdenv.hostPlatform.system} not supported!";
phases = "buildPhase";
+9 -9
pkgs/development/mobile/androidenv/androidsdk.nix
···
name = "android-sdk-${version}";
version = "25.2.5";
-
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
+
src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
then fetchurl {
url = "https://dl.google.com/android/repository/tools_r${version}-linux.zip";
sha256 = "0gnk49pkwy4m0nqwm1xnf3w4mfpi9w0kk7841xlawpwbkj0icxap";
}
-
else if stdenv.system == "x86_64-darwin" then fetchurl {
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
url = "http://dl.google.com/android/repository/tools_r${version}-macosx.zip";
sha256 = "0yg7wjmyw70xsh8k4hgbqb5rilam2a94yc8dwbh7fjwqcmpxgwqb";
}
-
else throw "platform not ${stdenv.system} supported!";
+
else throw "platform not ${stdenv.hostPlatform.system} supported!";
buildCommand = ''
mkdir -p $out/libexec
···
sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" "$f"
done
-
${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
+
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
''
# There are a number of native binaries. We must patch them to let them find the interpreter and libstdc++
···
patchelf --set-rpath ${stdenv_32bit.cc.cc.lib}/lib $i
done
-
${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
+
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
for i in bin64/{mkfs.ext4,fsck.ext4,e2fsck,tune2fs,resize2fs}
do
patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
···
done
''}
-
${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
+
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
# We must also patch the 64-bit emulator instances, if needed
for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service emulator-check qemu/linux-x86_64/qemu-system-*
···
# The emulators need additional libraries, which are dynamically loaded => let's wrap them
-
${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
+
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service
do
wrapProgram `pwd`/$i \
···
patchShebangs .
-
${if stdenv.system == "i686-linux" then
+
${if stdenv.hostPlatform.system == "i686-linux" then
''
# The monitor requires some more patching
···
cd ../..
''
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
''
# The monitor requires some more patching
+4 -4
pkgs/development/mobile/androidenv/build-tools.nix
···
stdenv.mkDerivation rec {
version = "26.0.2";
name = "android-build-tools-r${version}";
-
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
+
src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
then fetchurl {
url = "https://dl.google.com/android/repository/build-tools_r${version}-linux.zip";
sha256 = "1kii880bwhjkc343zwx1ysxyisxhczrwhphnxbwsgi45mjgq8lm7";
}
-
else if stdenv.system == "x86_64-darwin" then fetchurl {
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
url = "https://dl.google.com/android/repository/build-tools_r${version}-macosx.zip";
sha256 = "1x0ycprl6hgsm23kck5ind7x00hzydc5k3h3ch4a13407xbpvzvx";
}
-
else throw "System ${stdenv.system} not supported!";
+
else throw "System ${stdenv.hostPlatform.system} not supported!";
buildCommand = ''
mkdir -p $out/build-tools
···
unzip $src
mv android-* ${version}
-
${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
+
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
''
cd ${version}
+3 -3
pkgs/development/mobile/androidenv/default.nix
···
inherit (pkgs) stdenv fetchurl unzip;
};
-
platforms = if (pkgs.stdenv.system == "i686-linux" || pkgs.stdenv.system == "x86_64-linux")
+
platforms = if (pkgs.stdenv.hostPlatform.system == "i686-linux" || pkgs.stdenv.hostPlatform.system == "x86_64-linux")
then import ./platforms-linux.nix {
inherit (pkgs) stdenv fetchurl unzip;
}
-
else if pkgs.stdenv.system == "x86_64-darwin"
+
else if pkgs.stdenv.hostPlatform.system == "x86_64-darwin"
then import ./platforms-macosx.nix {
inherit (pkgs) stdenv fetchurl unzip;
}
-
else throw "Platform: ${pkgs.stdenv.system} not supported!";
+
else throw "Platform: ${pkgs.stdenv.hostPlatform.system} not supported!";
sysimages = import ./sysimages.nix {
inherit (pkgs) stdenv fetchurl unzip;
+4 -4
pkgs/development/mobile/androidenv/platform-tools.nix
···
stdenv.mkDerivation rec {
version = "26.0.2";
name = "android-platform-tools-r${version}";
-
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
+
src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
then fetchurl {
url = "https://dl.google.com/android/repository/platform-tools_r${version}-linux.zip";
sha256 = "0695npvxljbbh8xwfm65k34fcpyfkzvfkssgnp46wkmnq8w5mcb3";
}
-
else if stdenv.system == "x86_64-darwin" then fetchurl {
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
url = "https://dl.google.com/android/repository/platform-tools_r${version}-darwin.zip";
sha256 = "0gy7apw9pmnnm41z6ywglw5va4ghmny4j57778may4q7ar751l56";
}
-
else throw "System ${stdenv.system} not supported!";
+
else throw "System ${stdenv.hostPlatform.system} not supported!";
buildCommand = ''
mkdir -p $out
···
unzip $src
cd platform-tools
-
${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
+
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
''
for i in adb dmtracedump fastboot hprof-conv sqlite3
do
+1 -1
pkgs/development/mobile/titaniumenv/build-app.nix
···
name = stdenv.lib.replaceChars [" "] [""] name;
inherit src;
-
buildInputs = [ nodejs titanium alloy jdk python which file ] ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") xcodewrapper;
+
buildInputs = [ nodejs titanium alloy jdk python which file ] ++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") xcodewrapper;
buildPhase = ''
${preBuild}
+1 -1
pkgs/development/mobile/titaniumenv/default.nix
···
rec {
androidenv = pkgs.androidenv;
-
xcodeenv = if pkgs.stdenv.system == "x86_64-darwin" then pkgs.xcodeenv.override {
+
xcodeenv = if pkgs.stdenv.hostPlatform.system == "x86_64-darwin" then pkgs.xcodeenv.override {
version = xcodeVersion;
inherit xcodeBaseDir;
} else null;
+6 -6
pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix
···
stdenv.mkDerivation {
name = "mobilesdk-6.3.1.GA";
-
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
+
src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl {
url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-linux.zip;
sha256 = "0g8dqqf5ffa7ll3rqm5naywipnv2vvfxcj9fmqg1wnvvxf0rflqj";
}
-
else if stdenv.system == "x86_64-darwin" then fetchurl {
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-osx.zip;
sha256 = "00bm8vv70mg4kd7jvmxd1bfqafv6zdpdx816i0hvf801zwnak4nj";
}
-
else throw "Platform: ${stdenv.system} not supported!";
+
else throw "Platform: ${stdenv.hostPlatform.system} not supported!";
buildInputs = [ unzip makeWrapper ];
···
cd mobilesdk/*
mv * 6.3.1.GA
cd *
-
${stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") ''
+
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") ''
# Fixes a bad archive copying error when generating an IPA file
sed -i -e "s|cp -rf|/bin/cp -rf|" iphone/cli/commands/_build.js
''}
# Patch some executables
-
${if stdenv.system == "i686-linux" then
+
${if stdenv.hostPlatform.system == "i686-linux" then
''
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32
''
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
''
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64
''
+5 -5
pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix
···
in
stdenv.mkDerivation {
name = "mobilesdk-7.1.0.GA";
-
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
+
src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl {
url = http://builds.appcelerator.com/mobile/7_1_X/mobilesdk-7.1.0.v20180314133955-linux.zip;
sha256 = "18b3jnr65sdn5wj191bcl48gvhyklxmighxakv4vrz1fb59kyvqn";
}
-
else if stdenv.system == "x86_64-darwin" then fetchurl {
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
url = http://builds.appcelerator.com/mobile/7_1_X/mobilesdk-7.1.0.v20180314133955-osx.zip;
sha256 = "1f62616biwsw1fqxz2sq7lpa6bsfjazffliplyf5dpnh298cnc1m";
}
-
else throw "Platform: ${stdenv.system} not supported!";
+
else throw "Platform: ${stdenv.hostPlatform.system} not supported!";
buildInputs = [ unzip makeWrapper ];
···
# Patch some executables
-
${if stdenv.system == "i686-linux" then
+
${if stdenv.hostPlatform.system == "i686-linux" then
''
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32
''
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
''
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64
''
+3 -2
pkgs/development/node-packages/default-v10.nix
···
-
{pkgs, system, nodejs, stdenv}:
+
{ pkgs, nodejs, stdenv }:
let
nodePackages = import ./composition-v10.nix {
-
inherit pkgs system nodejs;
+
inherit pkgs nodejs;
+
inherit (stdenv.hostPlatform) system;
};
in
nodePackages // {
+3 -2
pkgs/development/node-packages/default-v6.nix
···
-
{pkgs, system, nodejs, stdenv}:
+
{ pkgs, nodejs, stdenv }:
let
nodePackages = import ./composition-v6.nix {
-
inherit pkgs system nodejs;
+
inherit pkgs nodejs;
+
inherit (stdenv.hostPlatform) system;
};
in
nodePackages // {
+3 -2
pkgs/development/node-packages/default-v8.nix
···
-
{pkgs, system, nodejs, stdenv}:
+
{ pkgs, nodejs, stdenv }:
let
nodePackages = import ./composition-v8.nix {
-
inherit pkgs system nodejs;
+
inherit pkgs nodejs;
+
inherit (stdenv.hostPlatform) system;
};
in
nodePackages // {
+2 -2
pkgs/development/python-modules/numpy/default.nix
···
-
{lib, fetchPypi, python, buildPythonPackage, isPyPy, gfortran, nose, blas, hostPlatform }:
+
{ stdenv, lib, fetchPypi, python, buildPythonPackage, isPyPy, gfortran, nose, blas }:
buildPythonPackage rec {
pname = "numpy";
···
./numpy-distutils-C++.patch
];
-
postPatch = lib.optionalString hostPlatform.isMusl ''
+
postPatch = lib.optionalString stdenv.hostPlatform.isMusl ''
# Use fenv.h
sed -i \
numpy/core/src/npymath/ieee754.c.src \
+2 -2
pkgs/development/python-modules/pyserial/default.nix
···
-
{ lib, fetchPypi, buildPythonPackage, hostPlatform }:
+
{ stdenv, lib, fetchPypi, buildPythonPackage }:
buildPythonPackage rec {
pname = "pyserial";
···
};
checkPhase = "python -m unittest discover -s test";
-
doCheck = !hostPlatform.isDarwin; # broken on darwin
+
doCheck = !stdenv.hostPlatform.isDarwin; # broken on darwin
meta = with lib; {
homepage = "https://github.com/pyserial/pyserial";
+1 -1
pkgs/development/ruby-modules/testing/stubs.nix
···
text = (builtins.toJSON (lib.filterAttrs ( n: v: builtins.any (x: x == n) ["name" "system"]) argSet));
builder = stdenv.shell;
args = [ "-c" "echo $(<$textPath) > $out"];
-
system = stdenv.system;
+
system = stdenv.hostPlatform.system;
passAsFile = ["text"];
};
fetchurl = {url?"", urls ? [],...}: "fetchurl:${if urls == [] then url else builtins.head urls}";
+1 -1
pkgs/development/tools/analysis/cov-build/default.nix
···
version = "7.0.2";
src =
-
if stdenv.system == "i686-linux"
+
if stdenv.hostPlatform.system == "i686-linux"
then requireFile {
name = "cov-analysis-linux32-${version}.tar.gz";
sha256 = "0i06wbd7blgx9adh9w09by4i18vwmldfp9ix97a5dph2cjymsviy";
+1 -1
pkgs/development/tools/analysis/valgrind/default.nix
···
'';
configureFlags =
-
stdenv.lib.optional (stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin") "--enable-only64bit";
+
stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin") "--enable-only64bit";
doCheck = false; # fails
+1 -2
pkgs/development/tools/build-managers/cmake/2.8.nix
···
{ stdenv, fetchurl, fetchpatch, curl, expat, zlib, bzip2
, useNcurses ? false, ncurses, useQt4 ? false, qt4, ps
-
, buildPlatform, hostPlatform
}:
with stdenv.lib;
···
})] ++
# Don't search in non-Nix locations such as /usr, but do search in our libc.
[ ./search-path.patch ] ++
-
optional (hostPlatform != buildPlatform) (fetchurl {
+
optional (stdenv.hostPlatform != stdenv.buildPlatform) (fetchurl {
name = "fix-darwin-cross-compile.patch";
url = "https://public.kitware.com/Bug/file_download.php?"
+ "file_id=4981&type=bug";
+5 -5
pkgs/development/tools/build-managers/meson/default.nix
···
-
{ lib, python3Packages, stdenv, targetPlatform, writeTextDir, substituteAll }:
+
{ lib, python3Packages, stdenv, writeTextDir, substituteAll }:
python3Packages.buildPythonApplication rec {
version = "0.46.1";
···
needs_exe_wrapper = true
[host_machine]
-
system = '${targetPlatform.parsed.kernel.name}'
-
cpu_family = '${targetPlatform.parsed.cpu.family}'
-
cpu = '${targetPlatform.parsed.cpu.name}'
-
endian = ${if targetPlatform.isLittleEndian then "'little'" else "'big'"}
+
system = '${stdenv.targetPlatform.parsed.kernel.name}'
+
cpu_family = '${stdenv.targetPlatform.parsed.cpu.family}'
+
cpu = '${stdenv.targetPlatform.parsed.cpu.name}'
+
endian = ${if stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"}
'';
# 0.45 update enabled tests but they are failing
+2 -2
pkgs/development/tools/electron/default.nix
···
version = "1.8.2";
name = "electron-${version}";
-
throwSystem = throw "Unsupported system: ${stdenv.system}";
+
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
meta = with stdenv.lib; {
description = "Cross platform desktop application shell";
···
url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip";
sha256 = "0k4np2d4y15x1qfay8y9m8v9y223vdpbq5fdxa3ywbbyf8j361zd";
};
-
}.${stdenv.system} or throwSystem;
+
}.${stdenv.hostPlatform.system} or throwSystem;
buildInputs = [ unzip makeWrapper ];
+3 -3
pkgs/development/tools/github/github-release/default.nix
···
{ stdenv, fetchurl }:
let
-
linuxPredicate = stdenv.system == "x86_64-linux";
-
bsdPredicate = stdenv.system == "x86_64-freebsd";
-
darwinPredicate = stdenv.system == "x86_64-darwin";
+
linuxPredicate = stdenv.hostPlatform.system == "x86_64-linux";
+
bsdPredicate = stdenv.hostPlatform.system == "x86_64-freebsd";
+
darwinPredicate = stdenv.hostPlatform.system == "x86_64-darwin";
metadata = assert linuxPredicate || bsdPredicate || darwinPredicate;
if linuxPredicate then
{ arch = "linux-amd64";
+1 -1
pkgs/development/tools/google-app-engine-go-sdk/default.nix
···
name = "google-app-engine-go-sdk-${version}";
version = "1.9.61";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchzip {
url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-${version}.zip";
sha256 = "1i2j9ympl1218akwsmm7yb31v0gibgpzlb657bcravi1irfv1hhs";
+6 -7
pkgs/development/tools/misc/binutils/default.nix
···
{ stdenv, buildPackages
, fetchurl, zlib, autoreconfHook264
-
, hostPlatform, buildPlatform, targetPlatform
, noSysDirs, gold ? true, bison ? null
}:
···
inherit (stdenv.lib) optionals optionalString;
# The targetPrefix prepended to binary names to allow multiple binuntils on the
# PATH to both be usable.
-
targetPrefix = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-";
+
targetPrefix = optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "${stdenv.targetPlatform.config}-";
in
stdenv.mkDerivation rec {
···
# be satisfied on aarch64 platform. Add backported fix from bugzilla.
# https://sourceware.org/bugzilla/show_bug.cgi?id=22764
./relax-R_AARCH64_ABS32-R_AARCH64_ABS16-absolute.patch
-
] ++ stdenv.lib.optional targetPlatform.isiOS ./support-ios.patch;
+
] ++ stdenv.lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch;
outputs = [ "out" "info" "man" ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [
bison
-
] ++ stdenv.lib.optionals targetPlatform.isiOS [
+
] ++ stdenv.lib.optionals stdenv.targetPlatform.isiOS [
autoreconfHook264
];
buildInputs = [ zlib ];
···
# As binutils takes part in the stdenv building, we don't want references
# to the bootstrap-tools libgcc (as uses to happen on arm/mips)
-
NIX_CFLAGS_COMPILE = if hostPlatform.isDarwin
+
NIX_CFLAGS_COMPILE = if stdenv.hostPlatform.isDarwin
then "-Wno-string-plus-int -Wno-deprecated-declarations"
else "-static-libgcc";
hardeningDisable = [ "format" ];
# TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
-
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
configureFlags = [
"--enable-targets=all" "--enable-64-bit-bfd"
···
doCheck = false; # fails
# else fails with "./sanity.sh: line 36: $out/bin/size: not found"
-
doInstallCheck = buildPlatform == hostPlatform && hostPlatform == targetPlatform;
+
doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform && stdenv.hostPlatform == stdenv.targetPlatform;
enableParallelBuilding = true;
+1 -1
pkgs/development/tools/misc/cflow/default.nix
···
buildInputs = [ gettext ] ++
# We don't have Emacs/GTK/etc. on {Dar,Cyg}win.
stdenv.lib.optional
-
(! (stdenv.lib.lists.any (x: stdenv.system == x)
+
(! (stdenv.lib.lists.any (x: stdenv.hostPlatform.system == x)
[ "i686-cygwin" ]))
emacs;
+4 -6
pkgs/development/tools/misc/gdb/default.nix
···
# Run time
, ncurses, readline, gmp, mpfr, expat, zlib, dejagnu
-
, buildPlatform, hostPlatform, targetPlatform
-
-
, pythonSupport ? hostPlatform == buildPlatform && !hostPlatform.isCygwin, python ? null
+
, pythonSupport ? stdenv.hostPlatform == stdenv.buildPlatform && !stdenv.hostPlatform.isCygwin, python ? null
, guile ? null
}:
···
stdenv.mkDerivation rec {
name =
-
stdenv.lib.optionalString (targetPlatform != hostPlatform)
-
(targetPlatform.config + "-")
+
stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+
(stdenv.targetPlatform.config + "-")
+ basename;
src = fetchurl {
···
NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral";
# TODO(@Ericson2314): Always pass "--target" and always prefix.
-
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
configureFlags = with stdenv.lib; [
"--enable-targets=all" "--enable-64-bit-bfd"
+2 -2
pkgs/development/tools/misc/gnum4/default.nix
···
-
{ stdenv, hostPlatform, fetchurl }:
+
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "gnum4-1.4.18";
···
configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ];
# Upstream is aware of it; it may be in the next release.
-
patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional hostPlatform.isDarwin stdenv.secure-format-patch;
+
patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin stdenv.secure-format-patch;
meta = {
homepage = http://www.gnu.org/software/m4/;
+3 -3
pkgs/development/tools/misc/help2man/default.nix
···
-
{ stdenv, hostPlatform, fetchurl, perl, gettext, LocaleGettext }:
+
{ stdenv, fetchurl, perl, gettext, LocaleGettext }:
stdenv.mkDerivation rec {
name = "help2man-1.47.6";
···
doCheck = false; # target `check' is missing
-
patches = if hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null;
+
patches = if stdenv.hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null;
# We don't use makeWrapper here because it uses substitutions our
# bootstrap shell can't handle.
···
cat > $out/bin/help2man <<EOF
#! $SHELL -e
export PERL5LIB=\''${PERL5LIB:+:}$gettext_perl
-
${stdenv.lib.optionalString hostPlatform.isCygwin
+
${stdenv.lib.optionalString stdenv.hostPlatform.isCygwin
"export PATH=\''${PATH:+:}${gettext}/bin"}
exec -a \$0 $out/bin/.help2man-wrapped "\$@"
EOF
+5 -5
pkgs/development/tools/misc/iozone/default.nix
···
{ stdenv, fetchurl, gnuplot }:
let
-
target = if stdenv.system == "i686-linux" then
+
target = if stdenv.hostPlatform.system == "i686-linux" then
"linux"
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
"linux-AMD64"
-
else if stdenv.system == "x86_64-darwin" then
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then
"macosx"
-
else if stdenv.system == "aarch64-linux" then
+
else if stdenv.hostPlatform.system == "aarch64-linux" then
"linux-arm"
-
else throw "Platform ${stdenv.system} not yet supported.";
+
else throw "Platform ${stdenv.hostPlatform.system} not yet supported.";
in
stdenv.mkDerivation rec {
+2 -2
pkgs/development/tools/misc/kibana/5.x.nix
···
archOverrides = {
"i686" = "x86";
};
-
info = splitString "-" stdenv.system;
+
info = splitString "-" stdenv.hostPlatform.system;
arch = (elemAt info 0);
elasticArch = archOverrides."${arch}" or arch;
plat = elemAt info 1;
···
src = fetchurl {
url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${elasticArch}.tar.gz";
-
sha256 = shas."${stdenv.system}" or (throw "Unknown architecture");
+
sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture");
};
buildInputs = [ makeWrapper ];
+2 -2
pkgs/development/tools/misc/kibana/default.nix
···
with stdenv.lib;
let
inherit (builtins) elemAt;
-
info = splitString "-" stdenv.system;
+
info = splitString "-" stdenv.hostPlatform.system;
arch = elemAt info 0;
plat = elemAt info 1;
shas =
···
src = fetchurl {
url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${arch}.tar.gz";
-
sha256 = shas."${stdenv.system}" or (throw "Unknown architecture");
+
sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture");
};
buildInputs = [ makeWrapper ];
+1 -2
pkgs/development/tools/misc/libtool/libtool2.nix
···
{ stdenv, fetchurl, m4, perl, help2man
-
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation rec {
···
# Don't run the native `strip' when cross-compiling. This breaks at least
# with `.a' files for MinGW.
-
dontStrip = hostPlatform != buildPlatform;
+
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
meta = {
description = "GNU Libtool, a generic library support script";
+1 -1
pkgs/development/tools/misc/lsof/default.nix
···
{ stdenv, fetchurl, buildPackages, ncurses }:
-
let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in
+
let dialect = with stdenv.lib; last (splitString "-" stdenv.hostPlatform.system); in
stdenv.mkDerivation rec {
name = "lsof-${version}";
+2 -2
pkgs/development/tools/misc/saleae-logic/default.nix
···
name = "${pname}-${version}";
src =
-
if stdenv.system == "i686-linux" then
+
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
name = "saleae-logic-${version}-32bit.zip";
url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(32-bit).zip";
sha256 = "1dyrj07cgj2fvwi1sk97vady9ri8f8n7mxy9zyzmw9isngs7bmll";
}
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
name = "saleae-logic-${version}-64bit.zip";
url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(64-bit).zip";
+1 -1
pkgs/development/tools/neoload/default.nix
···
name = "neoload-4.1.4";
src = fetchurl (
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
{ url = http://neoload.installers.neotys.com/documents/download/neoload/v4.1/neoload_4_1_4_linux_x64.sh;
sha256 = "199jcf5a0nwfm8wfld2rcjgq64g91vvz2bkmki8dxfzf1yasifcd"; }
else
+1 -1
pkgs/development/tools/node-webkit/nw12.nix
···
, gdk_pixbuf, cairo, nss, nspr, gconf, expat, systemd, libcap
, libnotify}:
let
-
bits = if stdenv.system == "x86_64-linux" then "x64"
+
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
else "ia32";
nwEnv = buildEnv {
+1 -1
pkgs/development/tools/nwjs/default.nix
···
, sqlite, udev
}:
let
-
bits = if stdenv.system == "x86_64-linux" then "x64"
+
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
else "ia32";
nwEnv = buildEnv {
+2 -2
pkgs/development/tools/phantomjs/default.nix
···
# because it has bundled a lot of external libraries (like QT and Webkit)
# and no easy/nice way to use the system versions of these
-
src = if stdenv.system == "i686-linux" then
+
src = if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-i686.tar.bz2";
sha256 = "11fzmssz9pqf3arh4f36w06sl2nyz8l9h8iyxyd7w5aqnq5la0j1";
}
else
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-x86_64.tar.bz2";
sha256 = "0fhnqxxsxhy125fmif1lwgnlhfx908spy7fx9mng4w72320n5nd1";
+2 -2
pkgs/development/tools/sauce-connect/default.nix
···
version = "4.4.12";
src = fetchurl (
-
if stdenv.system == "x86_64-linux" then {
+
if stdenv.hostPlatform.system == "x86_64-linux" then {
url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
sha256 = "1yqvx64bgiq27hdhwkzgmzyib8pbjn1idpq6783srxq64asf6iyw";
-
} else if stdenv.system == "i686-linux" then {
+
} else if stdenv.hostPlatform.system == "i686-linux" then {
url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz";
sha256 = "02kib56lv4lhwkj5r15484lvvbyjvf9ydi5vccsmxgsxrzmddnl6";
} else {
+2 -2
pkgs/development/tools/selenium/chromedriver/default.nix
···
};
};
-
spec = allSpecs."${stdenv.system}"
-
or (throw "missing chromedriver binary for ${stdenv.system}");
+
spec = allSpecs."${stdenv.hostPlatform.system}"
+
or (throw "missing chromedriver binary for ${stdenv.hostPlatform.system}");
libs = stdenv.lib.makeLibraryPath [
stdenv.cc.cc.lib
+3 -4
pkgs/development/tools/xcbuild/wrapper.nix
···
{ stdenv, lib, buildPackages, makeWrapper, writeText, runCommand
, CoreServices, ImageIO, CoreGraphics
-
, targetPlatform
-
, xcodePlatform ? targetPlatform.xcodePlatform or "MacOSX"
-
, xcodeVer ? targetPlatform.xcodeVer or "9.4.1"
-
, sdkVer ? targetPlatform.sdkVer or "10.10" }:
+
, xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX"
+
, xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1"
+
, sdkVer ? stdenv.targetPlatform.sdkVer or "10.10" }:
let
+1 -1
pkgs/development/web/remarkjs/default.nix
···
nodePackages = import ./nodepkgs.nix {
inherit pkgs;
-
inherit (stdenv) system;
+
inherit (stdenv.hostPlatform) system;
};
in stdenv.mkDerivation rec {
+4 -4
pkgs/games/andyetitmoves/default.nix
···
stdenv.mkDerivation rec {
name = "${plainName}-${version}";
-
src = if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"
+
src = if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux"
then
-
let postfix = if stdenv.system == "i686-linux" then "i386" else "x86_64";
+
let postfix = if stdenv.hostPlatform.system == "i686-linux" then "i386" else "x86_64";
commercialName = "${plainName}-${version}_${postfix}.tar.gz";
demoUrl = "http://www.andyetitmoves.net/demo/${plainName}Demo-${version}_${postfix}.tar.gz";
in
···
directory where yousaved it.
'';
name = commercialName;
-
sha256 = if stdenv.system == "i686-linux"
+
sha256 = if stdenv.hostPlatform.system == "i686-linux"
then "15wvzmmidvykwjrbnq70h5jrvnjx1hcrm0357qj85q4aqbzavh01"
else "1v8z16qa9ka8sf7qq45knsxj87s6sipvv3a7xq11pb5xk08fb2ql";
}
else fetchurl {
url = demoUrl;
-
sha256 = if stdenv.system == "i686-linux"
+
sha256 = if stdenv.hostPlatform.system == "i686-linux"
then "0f14vrrbq05hsbdajrb5y9za65fpng1lc8f0adb4aaz27x7sh525"
else "0mg41ya0b27blq3b5498kwl4rj46dj21rcd7qd0rw1kyvr7sx4v4";
}
+2 -2
pkgs/games/dwarf-fortress/dfhack/default.nix
···
xmlRev = "23500e4e9bd1885365d0a2ef1746c321c1dd5094";
arch =
-
if stdenv.system == "x86_64-linux" then "64"
-
else if stdenv.system == "i686-linux" then "32"
+
if stdenv.hostPlatform.system == "x86_64-linux" then "64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "32"
else throw "Unsupported architecture";
fakegit = writeScriptBin "git" ''
+3 -3
pkgs/games/dwarf-fortress/game.nix
···
game = if hasAttr dfVersion df-hashes
then getAttr dfVersion df-hashes
else throw "Unknown Dwarf Fortress version: ${dfVersion}";
-
dfPlatform = if hasAttr stdenv.system platforms
-
then getAttr stdenv.system platforms
-
else throw "Unsupported system: ${stdenv.system}";
+
dfPlatform = if hasAttr stdenv.hostPlatform.system platforms
+
then getAttr stdenv.hostPlatform.system platforms
+
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
sha256 = if hasAttr dfPlatform game
then getAttr dfPlatform game
else throw "Unsupported dfPlatform: ${dfPlatform}";
+1 -1
pkgs/games/eduke32/default.nix
···
};
buildInputs = [ flac gtk2 libvorbis libvpx libGLU_combined SDL2 SDL2_mixer ]
-
++ stdenv.lib.optional (stdenv.system == "i686-linux") nasm;
+
++ stdenv.lib.optional (stdenv.hostPlatform.system == "i686-linux") nasm;
nativeBuildInputs = [ pkgconfig ];
postPatch = ''
+2 -2
pkgs/games/ezquake/default.nix
···
];
installPhase = with stdenv.lib; let
-
sys = last (splitString "-" stdenv.system);
-
arch = head (splitString "-" stdenv.system);
+
sys = last (splitString "-" stdenv.hostPlatform.system);
+
arch = head (splitString "-" stdenv.hostPlatform.system);
in ''
mkdir -p $out/bin
find .
+1 -1
pkgs/games/factorio/default.nix
···
};
};
};
-
actual = binDists.${stdenv.system}.${releaseType}.${branch} or (throw "Factorio: unsupported platform");
+
actual = binDists.${stdenv.hostPlatform.system}.${releaseType}.${branch} or (throw "Factorio: unsupported platform");
bdistForArch = arch: { sha256 ? null
, version ? "0.16.51"
+1 -1
pkgs/games/nethack/default.nix
···
let
platform =
if stdenv.hostPlatform.isUnix then "unix"
-
else throw "Unknown platform for NetHack: ${stdenv.system}";
+
else throw "Unknown platform for NetHack: ${stdenv.hostPlatform.system}";
unixHint =
if x11Mode then "linux-x11"
else if qtMode then "linux-qt4"
+2 -2
pkgs/games/oilrush/default.nix
···
assert url != null && sha256 != null;
fetchurl { inherit url sha256; };
shell = stdenv.shell;
-
arch = if stdenv.system == "x86_64-linux" then "x64"
-
else if stdenv.system == "i686-linux" then "x86"
+
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "x86"
else "";
unpackPhase = ''
mkdir oilrush
+1 -1
pkgs/games/openarena/default.nix
···
cd $out
unzip $src
-
${if stdenv.system == "x86_64-linux" then ''
+
${if stdenv.hostPlatform.system == "x86_64-linux" then ''
patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.x86_64"
makeWrapper "${gameDir}/openarena.x86_64" "$out/bin/openarena" \
--prefix LD_LIBRARY_PATH : "${libPath}"
+2 -2
pkgs/games/racer/default.nix
···
stdenv.mkDerivation rec {
name = "racer-1.1";
-
src = if stdenv.system == "i686-linux" then fetchurl {
+
src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
url = http://hippo.nipax.cz/src/racer-1.1.tar.gz;
sha256 = "0fll1qkqfcjq87k0jzsilcw701z92lfxn2y5ga1n038772lymxl9";
-
} else if stdenv.system == "x86_64-linux" then fetchurl {
+
} else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
url = https://hippo.nipax.cz/src/racer-1.1.64.tar.gz;
sha256 = "0rjy3gmlhwfkb9zs58j0mc0dar0livwpbc19r6zw5r2k6r7xdan0";
} else
-1
pkgs/games/scummvm/default.nix
···
{ stdenv, fetchurl, nasm
, alsaLib, flac, fluidsynth, freetype, libjpeg, libmad, libmpeg2, libogg, libvorbis, libGLU_combined, SDL2, zlib
-
, hostPlatform
}:
stdenv.mkDerivation rec {
+1 -1
pkgs/games/sdlmame/default.nix
···
version = "0.151.u0-1";
name = "sdlmame-${version}";
-
src = if stdenv.system == "x86_64-linux"
+
src = if stdenv.hostPlatform.system == "x86_64-linux"
then fetchurl {
url = "http://seblu.net/a/archive/packages/s/sdlmame/${name}-x86_64.pkg.tar.xz";
sha256 = "1j9vjxhrhsskrlk5wr7al4wk2hh3983kcva42mqal09bmc8qg3m9";
+3 -3
pkgs/games/steam/default.nix
···
callPackage = newScope self;
self = rec {
-
steamArch = if pkgs.stdenv.system == "x86_64-linux" then "amd64"
-
else if pkgs.stdenv.system == "i686-linux" then "i386"
-
else throw "Unsupported platform: ${pkgs.stdenv.system}";
+
steamArch = if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
+
else if pkgs.stdenv.hostPlatform.system == "i686-linux" then "i386"
+
else throw "Unsupported platform: ${pkgs.stdenv.hostPlatform.system}";
steam-runtime = callPackage ./runtime.nix { };
steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { };
+2 -2
pkgs/games/ut2004/demo.nix
···
let
arch =
-
if stdenv.system == "x86_64-linux" then "amd64"
-
else if stdenv.system == "i686-linux" then "x86"
+
if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "x86"
else throw "Unsupported architecture";
in stdenv.mkDerivation rec {
+1 -1
pkgs/games/vessel/default.nix
···
message = goBuyItNow;
name = "${name}-bin";
sha256 = "1vpwcrjiln2mx43h7ib3jnccyr3chk7a5x2bw9kb4lw8ycygvg96";
-
} else throw "unsupported platform ${stdenv.system} only i686-linux supported for now.";
+
} else throw "unsupported platform ${stdenv.hostPlatform.system} only i686-linux supported for now.";
phases = "installPhase";
ld_preload = ./isatty.c;
+1 -1
pkgs/games/worldofgoo/default.nix
···
then "WorldOfGooDemo-1.41"
else "WorldofGoo-1.41";
-
arch = if stdenv.system == "x86_64-linux" then "supported"
+
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "supported"
else throw "Sorry. World of Goo only is only supported on x86_64 now.";
goBuyItNow = ''
+2 -2
pkgs/games/xjump/default.nix
···
-
{ stdenv, buildPlatform, fetchFromGitHub, autoconf, automake, libX11, libXt, libXpm, libXaw, localStateDir?null }:
+
{ stdenv, fetchFromGitHub, autoconf, automake, libX11, libXt, libXpm, libXaw, localStateDir?null }:
stdenv.mkDerivation rec {
name = "xjump-${version}";
···
nativeBuildInputs = [ autoconf automake ];
buildInputs = [ libX11 libXt libXpm libXaw ];
preConfigure = "autoreconf --install";
-
patches = if buildPlatform.isDarwin then [ ./darwin.patch ] else [];
+
patches = if stdenv.buildPlatform.isDarwin then [ ./darwin.patch ] else [];
configureFlags =
if localStateDir != null then
["--localstatedir=${localStateDir}"]
+1 -1
pkgs/games/zandronum/fmod.nix
···
{ stdenv, lib, fetchurl, alsaLib, libpulseaudio, undmg }:
let
-
bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
+
bits = stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "64";
libPath = lib.makeLibraryPath [ stdenv.cc.cc alsaLib libpulseaudio ];
in
+1 -1
pkgs/misc/base16-builder/default.nix
···
#
nodePackages = import ./node-packages.nix {
inherit pkgs;
-
inherit (stdenv) system;
+
inherit (stdenv.hostPlatform) system;
};
in nodePackages.base16-builder
+3 -3
pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix
···
file included in the tarball */
let arch =
-
if stdenv.system == "x86_64-linux" then "64"
-
else if stdenv.system == "i686-linux" then "32"
-
else throw "Unsupported system ${stdenv.system}";
+
if stdenv.hostPlatform.system == "x86_64-linux" then "64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "32"
+
else throw "Unsupported system ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation rec {
name = "cnijfilter-${version}";
+3 -3
pkgs/misc/cups/drivers/kyocera/default.nix
···
let
platform =
-
if stdenv.system == "x86_64-linux" then "64bit"
-
else if stdenv.system == "i686-linux" then "32bit"
-
else throw "Unsupported system: ${stdenv.system}";
+
if stdenv.hostPlatform.system == "x86_64-linux" then "64bit"
+
else if stdenv.hostPlatform.system == "i686-linux" then "32bit"
+
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
libPath = lib.makeLibraryPath [ cups ];
in
+3 -3
pkgs/misc/cups/drivers/kyodialog3/default.nix
···
let
platform =
-
if stdenv.system == "x86_64-linux" then "64bit"
-
else if stdenv.system == "i686-linux" then "32bit"
-
else throw "Unsupported system: ${stdenv.system}";
+
if stdenv.hostPlatform.system == "x86_64-linux" then "64bit"
+
else if stdenv.hostPlatform.system == "i686-linux" then "32bit"
+
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
debPlatform =
if platform == "64bit" then "amd64"
else "i386";
+2 -2
pkgs/misc/cups/drivers/samsung/4.01.17.nix
···
# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
# to see what will break when upgrading. Consider a new versioned attribute.
let
-
installationPath = if stdenv.system == "x86_64-linux" then "x86_64" else "i386";
-
appendPath = if stdenv.system == "x86_64-linux" then "64" else "";
+
installationPath = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "i386";
+
appendPath = if stdenv.hostPlatform.system == "x86_64-linux" then "64" else "";
libPath = stdenv.lib.makeLibraryPath [ cups libusb ] + ":$out/lib:${stdenv.cc.cc.lib}/lib${appendPath}";
in stdenv.mkDerivation rec {
name = "samsung-UnifiedLinuxDriver-${version}";
+1 -1
pkgs/misc/cups/drivers/samsung/default.nix
···
let
-
arch = if stdenv.system == "x86_64-linux"
+
arch = if stdenv.hostPlatform.system == "x86_64-linux"
then "x86_64"
else "i386";
+1 -1
pkgs/misc/drivers/gutenprint/bin.nix
···
stdenv.mkDerivation {
name = "cups-gutenprint-binary-5.0.1";
-
src = if stdenv.system == "x86_64-linux" then fetchurl {
+
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
url = https://www.openprinting.org/download/printdriver/debian/dists/lsb3.1/main/binary-amd64/gutenprint_5.0.1-1lsb3.1_amd64.deb;
sha256 = "0an5gba6r6v54r53s2gj2fjk8fzpl4lrksjas2333528b0k8gbbc";
} else throw "TODO"; # get from openprint.com -> drivers -> gutenprint
+3 -3
pkgs/misc/drivers/hplip/3.16.11.nix
···
"armv7l-linux" = "arm32";
};
-
hplipArch = hplipPlatforms."${stdenv.system}"
-
or (throw "HPLIP not supported on ${stdenv.system}");
+
hplipArch = hplipPlatforms."${stdenv.hostPlatform.system}"
+
or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}");
pluginArches = [ "x86_32" "x86_64" "arm32" ];
in
assert withPlugin -> builtins.elem hplipArch pluginArches
-
|| throw "HPLIP plugin not supported on ${stdenv.system}";
+
|| throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}";
pythonPackages.buildPythonApplication {
inherit name src;
+3 -3
pkgs/misc/drivers/hplip/default.nix
···
"armv7l-linux" = "arm32";
};
-
hplipArch = hplipPlatforms."${stdenv.system}"
-
or (throw "HPLIP not supported on ${stdenv.system}");
+
hplipArch = hplipPlatforms."${stdenv.hostPlatform.system}"
+
or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}");
pluginArches = [ "x86_32" "x86_64" "arm32" ];
in
assert withPlugin -> builtins.elem hplipArch pluginArches
-
|| throw "HPLIP plugin not supported on ${stdenv.system}";
+
|| throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}";
pythonPackages.buildPythonApplication {
inherit name src;
+2 -2
pkgs/misc/emulators/retroarch/cores.nix
···
extraBuildInputs = [ libGLU_combined libpng ];
}).override {
-
buildPhase = "make WITH_DYNAREC=${if stdenv.system == "x86_64-linux" then "x86_64" else "x86"}";
+
buildPhase = "make WITH_DYNAREC=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "x86"}";
};
nestopia = (mkLibRetroCore rec {
···
extraBuildInputs = [ libGLU_combined libpng ];
}).override {
-
buildPhase = "make WITH_DYNAREC=${if stdenv.system == "x86_64-linux" then "x86_64" else "x86"}";
+
buildPhase = "make WITH_DYNAREC=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "x86"}";
};
picodrive = (mkLibRetroCore rec {
+2 -2
pkgs/misc/emulators/retroarch/default.nix
···
, udev ? null
, enableNvidiaCgToolkit ? false, nvidia_cg_toolkit ? null
, withVulkan ? stdenv.isLinux, vulkan-loader ? null
-
, targetPlatform, fetchurl
+
, fetchurl
}:
with stdenv.lib;
···
postInstall = optionalString withVulkan ''
wrapProgram $out/bin/retroarch --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib
-
'' + optionalString targetPlatform.isDarwin ''
+
'' + optionalString stdenv.targetPlatform.isDarwin ''
EXECUTABLE_NAME=RetroArch
PRODUCT_NAME=RetroArch
MACOSX_DEPLOYMENT_TARGET=10.5
+2 -2
pkgs/misc/emulators/wine/default.nix
···
# };
# Make additional configurations on demand:
# wine.override { wineBuild = "wine32"; wineRelease = "staging"; };
-
{ lib, system, callPackage,
+
{ lib, stdenv, callPackage,
wineRelease ? "stable",
-
wineBuild ? (if system == "x86_64-linux" then "wineWow" else "wine32"),
+
wineBuild ? if stdenv.hostPlatform.system == "x86_64-linux" then "wineWow" else "wine32",
libtxc_dxtn_Name ? "libtxc_dxtn_s2tc",
pngSupport ? false,
jpegSupport ? false,
+4 -4
pkgs/os-specific/bsd/netbsd/default.nix
···
-
{ stdenv, hostPlatform, fetchcvs, lib, groff, mandoc, zlib, buildPackages
+
{ stdenv, fetchcvs, lib, groff, mandoc, zlib, buildPackages
, yacc, flex, libressl, bash, less, writeText }:
let
···
MKUNPRIVED = "yes";
HOST_SH = "${bash}/bin/sh";
OBJCOPY = if stdenv.isDarwin then "true" else "objcopy";
-
MACHINE_ARCH = hostPlatform.parsed.cpu.name;
-
MACHINE_CPU = hostPlatform.parsed.cpu.name;
+
MACHINE_ARCH = stdenv.hostPlatform.parsed.cpu.name;
+
MACHINE_CPU = stdenv.hostPlatform.parsed.cpu.name;
INSTALL_FILE = "install -U -c";
INSTALL_DIR = "xinstall -U -d";
···
"-DOXTABS=XTABS"
"-DRANDOM_MAX=RAND_MAX"
"-DINFTIM=-1"
-
(lib.optionalString hostPlatform.isMusl "-include sys/ttydefaults.h -include sys/file.h")
+
(lib.optionalString stdenv.hostPlatform.isMusl "-include sys/ttydefaults.h -include sys/file.h")
"-DBE32TOH(x)=((void)0)"
"-DBE64TOH(x)=((void)0)"
"-D__c99inline=__inline"
+3 -3
pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
···
-
{ stdenv, appleDerivation, lib, targetPlatform
-
, enableStatic ? targetPlatform.isiOS
-
, enableShared ? !targetPlatform.isiOS
+
{ stdenv, appleDerivation, lib
+
, enableStatic ? stdenv.targetPlatform.isiOS
+
, enableShared ? !stdenv.targetPlatform.isiOS
}:
appleDerivation {
+6 -7
pkgs/os-specific/darwin/cctools/port.nix
···
{ stdenv, fetchFromGitHub, autoconf, automake, libtool_2, autoreconfHook
, libcxxabi, libuuid
, libobjc ? null, maloader ? null
-
, hostPlatform, targetPlatform
, enableDumpNormalizedLibArgs ? false
}:
···
# 10.x. For 11.0 and higher we will need to upgrade to a newer cctools than the
# default version here, which can support the new TBD format via Apple's
# libtapi.
-
useOld = targetPlatform.isiOS;
+
useOld = stdenv.targetPlatform.isiOS;
# The targetPrefix prepended to binary names to allow multiple binuntils on the
# PATH to both be usable.
targetPrefix = stdenv.lib.optionalString
-
(targetPlatform != hostPlatform)
-
"${targetPlatform.config}-";
+
(stdenv.targetPlatform != stdenv.hostPlatform)
+
"${stdenv.targetPlatform.config}-";
in
# Non-Darwin alternatives
-
assert (!hostPlatform.isDarwin) -> maloader != null;
+
assert (!stdenv.hostPlatform.isDarwin) -> maloader != null;
assert enableDumpNormalizedLibArgs -> (!useOld);
···
enableParallelBuilding = true;
# TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
-
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
postPatch = ''
sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp
···
};
meta = {
-
broken = !targetPlatform.isDarwin; # Only supports darwin targets
+
broken = !stdenv.targetPlatform.isDarwin; # Only supports darwin targets
homepage = http://www.opensource.apple.com/source/cctools/;
description = "MacOS Compiler Tools (cross-platform port)";
license = stdenv.lib.licenses.apsl20;
+2 -2
pkgs/os-specific/darwin/xcode/default.nix
···
-
{ stdenv, requireFile, targetPlatform, lib }:
+
{ stdenv, requireFile, lib }:
let requireXcode = version: sha256:
let
···
xcode_9_1 = requireXcode "9.1" "0ab1403wy84ys3yn26fj78cazhpnslmh3nzzp1wxib3mr1afjvic";
xcode_9_2 = requireXcode "9.2" "1bgfgdp266cbbqf2axcflz92frzvhi0qw0jdkcw6r85kdpc8dj4c";
xcode_9_4 = requireXcode "9.4" "6731381785075602a52489f7ea47ece8f6daf225007ba3ffae1fd59b1c0b5f01";
-
xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if targetPlatform.useiOSPrebuilt then targetPlatform.xcodeVer else "8.2")}";
+
xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if stdenv.targetPlatform.useiOSPrebuilt then stdenv.targetPlatform.xcodeVer else "8.2")}";
})
+1 -1
pkgs/os-specific/linux/alsa-plugins/wrapper.nix
···
{ writeScriptBin, stdenv, alsaPlugins }:
-
writeScriptBin "ap${if stdenv.system == "i686-linux" then "32" else "64"}" ''
+
writeScriptBin "ap${if stdenv.hostPlatform.system == "i686-linux" then "32" else "64"}" ''
#/bin/sh
ALSA_PLUGIN_DIRS=${alsaPlugins}/lib/alsa-lib "$@"
''
+2 -2
pkgs/os-specific/linux/amdgpu-pro/default.nix
···
bitness = if stdenv.is64bit then "64" else "32";
libArch =
-
if stdenv.system == "i686-linux" then
+
if stdenv.hostPlatform.system == "i686-linux" then
"i386-linux-gnu"
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
"x86_64-linux-gnu"
else throw "amdgpu-pro is Linux only. Sorry. The build was stopped.";
+2 -2
pkgs/os-specific/linux/ati-drivers/default.nix
···
build = "15.302";
linuxonly =
-
if stdenv.system == "i686-linux" then
+
if stdenv.hostPlatform.system == "i686-linux" then
true
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
true
else throw "ati-drivers are Linux only. Sorry. The build was stopped.";
+2 -2
pkgs/os-specific/linux/broadcom-sta/default.nix
···
x86_64-linux = "1gj485qqr190idilacpxwgqyw21il03zph2rddizgj7fbd6pfyaz";
};
-
arch = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "_64";
+
arch = stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "_64";
tarballVersion = stdenv.lib.replaceStrings ["."] ["_"] version;
tarball = "hybrid-v35${arch}-nodebug-pcoem-${tarballVersion}.tar.gz";
in
···
src = fetchurl {
url = "https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/${tarball}";
-
sha256 = hashes.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
+
sha256 = hashes.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
hardeningDisable = [ "pic" ];
+2 -2
pkgs/os-specific/linux/busybox/sandbox-shell.nix
···
-
{ busybox, hostPlatform }:
+
{ busybox, stdenv}:
# Minimal shell for use as basic /bin/sh in sandbox builds
busybox.override {
# musl roadmap has RISC-V support projected for 1.1.20
-
useMusl = !hostPlatform.isRiscV;
+
useMusl = !stdenv.hostPlatform.isRiscV;
enableStatic = true;
enableMinimal = true;
extraConfig = ''
+2 -2
pkgs/os-specific/linux/displaylink/default.nix
···
let
arch =
-
if stdenv.system == "x86_64-linux" then "x64"
-
else if stdenv.system == "i686-linux" then "x86"
+
if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "x86"
else throw "Unsupported architecture";
bins = "${arch}-ubuntu-1604";
libPath = lib.makeLibraryPath [ stdenv.cc.cc utillinux libusb1 evdi ];
+1 -1
pkgs/os-specific/linux/fusionio/util.nix
···
description = "Fusionio command line utilities";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
-
broken = stdenv.system != "x86_64-linux";
+
broken = stdenv.hostPlatform.system != "x86_64-linux";
maintainers = with maintainers; [ wkennington ];
};
}
+1 -1
pkgs/os-specific/linux/fusionio/vsl.nix
···
description = "Kernel driver for accessing fusion-io cards";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
-
broken = stdenv.system != "x86_64-linux";
+
broken = stdenv.hostPlatform.system != "x86_64-linux";
maintainers = with maintainers; [ wkennington ];
};
}
+3 -4
pkgs/os-specific/linux/kernel-headers/default.nix
···
{ stdenvNoCC, lib, buildPackages
-
, hostPlatform
, fetchurl, perl
}:
-
assert hostPlatform.isLinux;
+
assert stdenvNoCC.hostPlatform.isLinux;
let
common = { version, sha256, patches ? null }: stdenvNoCC.mkDerivation {
···
inherit sha256;
};
-
ARCH = hostPlatform.platform.kernelArch;
+
ARCH = stdenvNoCC.hostPlatform.platform.kernelArch;
# It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc.
# We do this so we have a build->build, not build->host, C compiler.
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl ];
-
extraIncludeDirs = lib.optional hostPlatform.isPowerPC ["ppc"];
+
extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
# "patches" array defaults to 'null' to avoid changing hash
# and causing mass rebuild
+3 -3
pkgs/os-specific/linux/kernel/common-config.nix
···
IP_DCCP_CCID3 = no; # experimental
CLS_U32_PERF = yes;
CLS_U32_MARK = yes;
-
BPF_JIT = when (stdenv.system == "x86_64-linux") yes;
+
BPF_JIT = when (stdenv.hostPlatform.system == "x86_64-linux") yes;
WAN = yes;
# Required by systemd per-cgroup firewalling
CGROUP_BPF = option yes;
···
FB_VESA = yes;
FRAMEBUFFER_CONSOLE = yes;
FRAMEBUFFER_CONSOLE_ROTATION = yes;
-
FB_GEODE = when (stdenv.system == "i686-linux") yes;
+
FB_GEODE = when (stdenv.hostPlatform.system == "i686-linux") yes;
};
video = {
···
};
# Support x2APIC (which requires IRQ remapping)
-
x2apic = optionalAttrs (stdenv.system == "x86_64-linux") {
+
x2apic = optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux") {
X86_X2APIC = yes;
IRQ_REMAP = yes;
};
+11 -12
pkgs/os-specific/linux/kernel/generic.nix
···
# symbolic name and `patch' is the actual patch. The patch may
# optionally be compressed with gzip or bzip2.
kernelPatches ? []
-
, ignoreConfigErrors ? hostPlatform.platform.name != "pc" ||
-
hostPlatform != stdenv.buildPlatform
+
, ignoreConfigErrors ? stdenv.hostPlatform.platform.name != "pc" ||
+
stdenv.hostPlatform != stdenv.buildPlatform
, extraMeta ? {}
-
, hostPlatform
-
# easy overrides to hostPlatform.platform members
-
, autoModules ? hostPlatform.platform.kernelAutoModules
-
, preferBuiltin ? hostPlatform.platform.kernelPreferBuiltin or false
-
, kernelArch ? hostPlatform.platform.kernelArch
+
# easy overrides to stdenv.hostPlatform.platform members
+
, autoModules ? stdenv.hostPlatform.platform.kernelAutoModules
+
, preferBuiltin ? stdenv.hostPlatform.platform.kernelPreferBuiltin or false
+
, kernelArch ? stdenv.hostPlatform.platform.kernelArch
, mkValueOverride ? null
, ...
···
inherit stdenv version structuredExtraConfig mkValueOverride;
# append extraConfig for backwards compatibility but also means the user can't override the kernelExtraConfig part
-
extraConfig = extraConfig + lib.optionalString (hostPlatform.platform ? kernelExtraConfig) hostPlatform.platform.kernelExtraConfig;
+
extraConfig = extraConfig + lib.optionalString (stdenv.hostPlatform.platform ? kernelExtraConfig) stdenv.hostPlatform.platform.kernelExtraConfig;
features = kernelFeatures; # Ensure we know of all extra patches, etc.
};
···
nativeBuildInputs = [ perl ]
++ lib.optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ];
-
platformName = hostPlatform.platform.name;
+
platformName = stdenv.hostPlatform.platform.name;
# e.g. "defconfig"
-
kernelBaseConfig = if defconfig != null then defconfig else hostPlatform.platform.kernelBaseConfig;
+
kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.platform.kernelBaseConfig;
# e.g. "bzImage"
-
kernelTarget = hostPlatform.platform.kernelTarget;
+
kernelTarget = stdenv.hostPlatform.platform.kernelTarget;
prePatch = kernel.prePatch + ''
# Patch kconfig to print "###" after every question so that
···
};
kernel = (callPackage ./manual-config.nix {}) {
-
inherit version modDirVersion src kernelPatches stdenv extraMeta configfile hostPlatform;
+
inherit version modDirVersion src kernelPatches stdenv extraMeta configfile;
config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; };
};
+1 -1
pkgs/os-specific/linux/kernel/linux-4.14.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args:
+
{ stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args:
with stdenv.lib;
+1 -1
pkgs/os-specific/linux/kernel/linux-4.17.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args:
+
{ stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args:
with stdenv.lib;
+1 -1
pkgs/os-specific/linux/kernel/linux-4.18.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args:
+
{ stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args:
with stdenv.lib;
+1 -1
pkgs/os-specific/linux/kernel/linux-4.4.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
+
{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
buildLinux (args // rec {
version = "4.4.153";
+1 -1
pkgs/os-specific/linux/kernel/linux-4.9.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
+
{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
buildLinux (args // rec {
version = "4.9.124";
+1 -1
pkgs/os-specific/linux/kernel/linux-beagleboard.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ubootTools, dtc, ... } @ args:
+
{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ubootTools, dtc, ... } @ args:
let
modDirVersion = "4.14.12";
+1 -1
pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:
+
{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args:
with stdenv.lib;
+1 -1
pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args:
+
{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args:
buildLinux (args // rec {
version = "4.14.66-147";
+1 -1
pkgs/os-specific/linux/kernel/linux-mptcp-93.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:
+
{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args:
buildLinux (rec {
mptcpVersion = "0.93";
+1 -1
pkgs/os-specific/linux/kernel/linux-mptcp.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:
+
{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args:
buildLinux (rec {
mptcpVersion = "0.94";
+1 -1
pkgs/os-specific/linux/kernel/linux-riscv.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args:
+
{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args:
buildLinux (args // rec {
version = "4.16-rc6";
+2 -2
pkgs/os-specific/linux/kernel/linux-rpi.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:
+
{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args:
let
modDirVersion = "4.14.50";
···
defconfig = {
"armv6l-linux" = "bcmrpi_defconfig";
"armv7l-linux" = "bcm2709_defconfig";
-
}.${stdenv.system} or (throw "linux_rpi not supported on '${stdenv.system}'");
+
}.${stdenv.hostPlatform.system} or (throw "linux_rpi not supported on '${stdenv.hostPlatform.system}'");
features = {
efiBootStub = false;
+1 -1
pkgs/os-specific/linux/kernel/linux-samus-4.12.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ncurses, ... } @ args:
+
{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ncurses, ... } @ args:
buildLinux (args // rec {
version = "4.12.2";
+1 -1
pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchgit, perl, buildLinux, ... } @ args:
+
{ stdenv, buildPackages, fetchgit, perl, buildLinux, ... } @ args:
buildLinux (args // rec {
version = "4.16.2018.08.03";
+1 -1
pkgs/os-specific/linux/kernel/linux-testing.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args:
+
{ stdenv, buildPackages, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args:
buildLinux (args // rec {
version = "4.19-rc1";
+4 -6
pkgs/os-specific/linux/kernel/manual-config.nix
···
allowImportFromDerivation ? false,
# ignored
features ? null,
-
-
hostPlatform
}:
let
···
commonMakeFlags = [
"O=$(buildRoot)"
-
] ++ stdenv.lib.optionals (hostPlatform.platform ? kernelMakeFlags)
-
hostPlatform.platform.kernelMakeFlags;
+
] ++ stdenv.lib.optionals (stdenv.hostPlatform.platform ? kernelMakeFlags)
+
stdenv.hostPlatform.platform.kernelMakeFlags;
drvAttrs = config_: platform: kernelPatches: configfile:
let
···
assert stdenv.lib.versionAtLeast version "4.14" -> libelf != null;
assert stdenv.lib.versionAtLeast version "4.15" -> utillinux != null;
-
stdenv.mkDerivation ((drvAttrs config hostPlatform.platform kernelPatches configfile) // {
+
stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // {
name = "linux-${version}";
enableParallelBuilding = true;
···
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
-
karch = hostPlatform.platform.kernelArch;
+
karch = stdenv.hostPlatform.platform.kernelArch;
})
+5 -7
pkgs/os-specific/linux/klibc/default.nix
···
-
{ stdenv, fetchurl, linuxHeaders, perl
-
, buildPlatform, hostPlatform
-
}:
+
{ stdenv, fetchurl, linuxHeaders, perl }:
let
commonMakeFlags = [
···
hardeningDisable = [ "format" "stackprotector" ];
makeFlags = commonMakeFlags ++ [
-
"KLIBCARCH=${hostPlatform.platform.kernelArch}"
+
"KLIBCARCH=${stdenv.hostPlatform.platform.kernelArch}"
"KLIBCKERNELSRC=${linuxHeaders}"
] # TODO(@Ericson2314): We now can get the ABI from
-
# `hostPlatform.parsed.abi`, is this still a good idea?
-
++ stdenv.lib.optional (hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y"
-
++ stdenv.lib.optional (hostPlatform != buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
+
# `stdenv.hostPlatform.parsed.abi`, is this still a good idea?
+
++ stdenv.lib.optional (stdenv.hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y"
+
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
# Install static binaries as well.
postInstall = ''
+1 -2
pkgs/os-specific/linux/mdadm/default.nix
···
{ stdenv, writeScript
, fetchurl, groff
-
, buildPlatform, hostPlatform
}:
let
···
"NIXOS=1" "INSTALL=install" "INSTALL_BINDIR=$(out)/sbin"
"MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm"
"STRIP="
-
] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [
+
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
+2 -2
pkgs/os-specific/linux/musl/default.nix
···
-
{ stdenv, lib, fetchurl, hostPlatform
+
{ stdenv, lib, fetchurl
, linuxHeaders ? null
, useBSDCompatHeaders ? true
}:
···
configureFlagsArray+=("--syslibdir=$out/lib")
'';
-
CFLAGS="-fstack-protector-strong" + lib.optionalString hostPlatform.isPower " -mlong-double-64";
+
CFLAGS="-fstack-protector-strong" + lib.optionalString stdenv.hostPlatform.isPower " -mlong-double-64";
configureFlags = [
"--enable-shared"
+4 -4
pkgs/os-specific/linux/nvidia-x11/generic.nix
···
builder = ./builder.sh;
src =
-
if stdenv.system == "i686-linux" then
+
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "https://download.nvidia.com/XFree86/Linux-x86/${version}/NVIDIA-Linux-x86-${version}${pkgSuffix}.run";
sha256 = sha256_32bit;
}
-
else if stdenv.system == "x86_64-linux" then
+
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}${pkgSuffix}.run";
sha256 = sha256_64bit;
}
-
else throw "nvidia-x11 does not support platform ${stdenv.system}";
+
else throw "nvidia-x11 does not support platform ${stdenv.hostPlatform.system}";
patches = if libsOnly then null else patches;
inherit prePatch;
inherit version useGLVND useProfiles;
-
inherit (stdenv) system;
+
inherit (stdenv.hostPlatform) system;
outputs = [ "out" ] ++ optional (!libsOnly) "bin";
outputDev = if libsOnly then null else "bin";
+3 -3
pkgs/os-specific/linux/pam/default.nix
···
-
{ stdenv, buildPackages, hostPlatform, fetchurl, fetchpatch, flex, cracklib, db4 }:
+
{ stdenv, buildPackages, fetchurl, fetchpatch, flex, cracklib, db4 }:
stdenv.mkDerivation rec {
name = "linux-pam-${version}";
···
sha256 = "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4";
};
-
patches = stdenv.lib.optionals (hostPlatform.libc == "musl") [
+
patches = stdenv.lib.optionals (stdenv.hostPlatform.libc == "musl") [
(fetchpatch {
url = "https://git.alpinelinux.org/cgit/aports/plain/main/linux-pam/fix-compat.patch?id=05a62bda8ec255d7049a2bd4cf0fdc4b32bdb2cc";
sha256 = "1h5yp5h2mqp1fcwiwwklyfpa69a3i03ya32pivs60fd7g5bqa7sf";
···
preConfigure = ''
configureFlags="$configureFlags --includedir=$out/include/security"
-
'' + stdenv.lib.optionalString (hostPlatform.libc == "musl") ''
+
'' + stdenv.lib.optionalString (stdenv.hostPlatform.libc == "musl") ''
# export ac_cv_search_crypt=no
# (taken from Alpine linux, apparently insecure but also doesn't build O:))
# disable insecure modules
+2 -2
pkgs/os-specific/linux/prl-tools/default.nix
···
let xorgFullVer = (builtins.parseDrvName xorg.xorgserver.name).version;
xorgVer = lib.concatStringsSep "." (lib.take 2 (lib.splitString "." xorgFullVer));
-
x64 = if stdenv.system == "x86_64-linux" then true
-
else if stdenv.system == "i686-linux" then false
+
x64 = if stdenv.hostPlatform.system == "x86_64-linux" then true
+
else if stdenv.hostPlatform.system == "i686-linux" then false
else throw "Parallels Tools for Linux only support {x86-64,i686}-linux targets";
in
stdenv.mkDerivation rec {
+4 -5
pkgs/os-specific/linux/shadow/default.nix
···
{ stdenv, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt, libxml2
, docbook_xml_dtd_412, docbook_xsl, gnome-doc-utils, flex, bison
, pam ? null, glibcCross ? null
-
, buildPlatform, hostPlatform
}:
let
glibc =
-
if hostPlatform != buildPlatform
+
if stdenv.hostPlatform != stdenv.buildPlatform
then glibcCross
-
else assert hostPlatform.libc == "glibc"; stdenv.cc.libc;
+
else assert stdenv.hostPlatform.libc == "glibc"; stdenv.cc.libc;
dots_in_usernames = fetchpatch {
url = http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/shadow/files/shadow-4.1.3-dots-in-usernames.patch;
···
configureFlags = [
"--enable-man"
"--with-group-name-max-length=32"
-
] ++ stdenv.lib.optional (hostPlatform.libc != "glibc") "--disable-nscd";
+
] ++ stdenv.lib.optional (stdenv.hostPlatform.libc != "glibc") "--disable-nscd";
-
preBuild = stdenv.lib.optionalString (hostPlatform.libc == "glibc")
+
preBuild = stdenv.lib.optionalString (stdenv.hostPlatform.libc == "glibc")
''
substituteInPlace lib/nscd.c --replace /usr/sbin/nscd ${glibc.bin}/bin/nscd
'';
+1 -2
pkgs/os-specific/linux/systemd/default.nix
···
, ninja, meson, python3Packages, glibcLocales
, patchelf
, getent
-
, hostPlatform
, buildPackages
, withSelinux ? false, libselinux
, withLibseccomp ? libseccomp.meta.available, libseccomp
···
"-Dsystem-gid-max=499"
# "-Dtime-epoch=1"
-
(if stdenv.isAarch32 || stdenv.isAarch64 || !hostPlatform.isEfi then "-Dgnu-efi=false" else "-Dgnu-efi=true")
+
(if stdenv.isAarch32 || stdenv.isAarch64 || !stdenv.hostPlatform.isEfi then "-Dgnu-efi=false" else "-Dgnu-efi=true")
"-Defi-libdir=${toString gnu-efi}/lib"
"-Defi-includedir=${toString gnu-efi}/include/efi"
"-Defi-ldsdir=${toString gnu-efi}/lib"
+3 -4
pkgs/os-specific/linux/uclibc/default.nix
···
{ stdenv, buildPackages
, fetchurl, linuxHeaders, libiconvReal
-
, buildPlatform, hostPlatform
, extraConfig ? ""
}:
···
UCLIBC_SUSV4_LEGACY y
UCLIBC_HAS_THREADS_NATIVE y
KERNEL_HEADERS "${linuxHeaders}/include"
-
'' + stdenv.lib.optionalString (stdenv.isAarch32 && buildPlatform != hostPlatform) ''
+
'' + stdenv.lib.optionalString (stdenv.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) ''
CONFIG_ARM_EABI y
ARCH_WANTS_BIG_ENDIAN n
ARCH_BIG_ENDIAN n
···
cat << EOF | parseconfig
${nixConfig}
${extraConfig}
-
${hostPlatform.platform.uclibc.extraConfig or ""}
+
${stdenv.hostPlatform.platform.uclibc.extraConfig or ""}
EOF
( set +o pipefail; yes "" | make oldconfig )
'';
···
depsBuildBuild = [ buildPackages.stdenv.cc ];
makeFlags = [
-
"ARCH=${hostPlatform.parsed.cpu.name}"
+
"ARCH=${stdenv.hostPlatform.parsed.cpu.name}"
"VERBOSE=1"
] ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"CROSS=${stdenv.cc.targetPrefix}"
+2 -2
pkgs/os-specific/windows/pthread-w32/default.nix
···
-
{ fetchurl, stdenv, hostPlatform, buildPlatform, mingwrt }:
+
{ fetchurl, stdenv, mingwrt }:
# This file is tweaked for cross-compilation only.
-
assert hostPlatform != buildPlatform;
+
assert stdenv.hostPlatform != stdenv.buildPlatform;
stdenv.mkDerivation {
name = "pthread-w32-1.10.0";
+1 -3
pkgs/os-specific/windows/wxMSW-2.8/default.nix
···
-
{ stdenv, fetchurl, compat24 ? false, compat26 ? true, unicode ? true
-
, hostPlatform
-
}:
+
{ stdenv, fetchurl, compat24 ? false, compat26 ? true, unicode ? true }:
stdenv.mkDerivation {
name = "wxMSW-2.8.11";
+9 -10
pkgs/shells/bash/4.4.nix
···
{ stdenv, buildPackages
, fetchurl, binutils ? null, bison, autoconf, utillinux
-
, buildPlatform, hostPlatform
# patch for cygwin requires readline support
, interactive ? stdenv.isCygwin, readline70 ? null
···
assert interactive -> readline70 != null;
assert withDocs -> texinfo != null;
-
assert hostPlatform.isDarwin -> binutils != null;
+
assert stdenv.hostPlatform.isDarwin -> binutils != null;
let
upstreamPatches = import ./bash-4.4-patches.nix (nr: sha256: fetchurl {
···
patchFlags = "-p0";
patches = upstreamPatches
-
++ optional hostPlatform.isCygwin ./cygwin-bash-4.4.11-2.src.patch
+
++ optional stdenv.hostPlatform.isCygwin ./cygwin-bash-4.4.11-2.src.patch
# https://lists.gnu.org/archive/html/bug-bash/2016-10/msg00006.html
-
++ optional hostPlatform.isMusl (fetchurl {
+
++ optional stdenv.hostPlatform.isMusl (fetchurl {
url = "https://lists.gnu.org/archive/html/bug-bash/2016-10/patchJxugOXrY2y.patch";
sha256 = "1m4v9imidb1cc1h91f2na0b8y9kc5c5fgmpvy9apcyv2kbdcghg1";
});
configureFlags = [
(if interactive then "--with-installed-readline" else "--disable-readline")
-
] ++ optionals (hostPlatform != buildPlatform) [
+
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"bash_cv_job_control_missing=nomissing"
"bash_cv_sys_named_pipes=nomissing"
"bash_cv_getcwd_malloc=yes"
-
] ++ optionals hostPlatform.isCygwin [
+
] ++ optionals stdenv.hostPlatform.isCygwin [
"--without-libintl-prefix --without-libiconv-prefix"
"--with-installed-readline"
"bash_cv_dev_stdin=present"
"bash_cv_dev_fd=standard"
"bash_cv_termcap_lib=libncurses"
-
] ++ optionals (hostPlatform.libc == "musl") [
+
] ++ optionals (stdenv.hostPlatform.libc == "musl") [
"--without-bash-malloc"
"--disable-nls"
];
···
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ bison ]
++ optional withDocs texinfo
-
++ optional hostPlatform.isDarwin binutils
-
++ optional (hostPlatform.libc == "musl") autoconf;
+
++ optional stdenv.hostPlatform.isDarwin binutils
+
++ optional (stdenv.hostPlatform.libc == "musl") autoconf;
buildInputs = optional interactive readline70;
···
# build `version.h'.
enableParallelBuilding = false;
-
makeFlags = optional hostPlatform.isCygwin [
+
makeFlags = optional stdenv.hostPlatform.isCygwin [
"LOCAL_LDFLAGS=-Wl,--export-all,--out-implib,libbash.dll.a"
"SHOBJ_LIBS=-lbash"
];
+3 -2
pkgs/stdenv/cross/default.nix
···
inherit config overlays;
selfBuild = false;
stdenv =
-
assert vanillaPackages.hostPlatform == localSystem;
-
assert vanillaPackages.targetPlatform == localSystem;
+
assert vanillaPackages.stdenv.buildPlatform == localSystem;
+
assert vanillaPackages.stdenv.hostPlatform == localSystem;
+
assert vanillaPackages.stdenv.targetPlatform == localSystem;
vanillaPackages.stdenv.override { targetPlatform = crossSystem; };
# It's OK to change the built-time dependencies
allowCustomOverrides = true;
+2 -2
pkgs/stdenv/darwin/default.nix
···
darwin = super.darwin // {
inherit (darwin) dyld ICU Libsystem libiconv;
-
} // lib.optionalAttrs (super.targetPlatform == localSystem) {
+
} // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
inherit (darwin) binutils binutils-unwrapped cctools;
};
-
} // lib.optionalAttrs (super.targetPlatform == localSystem) {
+
} // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
# Need to get rid of these when cross-compiling.
inherit binutils binutils-unwrapped;
};
+1 -1
pkgs/stdenv/generic/make-derivation.nix
···
builder = attrs.realBuilder or stdenv.shell;
args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
inherit stdenv;
-
inherit (stdenv) system;
+
inherit (stdenv.hostPlatform) system;
userHook = config.stdenv.userHook or null;
__ignoreNulls = true;
+1 -1
pkgs/stdenv/linux/default.nix
···
gnumake gnused gnutar gnugrep gnupatch patchelf
attr acl paxctl zlib pcre;
${localSystem.libc} = getLibc prevStage;
-
} // lib.optionalAttrs (super.targetPlatform == localSystem) {
+
} // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
# Need to get rid of these when cross-compiling.
inherit (prevStage) binutils binutils-unwrapped;
gcc = cc;
+3 -3
pkgs/tools/X11/xwinwrap/default.nix
···
xlibsWrapper
];
-
buildPhase = if stdenv.system == "x86_64-linux" then ''
+
buildPhase = if stdenv.hostPlatform.system == "x86_64-linux" then ''
make all64
-
'' else if stdenv.system == "i686-linux" then ''
+
'' else if stdenv.hostPlatform.system == "i686-linux" then ''
make all32
-
'' else throw "xwinwrap is not supported on ${stdenv.system}";
+
'' else throw "xwinwrap is not supported on ${stdenv.hostPlatform.system}";
installPhase = ''
mkdir -p $out/bin
+1 -1
pkgs/tools/admin/bluemix-cli/default.nix
···
version = "0.8.0";
src =
-
if stdenv.system == "i686-linux" then
+
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
name = "linux32-${version}.tar.gz";
url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux32";
+1 -1
pkgs/tools/admin/google-cloud-sdk/default.nix
···
name = "google-cloud-sdk-${version}";
version = "206.0.0";
-
src = fetchurl (sources name stdenv.system);
+
src = fetchurl (sources name stdenv.hostPlatform.system);
buildInputs = [ python makeWrapper ];
+1 -1
pkgs/tools/archivers/gnutar/default.nix
···
# May have some issues with root compilation because the bootstrap tool
# cannot be used as a login shell for now.
-
FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux" || stdenv.isSunOS) "1";
+
FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv7l-linux" || stdenv.isSunOS) "1";
preConfigure = if stdenv.isCygwin then ''
sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
+5 -7
pkgs/tools/archivers/zpaq/zpaqd.nix
···
-
{ stdenv, fetchurl, unzip
-
, hostPlatform
-
}:
+
{ stdenv, fetchurl, unzip }:
let
# Generated upstream information
···
};
compileFlags = stdenv.lib.concatStringsSep " " ([ "-O3" "-mtune=generic" "-DNDEBUG" ]
-
++ stdenv.lib.optional (hostPlatform.isUnix) "-Dunix -pthread"
-
++ stdenv.lib.optional (hostPlatform.isi686) "-march=i686"
-
++ stdenv.lib.optional (hostPlatform.isx86_64) "-march=nocona"
-
++ stdenv.lib.optional (!hostPlatform.isx86) "-DNOJIT");
+
++ stdenv.lib.optional (stdenv.hostPlatform.isUnix) "-Dunix -pthread"
+
++ stdenv.lib.optional (stdenv.hostPlatform.isi686) "-march=i686"
+
++ stdenv.lib.optional (stdenv.hostPlatform.isx86_64) "-march=nocona"
+
++ stdenv.lib.optional (!stdenv.hostPlatform.isx86) "-DNOJIT");
in
stdenv.mkDerivation {
inherit (s) name version;
+1 -1
pkgs/tools/bootloaders/refind/default.nix
···
};
inherit
-
(archids.${stdenv.system} or (throw "unsupported system: ${stdenv.system}"))
+
(archids.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}"))
hostarch efiPlatform;
in
+1 -1
pkgs/tools/compression/bzip2/default.nix
···
{ stdenv, fetchurl
-
, linkStatic ? (stdenv.system == "i686-cygwin")
+
, linkStatic ? (stdenv.hostPlatform.system == "i686-cygwin")
}:
stdenv.mkDerivation rec {
+1 -1
pkgs/tools/filesystems/sshfs-fuse/default.nix
···
checkInputs = [ which python3Packages.pytest ];
NIX_CFLAGS_COMPILE = stdenv.lib.optional
-
(stdenv.system == "i686-linux")
+
(stdenv.hostPlatform.system == "i686-linux")
"-D_FILE_OFFSET_BITS=64";
postInstall = ''
+2 -3
pkgs/tools/graphics/optipng/default.nix
···
{ stdenv, fetchurl, libpng, static ? false
-
, buildPlatform, hostPlatform
}:
# This package comes with its own copy of zlib, libpng and pngxtern
···
configureFlags = [
"--with-system-zlib"
"--with-system-libpng"
-
] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [
+
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
#"-prefix=$out"
];
-
postInstall = if hostPlatform != buildPlatform && hostPlatform.isWindows then ''
+
postInstall = if stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isWindows then ''
mv "$out"/bin/optipng{,.exe}
'' else null;
+5 -5
pkgs/tools/graphics/pngout/default.nix
···
{stdenv, fetchurl}:
let
-
folder = if stdenv.system == "i686-linux" then "i686"
-
else if stdenv.system == "x86_64-linux" then "x86_64"
-
else throw "Unsupported system: ${stdenv.system}";
+
folder = if stdenv.hostPlatform.system == "i686-linux" then "i686"
+
else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
+
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
in
stdenv.mkDerivation {
name = "pngout-20130221";
···
mkdir -p $out/bin
cp ${folder}/pngout $out/bin
-
${if stdenv.system == "i686-linux" then ''
+
${if stdenv.hostPlatform.system == "i686-linux" then ''
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/pngout
-
'' else if stdenv.system == "x86_64-linux" then ''
+
'' else if stdenv.hostPlatform.system == "x86_64-linux" then ''
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/pngout
'' else ""}
'';
+5 -5
pkgs/tools/misc/bandwidth/default.nix
···
let
arch =
-
if stdenv.system == "x86_64-linux" then "bandwidth64"
-
else if stdenv.system == "i686-linux" then "bandwidth32"
-
else if stdenv.system == "x86_64-darwin" then "bandwidth-mac64"
-
else if stdenv.system == "i686-darwin" then "bandwidth-mac32"
-
else if stdenv.system == "i686-cygwin" then "bandwidth-win32"
+
if stdenv.hostPlatform.system == "x86_64-linux" then "bandwidth64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "bandwidth32"
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then "bandwidth-mac64"
+
else if stdenv.hostPlatform.system == "i686-darwin" then "bandwidth-mac32"
+
else if stdenv.hostPlatform.system == "i686-cygwin" then "bandwidth-win32"
else throw "Unknown architecture";
in
stdenv.mkDerivation rec {
+12 -13
pkgs/tools/misc/coreutils/default.nix
···
{ stdenv, lib, buildPackages
, autoreconfHook, texinfo, fetchurl, perl, xz, libiconv, gmp ? null
-
, hostPlatform, buildPlatform
, aclSupport ? false, acl ? null
, attrSupport ? false, attr ? null
, selinuxSupport? false, libselinux ? null, libsepol ? null
···
sha256 = "0plm1zs9il6bb5mk881qvbghq4glc8ybbgakk2lfzb0w64fgml4j";
};
-
patches = optional hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch;
+
patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch;
# The test tends to fail on btrfs and maybe other unusual filesystems.
-
postPatch = optionalString (!hostPlatform.isDarwin) ''
+
postPatch = optionalString (!stdenv.hostPlatform.isDarwin) ''
sed '2i echo Skipping dd sparse test && exit 0' -i ./tests/dd/sparse.sh
sed '2i echo Skipping cp sparse test && exit 0' -i ./tests/cp/sparse.sh
sed '2i echo Skipping rm deep-2 test && exit 0' -i ./tests/rm/deep-2.sh
···
configureFlags =
optional (singleBinary != false)
("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}")
-
++ optional hostPlatform.isSunOS "ac_cv_func_inotify_init=no"
+
++ optional stdenv.hostPlatform.isSunOS "ac_cv_func_inotify_init=no"
++ optional withPrefix "--program-prefix=g"
-
++ optionals (hostPlatform != buildPlatform && hostPlatform.libc == "glibc") [
+
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "glibc") [
# TODO(19b98110126fde7cbb1127af7e3fe1568eacad3d): Needed for fstatfs() I
# don't know why it is not properly detected cross building with glibc.
"fu_cv_sys_stat_statfs2_bsize=yes"
···
buildInputs = [ gmp ]
++ optional aclSupport acl
++ optional attrSupport attr
-
++ optionals hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch
+
++ optionals stdenv.hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch
++ optionals selinuxSupport [ libselinux libsepol ]
# TODO(@Ericson2314): Investigate whether Darwin could benefit too
-
++ optional (hostPlatform != buildPlatform && hostPlatform.libc != "glibc") libiconv;
+
++ optional (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc != "glibc") libiconv;
# The tests are known broken on Cygwin
# (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025),
# Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351),
# and {Open,Free}BSD.
# With non-standard storeDir: https://github.com/NixOS/nix/issues/512
-
doCheck = hostPlatform == buildPlatform
-
&& hostPlatform.libc == "glibc"
+
doCheck = stdenv.hostPlatform == stdenv.buildPlatform
+
&& stdenv.hostPlatform.libc == "glibc"
&& builtins.storeDir == "/nix/store";
# Prevents attempts of running 'help2man' on cross-built binaries.
-
PERL = if hostPlatform == buildPlatform then null else "missing";
+
PERL = if stdenv.hostPlatform == stdenv.buildPlatform then null else "missing";
# Saw random failures like ‘help2man: can't get '--help' info from
# man/sha512sum.td/sha512sum’.
enableParallelBuilding = false;
NIX_LDFLAGS = optionalString selinuxSupport "-lsepol";
-
FORCE_UNSAFE_CONFIGURE = optionalString hostPlatform.isSunOS "1";
+
FORCE_UNSAFE_CONFIGURE = optionalString stdenv.hostPlatform.isSunOS "1";
# Works around a bug with 8.26:
# Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually). Stop.
-
preInstall = optionalString (hostPlatform != buildPlatform) ''
+
preInstall = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${buildPackages.coreutils}/bin/install -c|'
'';
-
postInstall = optionalString (hostPlatform != buildPlatform) ''
+
postInstall = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
rm $out/share/man/man1/*
cp ${buildPackages.coreutils}/share/man/man1/* $out/share/man/man1
'';
+1 -1
pkgs/tools/misc/execline/default.nix
···
"--with-dynlib=${skalibs.lib}/lib"
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
-
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
+
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/execline
+4 -5
pkgs/tools/misc/findutils/default.nix
···
{ stdenv, fetchurl
, coreutils
-
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation rec {
···
# Since glibc-2.25 the i686 tests hang reliably right after test-sleep.
doCheck
-
= !hostPlatform.isDarwin
-
&& !(hostPlatform.libc == "glibc" && hostPlatform.isi686)
-
&& (hostPlatform.libc != "musl")
-
&& hostPlatform == buildPlatform;
+
= !stdenv.hostPlatform.isDarwin
+
&& !(stdenv.hostPlatform.libc == "glibc" && stdenv.hostPlatform.isi686)
+
&& (stdenv.hostPlatform.libc != "musl")
+
&& stdenv.hostPlatform == stdenv.buildPlatform;
outputs = [ "out" "info" ];
+6 -6
pkgs/tools/misc/grub/2.0x.nix
···
"aarch64-linux".target = "arm64";
};
-
canEfi = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
-
inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems);
+
canEfi = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
+
inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems);
version = "2.02";
···
configureFlags = [ "--enable-grub-mount" ] # dep of os-prober
++ optional zfsSupport "--enable-libzfs"
-
++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ]
-
++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.system}.target}"];
+
++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}" "--program-prefix=" ]
+
++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}"];
# save target that grub is compiled for
grubTarget = if efiSupport
-
then "${efiSystemsInstall.${stdenv.system}.target}-efi"
+
then "${efiSystemsInstall.${stdenv.hostPlatform.system}.target}-efi"
else if inPCSystems
-
then "${pcSystems.${stdenv.system}.target}-pc"
+
then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc"
else "";
doCheck = false;
+4 -4
pkgs/tools/misc/grub/pvgrub_image/default.nix
···
tar -cf memdisk.tar grub.cfg
# We include all modules except all_video.mod as otherwise grub will fail printing "no symbol table"
# if we include it.
-
grub-mkimage -O "${efiSystemsBuild.${stdenv.system}.target}-xen" -c grub-bootstrap.cfg \
-
-m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" \
-
$(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$')
+
grub-mkimage -O "${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen" -c grub-bootstrap.cfg \
+
-m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" \
+
$(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$')
mkdir -p "$out/lib/grub-xen"
-
cp "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" $out/lib/grub-xen/
+
cp "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" $out/lib/grub-xen/
'';
meta = with stdenv.lib; {
+2 -2
pkgs/tools/misc/grub/trusted.nix
···
"x86_64-linux".target = "i386";
};
-
inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems);
+
inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems);
version = if for_HP_laptop then "1.2.1" else "1.2.0";
···
# save target that grub is compiled for
grubTarget = if inPCSystems
-
then "${pcSystems.${stdenv.system}.target}-pc"
+
then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc"
else "";
doCheck = false;
+2 -2
pkgs/tools/misc/mongodb-compass/default.nix
···
] + ":${stdenv.cc.cc.lib}/lib64";
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb";
sha256 = "0x23jshnr0rafm5sn2vhq2y2gryg8mksahzyv5fszblgaxay234p";
}
else
-
throw "MongoDB compass is not supported on ${stdenv.system}";
+
throw "MongoDB compass is not supported on ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation {
name = "mongodb-compass-${version}";
+7 -7
pkgs/tools/misc/mprime/default.nix
···
let
srcDir =
-
if stdenv.system == "x86_64-linux" then "linux64"
-
else if stdenv.system == "i686-linux" then "linux"
-
else if stdenv.system == "x86_64-darwin" then "macosx64"
+
if stdenv.hostPlatform.system == "x86_64-linux" then "linux64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "linux"
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx64"
else throwSystem;
-
throwSystem = throw "Unsupported system: ${stdenv.system}";
+
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
gwnum =
-
if stdenv.system == "x86_64-linux" then "make64"
-
else if stdenv.system == "i686-linux" then "makefile"
-
else if stdenv.system == "x86_64-darwin" then "makemac"
+
if stdenv.hostPlatform.system == "x86_64-linux" then "make64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "makefile"
+
else if stdenv.hostPlatform.system == "x86_64-darwin" then "makemac"
else throwSystem;
in
+1 -1
pkgs/tools/misc/ocz-ssd-guru/default.nix
···
{ fetchurl, stdenv, xorg, freetype, fontconfig, libGLU_combined, glibc, makeWrapper }:
let
-
system = if stdenv.system == "x86_64-linux" then "linux64" else "linux32";
+
system = if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" else "linux32";
in
stdenv.mkDerivation rec {
name = "ocz-ssd-guru-${version}";
+1 -1
pkgs/tools/misc/os-prober/default.nix
···
install -Dt $out/share common.sh
# probes
-
case "${stdenv.system}" in
+
case "${stdenv.hostPlatform.system}" in
i686*|x86_64*) ARCH=x86;;
powerpc*) ARCH=powerpc;;
arm*) ARCH=arm;;
+2 -2
pkgs/tools/misc/otfcc/default.nix
···
-
{ stdenv, fetchFromGitHub, premake5, ninja, hostPlatform }:
+
{ stdenv, fetchFromGitHub, premake5, ninja }:
stdenv.mkDerivation rec {
name = "otfcc-${version}";
···
premake5 ninja
'';
-
ninjaFlags = let x = if hostPlatform.isi686 then "x86" else "x64"; in
+
ninjaFlags = let x = if stdenv.hostPlatform.isi686 then "x86" else "x64"; in
[ "-C" "build/ninja" "otfccdump_release_${x}" "otfccbuild_release_${x}" ];
installPhase = ''
+1 -1
pkgs/tools/misc/s6-portable-utils/default.nix
···
# Explicitly setting target ensures code can be compiled against a skalibs
# binary built on a different version of darwin.
# http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
-
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
+
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/s6-portable-utils/
+1 -1
pkgs/tools/misc/staruml/default.nix
···
name = "staruml-${version}";
src =
-
if stdenv.system == "i686-linux" then fetchurl {
+
if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
url = "http://staruml.io/download/release/v${version}/StarUML-v${version}-32-bit.deb";
sha256 = "0vb3k9m3l6pmsid4shlk0xdjsriq3gxzm8q7l04didsppg0vvq1n";
} else fetchurl {
+2 -2
pkgs/tools/misc/ttyrec/default.nix
···
-
{ stdenv, fetchurl, buildPlatform }:
+
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "ttyrec-${version}";
···
patches = [ ./clang-fixes.patch ];
-
makeFlags = stdenv.lib.optional buildPlatform.isLinux "CFLAGS=-DSVR4"
+
makeFlags = stdenv.lib.optional stdenv.buildPlatform.isLinux "CFLAGS=-DSVR4"
++ stdenv.lib.optional stdenv.cc.isClang "CC=clang";
installPhase = ''
+1 -1
pkgs/tools/networking/airfield/default.nix
···
let
nodePackages = import ./node.nix {
inherit pkgs;
-
system = stdenv.system;
+
system = stdenv.hostPlatform.system;
};
runtimeEnv = buildEnv {
+1 -1
pkgs/tools/networking/filegive/default.nix
···
buildInputs = [ go ];
buildPhase = ''
-
${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"}
+
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"}
mkdir $TMPDIR/go
export GOPATH=$TMPDIR/go
+5 -5
pkgs/tools/networking/logmein-hamachi/default.nix
···
let
arch =
-
if stdenv.system == "x86_64-linux" then "x64"
-
else if stdenv.system == "i686-linux" then "x86"
+
if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "x86"
else throwSystem;
-
throwSystem = throw "Unsupported system: ${stdenv.system}";
+
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
sha256 =
-
if stdenv.system == "x86_64-linux" then "11mxa4kls5xjj3462ycrfvfxb1xkk23p5m9iirvwsi0zdmhpnwm8"
-
else if stdenv.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62"
+
if stdenv.hostPlatform.system == "x86_64-linux" then "11mxa4kls5xjj3462ycrfvfxb1xkk23p5m9iirvwsi0zdmhpnwm8"
+
else if stdenv.hostPlatform.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62"
else throwSystem;
libraries = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ];
+1 -1
pkgs/tools/networking/ngrok-2/default.nix
···
} else if stdenv.isDarwin then fetchurl {
url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-386.zip";
sha256 = "0yfd250b55wcpgqd00rqfaa7a82f35fmybb31q5xwdbgc2i47pbh";
-
} else throw "platform ${stdenv.system} not supported!";
+
} else throw "platform ${stdenv.hostPlatform.system} not supported!";
sourceRoot = ".";
+1 -1
pkgs/tools/networking/s6-dns/default.nix
···
"--with-dynlib=${skalibs.lib}/lib"
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
-
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
+
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/s6-dns/
+1 -1
pkgs/tools/networking/s6-networking/default.nix
···
"--with-include=${lib.getDev sslLibs.${sslSupport}}/include"
"--with-lib=${lib.getLib sslLibs.${sslSupport}}/lib"
])
-
++ (lib.optional stdenv.isDarwin "--build=${stdenv.system}");
+
++ (lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/s6-networking/
+1 -1
pkgs/tools/networking/strongswan/default.nix
···
"--enable-af-alg" "--enable-xauth-pam" "--enable-chapoly"
"--enable-curl" ]
++ optionals stdenv.isx86_64 [ "--enable-aesni" "--enable-rdrand" ]
-
++ optional (stdenv.system == "i686-linux") "--enable-padlock"
+
++ optional (stdenv.hostPlatform.system == "i686-linux") "--enable-padlock"
++ optionals enableTNC [
"--disable-gmp" "--disable-aes" "--disable-md5" "--disable-sha1" "--disable-sha2" "--disable-fips-prf"
"--enable-eap-tnc" "--enable-eap-ttls" "--enable-eap-dynamic" "--enable-tnccs-20"
+1 -1
pkgs/tools/package-management/cargo-edit/cargo-edit.nix
···
{ pkgs }:
with pkgs;
-
let kernel = buildPlatform.parsed.kernel.name;
+
let kernel = stdenv.buildPlatform.parsed.kernel.name;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
+3 -3
pkgs/tools/package-management/cargo-update/cargo-update.nix
···
# Generated by carnix 0.6.6: carnix -o cargo-update.nix --src ./. Cargo.lock --standalone
-
{ lib, buildPlatform, buildRustCrate, fetchgit }:
-
let kernel = buildPlatform.parsed.kernel.name;
-
abi = buildPlatform.parsed.abi.name;
+
{ lib, stdenv, buildRustCrate, fetchgit }:
+
let kernel = stdenv.hostPlatform.parsed.kernel.name;
+
abi = stdenv.hostPlatform.parsed.abi.name;
include = includedFiles: src: builtins.filterSource (path: type:
lib.lists.any (f:
let p = toString (src + ("/" + f)); in
+1 -1
pkgs/tools/package-management/checkinstall/default.nix
···
./set-buildroot.patch
]
-
++ stdenv.lib.optional (stdenv.system == "x86_64-linux")
+
++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux")
# Force use of old memcpy so that installwatch works on Glibc <
# 2.14.
./use-old-memcpy.patch;
+2 -3
pkgs/tools/package-management/nix/default.nix
···
, pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli, boost
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns
, busybox-sandbox-shell
-
, hostPlatform, buildPlatform
, storeDir ? "/nix/store"
, stateDir ? "/nix/var"
, confDir ? "/etc"
···
"--with-sandbox-shell=${sh}/bin/busybox"
]
++ lib.optional (
-
hostPlatform != buildPlatform && hostPlatform ? nix && hostPlatform.nix ? system
-
) ''--with-system=${hostPlatform.nix.system}''
+
stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform ? nix && stdenv.hostPlatform.nix ? system
+
) ''--with-system=${stdenv.hostPlatform.nix.system}''
# RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50
++ lib.optional (!libseccomp.meta.available) "--disable-seccomp-sandboxing";
+1 -1
pkgs/tools/package-management/nixui/default.nix
···
};
nixui = (import ./nixui.nix {
inherit pkgs;
-
inherit (stdenv) system;
+
inherit (stdenv.hostPlatform) system;
})."nixui-git://github.com/matejc/nixui.git#0.2.1";
script = writeScript "nixui" ''
#! ${stdenv.shell}
+3 -3
pkgs/tools/security/afl/default.nix
···
let
afl-qemu = callPackage ./qemu.nix {};
-
qemu-exe-name = if stdenv.system == "x86_64-linux" then "qemu-x86_64"
-
else if stdenv.system == "i686-linux" then "qemu-i386"
-
else throw "afl: no support for ${stdenv.system}!";
+
qemu-exe-name = if stdenv.hostPlatform.system == "x86_64-linux" then "qemu-x86_64"
+
else if stdenv.hostPlatform.system == "i686-linux" then "qemu-i386"
+
else throw "afl: no support for ${stdenv.hostPlatform.system}!";
in
stdenv.mkDerivation rec {
+4 -4
pkgs/tools/security/afl/qemu.nix
···
aflTypesFile = writeText "afl-types.h"
(builtins.readFile ./qemu-patches/afl-types.h);
-
cpuTarget = if stdenv.system == "x86_64-linux" then "x86_64-linux-user"
-
else if stdenv.system == "i686-linux" then "i386-linux-user"
-
else throw "afl: no support for ${stdenv.system}!";
+
cpuTarget = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-user"
+
else if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-user"
+
else throw "afl: no support for ${stdenv.hostPlatform.system}!";
in
stdenv.mkDerivation rec {
name = "afl-${n}";
···
vde2 texinfo libuuid flex bison lzo snappy autoconf
libcap_ng gnutls
]
-
++ optionals (hasSuffix "linux" stdenv.system) [ libaio ];
+
++ optionals (hasSuffix "linux" stdenv.hostPlatform.system) [ libaio ];
enableParallelBuilding = true;
+6 -6
pkgs/tools/security/encryptr/default.nix
···
}:
let
-
arch = if stdenv.system == "x86_64-linux" then "amd"
-
else if stdenv.system == "i686-linux" then "i386"
-
else throw "Encryptr for ${stdenv.system} not supported!";
+
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd"
+
else if stdenv.hostPlatform.system == "i686-linux" then "i386"
+
else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!";
-
sha256 = if stdenv.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2"
-
else if stdenv.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm"
-
else throw "Encryptr for ${stdenv.system} not supported!";
+
sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2"
+
else if stdenv.hostPlatform.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm"
+
else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!";
in stdenv.mkDerivation rec {
name = "encryptr-${version}";
+4 -3
pkgs/tools/security/enpass/default.nix
···
-
{stdenv, system, fetchurl, dpkg, openssl, xorg
+
{ stdenv, fetchurl, dpkg, openssl, xorg
, glib, libGLU_combined, libpulseaudio, zlib, dbus, fontconfig, freetype
, gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig
, makeWrapper , python, pythonPackages, lib
-
, libredirect, lsof}:
+
, libredirect, lsof
+
}:
let
all_data = builtins.fromJSON (builtins.readFile ./data.json);
···
x86_64-linux = "amd64";
};
-
data = all_data.${system_map.${system} or (throw "Unsupported platform")};
+
data = all_data.${system_map.${stdenv.hostPlatform.system} or (throw "Unsupported platform")};
baseUrl = http://repo.sinew.in;
+3 -3
pkgs/tools/security/pcsc-scm-scl011/default.nix
···
{ stdenv, fetchurl, unzip, libusb }:
let
-
arch = if stdenv.system == "i686-linux" then "32"
-
else if stdenv.system == "x86_64-linux" then "64"
-
else throw "Unsupported system: ${stdenv.system}";
+
arch = if stdenv.hostPlatform.system == "i686-linux" then "32"
+
else if stdenv.hostPlatform.system == "x86_64-linux" then "64"
+
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
in
stdenv.mkDerivation rec {
name = "pcsc-scm-scl-${version}";
+1 -1
pkgs/tools/security/sshuttle/default.nix
···
patches = [ ./sudo.patch ];
-
nativeBuildInputs = [ makeWrapper python3Packages.setuptools_scm ] ++ stdenv.lib.optional (stdenv.system != "i686-linux") pandoc;
+
nativeBuildInputs = [ makeWrapper python3Packages.setuptools_scm ] ++ stdenv.lib.optional (stdenv.hostPlatform.system != "i686-linux") pandoc;
buildInputs =
[ coreutils openssh procps nettools ]
++ stdenv.lib.optionals stdenv.isLinux [ iptables ];
+1 -1
pkgs/tools/system/s6-rc/default.nix
···
"--with-dynlib=${s6.out}/lib"
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
-
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
+
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/s6-rc/
+1 -1
pkgs/tools/system/s6/default.nix
···
"--with-dynlib=${execline.lib}/lib"
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
-
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
+
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/s6/
+1 -1
pkgs/tools/system/storebrowse/default.nix
···
mkdir $TMPDIR/go
export GOPATH=$TMPDIR/go
-
${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"}
+
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"}
GOSQLITE=$GOPATH/src/code.google.com/p/gosqlite
mkdir -p $GOSQLITE
+1 -1
pkgs/tools/text/gawk/default.nix
···
{ stdenv, fetchurl
# TODO: links -lsigsegv but loses the reference for some reason
-
, withSigsegv ? (false && stdenv.system != "x86_64-cygwin"), libsigsegv
+
, withSigsegv ? (false && stdenv.hostPlatform.system != "x86_64-cygwin"), libsigsegv
, interactive ? false, readline
/* Test suite broke on:
+2 -3
pkgs/tools/text/gnupatch/default.nix
···
{ stdenv, fetchurl
, ed, autoreconfHook
-
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation rec {
···
buildInputs = stdenv.lib.optional doCheck ed;
nativeBuildInputs = [ autoreconfHook ];
-
configureFlags = stdenv.lib.optionals (hostPlatform != buildPlatform) [
+
configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"ac_cv_func_strnlen_working=yes"
];
-
doCheck = hostPlatform.libc != "musl"; # not cross;
+
doCheck = stdenv.hostPlatform.libc != "musl"; # not cross;
meta = {
description = "GNU Patch, a program to apply differences to files";
+2 -4
pkgs/tools/text/html-tidy/default.nix
···
-
{ stdenv, fetchFromGitHub, cmake, libxslt
-
, hostPlatform
-
}:
+
{ stdenv, fetchFromGitHub, cmake, libxslt }:
stdenv.mkDerivation rec {
name = "html-tidy-${version}";
···
nativeBuildInputs = [ cmake libxslt/*manpage*/ ];
cmakeFlags = stdenv.lib.optional
-
(hostPlatform.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows";
+
(stdenv.hostPlatform.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows";
# ATM bin/tidy is statically linked, as upstream provides no other option yet.
# https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107
+3 -3
pkgs/tools/text/xidel/default.nix
···
#};
src =
-
if stdenv.system == "x86_64-linux" then
+
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_amd64.deb";
sha256 = "0hskc74y7p4j1x33yx0w4fvr610p2yimas8pxhr6bs7mb9b300h7";
}
-
else if stdenv.system == "i686-linux" then
+
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_i386.deb";
sha256 = "07yk5sk1p4jm0jmgjwdm2wq8d2wybi1wkn1qq5j5y03z1pdc3fi6";
}
-
else throw "xidel is not supported on ${stdenv.system}";
+
else throw "xidel is not supported on ${stdenv.hostPlatform.system}";
buildInputs = [ dpkg ];
+2 -2
pkgs/tools/typesetting/kindlegen/default.nix
···
"i686-darwin" = "0zniyn0s41fxqrajbgwxbcsj5vzf9m7a6yvdz2b11mphr00kpbbs";
"x86_64-cygwin" = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h";
"i686-cygwin" = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h";
-
}."${stdenv.system}" or (throw "system #{stdenv.system.} is not supported");
+
}."${stdenv.hostPlatform.system}" or (throw "system #{stdenv.hostPlatform.system.} is not supported");
url = {
"x86_64-linux" = "http://kindlegen.s3.amazonaws.com/kindlegen_linux_2.6_i386_v${fileVersion}.tar.gz";
···
"i686-darwin" = "http://kindlegen.s3.amazonaws.com/KindleGen_Mac_i386_v${fileVersion}.zip";
"x86_64-cygwin" = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip";
"i686-cygwin" = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip";
-
}."${stdenv.system}" or (throw "system #{stdenv.system.} is not supported");
+
}."${stdenv.hostPlatform.system}" or (throw "system #{stdenv.hostPlatform.system.} is not supported");
in stdenv.mkDerivation rec {
name = "kindlegen-${version}";
+1 -1
pkgs/top-level/aliases.nix
···
libgnome_keyring = libgnome-keyring; # added 2018-02-25
libgnome_keyring3 = libgnome-keyring3; # added 2018-02-25
libgumbo = gumbo; # added 2018-01-21
-
libintlOrEmpty = stdenv.lib.optional (!stdenv.isLinux || hostPlatform.libc != "glibc") gettext; # added 2018-03-14
+
libintlOrEmpty = stdenv.lib.optional (!stdenv.isLinux || stdenv.hostPlatform.libc != "glibc") gettext; # added 2018-03-14
libjson_rpc_cpp = libjson-rpc-cpp; # added 2017-02-28
libmysql = mysql.connector-c; # added # 2017-12-28, this was a misnomer refering to libmysqlclient
librecad2 = librecad; # backwards compatibility alias, added 2015-10
+47 -48
pkgs/top-level/all-packages.nix
···
# A stdenv capable of building 32-bit binaries. On x86_64-linux,
# it uses GCC compiled with multilib support; on i686-linux, it's
# just the plain stdenv.
-
stdenv_32bit = lowPrio (if hostPlatform.is32bit then stdenv else multiStdenv);
+
stdenv_32bit = lowPrio (if stdenv.hostPlatform.is32bit then stdenv else multiStdenv);
stdenvNoCC = stdenv.override { cc = null; };
···
chunksync = callPackage ../tools/backup/chunksync { };
cipherscan = callPackage ../tools/security/cipherscan {
-
openssl = if stdenv.system == "x86_64-linux"
+
openssl = if stdenv.hostPlatform.system == "x86_64-linux"
then openssl-chacha
else openssl;
};
···
cc = gcc;
# Remove libcxx/libcxxabi, and add clang for AS if on darwin (it uses
# clang's internal assembler).
-
extraBuildInputs = lib.optional hostPlatform.isDarwin clang.cc;
+
extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc;
};
gcc7Stdenv = overrideCC gccStdenv gcc7;
gcc8Stdenv = overrideCC gccStdenv gcc8;
wrapCCMulti = cc:
-
if system == "x86_64-linux" then let
+
if stdenv.targetPlatform.system == "x86_64-linux" then let
# Binutils with glibc multi
bintools = cc.bintools.override {
libc = glibc_multi;
···
extraBuildCommands = ''
echo "dontMoveLib64=1" >> $out/nix-support/setup-hook
'';
-
}) else throw "Multilib ${cc.name} not supported on ‘${system}’";
+
}) else throw "Multilib ${cc.name} not supported for ‘${stdenv.targetPlatform.system}’";
wrapClangMulti = clang:
-
if system == "x86_64-linux" then
+
if stdenv.targetPlatform.system == "x86_64-linux" then
callPackage ../development/compilers/llvm/multi.nix {
inherit clang;
gcc32 = pkgsi686Linux.gcc;
gcc64 = pkgs.gcc;
-
else throw "Multilib ${clang.cc.name} not supported on '${system}'";
+
else throw "Multilib ${clang.cc.name} not supported for '${stdenv.targetPlatform.system}'";
gcc_multi = wrapCCMulti gcc;
clang_multi = wrapClangMulti clang;
···
# The GCC used to build libc for the target platform. Normal gccs will be
# built with, and use, that cross-compiled libc.
-
gccCrossStageStatic = assert targetPlatform != buildPlatform; let
+
gccCrossStageStatic = assert stdenv.targetPlatform != stdenv.hostPlatform; let
libcCross1 =
-
if targetPlatform.libc == "msvcrt" then targetPackages.windows.mingw_w64_headers
-
else if targetPlatform.libc == "libSystem" then darwin.xcode
-
else if targetPlatform.libc == "musl" then musl
+
if stdenv.targetPlatform.libc == "msvcrt" then targetPackages.windows.mingw_w64_headers
+
else if stdenv.targetPlatform.libc == "libSystem" then darwin.xcode
+
else if stdenv.targetPlatform.libc == "musl" then musl
else null;
binutils1 = wrapBintoolsWith {
bintools = binutils-unwrapped;
···
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isSunOS && !isDarwin && (isi686 || isx86_64));
-
libcCross = if targetPlatform != buildPlatform then libcCross else null;
+
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
isl = if !stdenv.isDarwin then isl_0_14 else null;
cloog = if !stdenv.isDarwin then cloog else null;
···
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
-
libcCross = if targetPlatform != buildPlatform then libcCross else null;
+
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
isl = if !stdenv.isDarwin then isl_0_11 else null;
···
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
-
libcCross = if targetPlatform != buildPlatform then libcCross else null;
+
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
isl = if !stdenv.isDarwin then isl_0_14 else null;
}));
···
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
-
libcCross = if targetPlatform != buildPlatform then libcCross else null;
+
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
isl = if !stdenv.isDarwin then isl_0_14 else null;
}));
···
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
-
libcCross = if targetPlatform != buildPlatform then libcCross else null;
+
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
isl = if !stdenv.isDarwin then isl_0_17 else null;
}));
···
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
-
libcCross = if targetPlatform != buildPlatform then libcCross else null;
+
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
isl = if !stdenv.isDarwin then isl_0_17 else null;
}));
···
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
-
libcCross = if targetPlatform != buildPlatform then libcCross else null;
+
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
isl = isl_0_17;
}));
···
# Others should instead delegate to the next stage's choice with
# `targetPackages.stdenv.cc.bintools`. This one is different just to
# provide the default choice, avoiding infinite recursion.
-
bintools ? if targetPlatform.isDarwin then darwin.binutils else binutils
+
bintools ? if stdenv.targetPlatform.isDarwin then darwin.binutils else binutils
, libc ? bintools.libc
, ...
} @ extraArgs:
callPackage ../build-support/cc-wrapper (let self = {
-
nativeTools = targetPlatform == hostPlatform && stdenv.cc.nativeTools or false;
-
nativeLibc = targetPlatform == hostPlatform && stdenv.cc.nativeLibc or false;
+
nativeTools = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeTools or false;
+
nativeLibc = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeLibc or false;
nativePrefix = stdenv.cc.nativePrefix or "";
noLibc = !self.nativeLibc && (self.libc == null);
···
wrapBintoolsWith =
{ bintools
-
, libc ? if targetPlatform != hostPlatform then libcCross else stdenv.cc.libc
+
, libc ? if stdenv.targetPlatform != stdenv.hostPlatform then libcCross else stdenv.cc.libc
, ...
} @ extraArgs:
callPackage ../build-support/bintools-wrapper (let self = {
-
nativeTools = targetPlatform == hostPlatform && stdenv.cc.nativeTools or false;
-
nativeLibc = targetPlatform == hostPlatform && stdenv.cc.nativeLibc or false;
+
nativeTools = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeTools or false;
+
nativeLibc = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeLibc or false;
nativePrefix = stdenv.cc.nativePrefix or "";
noLibc = (self.libc == null);
···
binutils-unwrapped = callPackage ../development/tools/misc/binutils {
# FHS sys dirs presumably only have stuff for the build platform
-
noSysDirs = (targetPlatform != buildPlatform) || noSysDirs;
+
noSysDirs = (stdenv.targetPlatform != stdenv.hostPlatform) || noSysDirs;
};
binutils = wrapBintoolsWith {
bintools = binutils-unwrapped;
···
bicgl = callPackage ../development/libraries/science/biology/bicgl { };
# TODO(@Ericson2314): Build bionic libc from source
-
bionic = assert hostPlatform.useAndroidPrebuilt;
-
androidenv."androidndkPkgs_${hostPlatform.ndkVer}".libraries;
+
bionic = assert stdenv.hostPlatform.useAndroidPrebuilt;
+
androidenv."androidndkPkgs_${stdenv.hostPlatform.ndkVer}".libraries;
bobcat = callPackage ../development/libraries/bobcat { };
···
else if name == "uclibc" then targetPackages.uclibcCross
else if name == "musl" then targetPackages.muslCross or muslCross
else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64
-
else if targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries
+
else if stdenv.targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries
else if name == "libSystem" then targetPackages.darwin.xcode
else throw "Unknown libc";
-
libcCross = assert targetPlatform != buildPlatform; libcCrossChooser targetPlatform.libc;
+
libcCross = assert stdenv.targetPlatform != stdenv.buildPlatform; libcCrossChooser stdenv.targetPlatform.libc;
# Only supported on Linux, using glibc
-
glibcLocales = if hostPlatform.libc == "glibc" then callPackage ../development/libraries/glibc/locales.nix { } else null;
+
glibcLocales = if stdenv.hostPlatform.libc == "glibc" then callPackage ../development/libraries/glibc/locales.nix { } else null;
glibcInfo = callPackage ../development/libraries/glibc/info.nix { };
···
gnu-config = callPackage ../development/libraries/gnu-config { };
-
gnu-efi = if hostPlatform.isEfi
+
gnu-efi = if stdenv.hostPlatform.isEfi
then callPackage ../development/libraries/gnu-efi { }
else null;
···
# We also provide `libiconvReal`, which will always be a standalone libiconv,
# just in case you want it regardless of platform.
libiconv =
-
if (hostPlatform.libc == "glibc" || hostPlatform.libc == "musl")
-
then glibcIconv (if hostPlatform != buildPlatform
+
if (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl")
+
then glibcIconv (if stdenv.hostPlatform != stdenv.buildPlatform
then libcCross
else stdenv.cc.libc)
-
else if hostPlatform.isDarwin
+
else if stdenv.hostPlatform.isDarwin
then darwin.libiconv
else libiconvReal;
···
# On non-GNU systems we need GNU Gettext for libintl.
-
libintl = if hostPlatform.libc != "glibc" then gettext else null;
+
libintl = if stdenv.hostPlatform.libc != "glibc" then gettext else null;
libid3tag = callPackage ../development/libraries/libid3tag {
gperf = gperf_3_0;
···
# Default derivation with libGL.so.1 to link into /run/opengl-drivers (if need)
libGL_driver = libGLDarwinOr mesa_drivers;
-
libGLSupported = lib.elem system lib.platforms.mesaPlatforms;
+
libGLSupported = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms;
libGLDarwin = callPackage ../development/libraries/mesa-darwin {
inherit (darwin.apple_sdk.frameworks) OpenGL;
···
abiVersion = "6";
ncurses =
-
if hostPlatform.useiOSPrebuilt
+
if stdenv.hostPlatform.useiOSPrebuilt
then null
else callPackage ../development/libraries/ncurses { };
···
wxGTK28 = callPackage ../development/libraries/wxwidgets/2.8 {
inherit (gnome2) GConf;
-
withMesa = lib.elem system lib.platforms.mesaPlatforms;
+
withMesa = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms;
wxGTK29 = callPackage ../development/libraries/wxwidgets/2.9 {
inherit (gnome2) GConf;
inherit (darwin.stubs) setfile;
inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QuickTime;
-
withMesa = lib.elem system lib.platforms.mesaPlatforms;
+
withMesa = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms;
wxGTK30 = callPackage ../development/libraries/wxwidgets/3.0 {
inherit (gnome2) GConf;
inherit (darwin.stubs) setfile;
inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit;
-
withMesa = lib.elem system lib.platforms.mesaPlatforms;
+
withMesa = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms;
wxGTK31 = callPackage ../development/libraries/wxwidgets/3.1 {};
···
linuxPackages_custom = { version, src, configfile, allowImportFromDerivation ? true }:
recurseIntoAttrs (linuxPackagesFor (pkgs.linuxManualConfig {
inherit version src configfile stdenv allowImportFromDerivation;
-
inherit (stdenv) hostPlatform;
}));
# This serves as a test for linuxPackages_custom
···
}) murmur_git;
mumble_overlay = callPackage ../applications/networking/mumble/overlay.nix {
-
mumble_i686 = if system == "x86_64-linux"
+
mumble_i686 = if stdenv.hostPlatform.system == "x86_64-linux"
then pkgsi686Linux.mumble
else null;
···
virtualgl = callPackage ../tools/X11/virtualgl {
-
virtualglLib_i686 = if system == "x86_64-linux"
+
virtualglLib_i686 = if stdenv.hostPlatform.system == "x86_64-linux"
then pkgsi686Linux.virtualglLib
else null;
···
primus = callPackage ../tools/X11/primus {
stdenv_i686 = pkgsi686Linux.stdenv;
-
primusLib_i686 = if system == "x86_64-linux"
+
primusLib_i686 = if stdenv.hostPlatform.system == "x86_64-linux"
then pkgsi686Linux.primusLib
else null;
bumblebee = callPackage ../tools/X11/bumblebee {
nvidia_x11 = linuxPackages.nvidia_x11;
-
nvidia_x11_i686 = if system == "x86_64-linux"
+
nvidia_x11_i686 = if stdenv.hostPlatform.system == "x86_64-linux"
then pkgsi686Linux.linuxPackages.nvidia_x11.override { libsOnly = true; }
else null;
-
libglvnd_i686 = if system == "x86_64-linux"
+
libglvnd_i686 = if stdenv.hostPlatform.system == "x86_64-linux"
then pkgsi686Linux.libglvnd
else null;
···
nixos = configuration:
(import (self.path + "/nixos/lib/eval-config.nix") {
-
inherit (pkgs) system;
+
inherit (pkgs.stdenv.hostPlatform) system;
modules = [(
{ lib, ... }: {
config.nixpkgs.pkgs = lib.mkDefault pkgs;
···
mount wall hostname more sysctl getconf
getent locale killall xxd watch;
-
fts = if hostPlatform.isMusl then netbsd.fts else null;
+
fts = if stdenv.hostPlatform.isMusl then netbsd.fts else null;
inherit (recurseIntoAttrs (callPackages ../os-specific/bsd { }))
netbsd;
+1 -1
pkgs/top-level/darwin-packages.nix
···
binutils = pkgs.wrapBintoolsWith {
libc =
-
if pkgs.targetPlatform != pkgs.hostPlatform
+
if stdenv.targetPlatform != stdenv.hostPlatform
then pkgs.libcCross
else pkgs.stdenv.cc.libc;
bintools = darwin.binutils-unwrapped;
-2
pkgs/top-level/haskell-packages.nix
···
{ buildPackages, pkgs
, newScope
-
, buildPlatform, targetPlatform
}:
let
···
ghc822 = callPackage ../development/compilers/ghc/8.2.2.nix rec {
bootPkgs = packages.ghc821Binary;
inherit (bootPkgs) hscolour alex happy;
-
inherit buildPlatform targetPlatform;
sphinx = pkgs.python3Packages.sphinx;
buildLlvmPackages = buildPackages.llvmPackages_39;
llvmPackages = pkgs.llvmPackages_39;
+3 -1
pkgs/top-level/ocaml-packages.nix
···
-
{ lib, callPackage, newScope, pkgs, config, system }:
+
{ lib, callPackage, newScope, pkgs, config }:
let
+
inherit (pkgs.stdenv.hostPlatform) system;
+
mkOcamlPackages = ocaml: overrides:
let
packageSet = self:
+3 -3
pkgs/top-level/python-packages.nix
···
};
};
-
gurobipy = if stdenv.system == "x86_64-darwin"
+
gurobipy = if stdenv.hostPlatform.system == "x86_64-darwin"
then callPackage ../development/python-modules/gurobipy/darwin.nix {
inherit (pkgs.darwin) cctools insert_dylib;
-
else if stdenv.system == "x86_64-linux"
+
else if stdenv.hostPlatform.system == "x86_64-linux"
then callPackage ../development/python-modules/gurobipy/linux.nix {}
-
else throw "gurobipy not yet supported on ${stdenv.system}";
+
else throw "gurobipy not yet supported on ${stdenv.hostPlatform.system}";
hbmqtt = callPackage ../development/python-modules/hbmqtt { };
+4 -4
pkgs/top-level/splice.nix
···
defaultBuildBuildScope = pkgs.buildPackages.buildPackages // pkgs.buildPackages.buildPackages.xorg;
defaultBuildHostScope = pkgs.buildPackages // pkgs.buildPackages.xorg;
defaultBuildTargetScope =
-
if pkgs.targetPlatform == pkgs.hostPlatform
+
if pkgs.stdenv.targetPlatform == pkgs.stdenv.hostPlatform
then defaultBuildHostScope
-
else assert pkgs.hostPlatform == pkgs.buildPlatform; defaultHostTargetScope;
+
else assert pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform; defaultHostTargetScope;
defaultHostHostScope = {}; # unimplemented
defaultHostTargetScope = pkgs // pkgs.xorg;
defaultTargetTargetScope = pkgs.targetPackages // pkgs.targetPackages.xorg or {};
···
pkgsTargetTarget = defaultTargetTargetScope;
} // {
# These should never be spliced under any circumstances
-
inherit (pkgs) pkgs buildPackages targetPackages
-
buildPlatform targetPlatform hostPlatform;
+
inherit (pkgs) pkgs buildPackages targetPackages;
+
inherit (pkgs.stdenv) buildPlatform targetPlatform hostPlatform;
};
in
+4 -4
pkgs/top-level/unix-tools.nix
···
-
{ pkgs, buildEnv, runCommand, hostPlatform, lib, stdenv }:
+
{ pkgs, buildEnv, runCommand, lib, stdenv }:
# These are some unix tools that are commonly included in the /usr/bin
# and /usr/sbin directory under more normal distributions. Along with
···
version = "1003.1-2008";
singleBinary = cmd: providers: let
-
provider = providers.${hostPlatform.parsed.kernel.name};
+
provider = providers.${stdenv.hostPlatform.parsed.kernel.name};
bin = "${getBin provider}/bin/${cmd}";
manpage = "${getOutput "man" provider}/share/man/man1/${cmd}.1.gz";
in runCommand "${cmd}-${version}" {
···
linux = pkgs.utillinux;
};
getconf = {
-
linux = if hostPlatform.libc == "glibc" then pkgs.glibc
+
linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc
else pkgs.netbsd.getconf;
darwin = pkgs.darwin.system_cmds;
};
getent = {
-
linux = if hostPlatform.libc == "glibc" then pkgs.glibc
+
linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc
else pkgs.netbsd.getent;
darwin = pkgs.netbsd.getent;
};