···1074* Make sure libraries build for all Python interpreters.
1075* By default we enable tests. Make sure the tests are found and, in the case of libraries, are passing for all interpreters. If certain tests fail they can be disabled individually. Try to avoid disabling the tests altogether. In any case, when you disable tests, leave a comment explaining why.
1076* Commit names of Python libraries should reflect that they are Python libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`.
1077-0
···1074* Make sure libraries build for all Python interpreters.
1075* By default we enable tests. Make sure the tests are found and, in the case of libraries, are passing for all interpreters. If certain tests fail they can be disabled individually. Try to avoid disabling the tests altogether. In any case, when you disable tests, leave a comment explaining why.
1076* Commit names of Python libraries should reflect that they are Python libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`.
1077+* Attribute names in `python-packages.nix` should be normalized according to [PEP 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names).
1078+ This means that characters should be converted to lowercase and `.` and `_` should be replaced by a single `-` (foo-bar-baz instead of Foo__Bar.baz )
···1{ stdenv, perl, pixz, pathsFromGraph
23, # The file name of the resulting tarball
4- fileName ? "nixos-system-${stdenv.system}"
56, # The files and directories to be placed in the tarball.
7 # This is a list of attribute sets {source, target} where `source'
···1{ stdenv, perl, pixz, pathsFromGraph
23, # The file name of the resulting tarball
4+ fileName ? "nixos-system-${stdenv.hostPlatform.system}"
56, # The files and directories to be placed in the tarball.
7 # This is a list of attribute sets {source, target} where `source'
+2-2
nixos/lib/qemu-flags.nix
···1415 qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0"
16 else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0"
17- else throw "Unknown QEMU serial device for system '${pkgs.stdenv.system}'";
1819 qemuBinary = qemuPkg: {
20 "x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
21 "armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host";
22 "aarch64-linux" = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host";
23 "x86_64-darwin" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
24- }.${pkgs.stdenv.system} or "${qemuPkg}/bin/qemu-kvm";
25}
···1415 qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0"
16 else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0"
17+ else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'";
1819 qemuBinary = qemuPkg: {
20 "x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
21 "armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host";
22 "aarch64-linux" = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host";
23 "x86_64-darwin" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
24+ }.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm";
25}
···328 qemu-libvirtd = 301;
329 # kvm = 302; # unused
330 # render = 303; # unused
0331332 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
333···616 qemu-libvirtd = 301;
617 kvm = 302; # default udev rules from systemd requires these
618 render = 303; # default udev rules from systemd requires these
0619620 # When adding a gid, make sure it doesn't match an existing
621 # uid. Users and groups with the same name should have equal
···328 qemu-libvirtd = 301;
329 # kvm = 302; # unused
330 # render = 303; # unused
331+ zeronet = 304;
332333 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
334···617 qemu-libvirtd = 301;
618 kvm = 302; # default udev rules from systemd requires these
619 render = 303; # default udev rules from systemd requires these
620+ zeronet = 304;
621622 # When adding a gid, make sure it doesn't match an existing
623 # uid. Users and groups with the same name should have equal
···6061let
62 arch =
63- if stdenv.system == "x86_64-linux" then
64 "x86_64"
65- else if stdenv.system == "i686-linux" then
66 "i386"
67 else throw "Flash Player is not supported on this platform";
68 lib_suffix =
69- if stdenv.system == "x86_64-linux" then
70 "64"
71 else
72 "";
···6061let
62 arch =
63+ if stdenv.hostPlatform.system == "x86_64-linux" then
64 "x86_64"
65+ else if stdenv.hostPlatform.system == "i686-linux" then
66 "i386"
67 else throw "Flash Player is not supported on this platform";
68 lib_suffix =
69+ if stdenv.hostPlatform.system == "x86_64-linux" then
70 "64"
71 else
72 "";
···339340 passthru.execdir = "/bin";
341 meta = with stdenv.lib; {
342- description = "An unofficial version of the tor browser bundle, built from source";
0000000000000000000000343 homepage = https://torproject.org/;
344 license = licenses.free;
345 platforms = [ "x86_64-linux" ];
···339340 passthru.execdir = "/bin";
341 meta = with stdenv.lib; {
342+ description = "An unofficial version of the Tor Browser Bundle, built from source";
343+ longDescription = ''
344+ Tor Browser Bundle is a bundle of the Tor daemon, Tor Browser (heavily patched version of
345+ Firefox), several essential extensions for Tor Browser, and some tools that glue those
346+ together with a convenient UI.
347+348+ `tor-browser-bundle-bin` package is the official version built by torproject.org patched with
349+ `patchelf` to work under nix and with bundled scripts adapted to the read-only nature of
350+ the `/nix/store`.
351+352+ `tor-browser-bundle` package is the version built completely from source. It reuses the `tor`
353+ package for the tor daemon, `firefoxPackages.tor-browser` package for the tor-browser, and
354+ builds all the extensions from source.
355+356+ Note that `tor-browser-bundle` package is not only built from source, but also bundles Tor
357+ Browser differently from the official `tor-browser-bundle-bin` implementation. The official
358+ Tor Browser is not a normal UNIX program and is heavily patched for its use in the Tor Browser
359+ Bundle (which `tor-browser-bundle-bin` package then has to work around for the read-only
360+ /nix/store). Meanwhile, `firefoxPackages.tor-browser` reverts all those patches, allowing
361+ `firefoxPackages.tor-browser` to be used independently of the bundle, and then implements what
362+ `tor-browser-bundle` needs for the bundling using a much simpler patch. See the
363+ longDescription and expression of the `firefoxPackages.tor-browser` package for more info.
364+ '';
365 homepage = https://torproject.org/;
366 license = licenses.free;
367 platforms = [ "x86_64-linux" ];
···23let platforms = [ "i686-linux" "x86_64-linux" ]; in
45-assert lib.elem stdenv.system platforms;
67# Dropbox client to bootstrap installation.
8# The client is self-updating, so the actual version may be newer.
···12 arch = {
13 "x86_64-linux" = "x86_64";
14 "i686-linux" = "x86";
15- }.${stdenv.system};
1617 installer = "https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.${arch}-${version}.tar.gz";
18in
···23let platforms = [ "i686-linux" "x86_64-linux" ]; in
45+assert lib.elem stdenv.hostPlatform.system platforms;
67# Dropbox client to bootstrap installation.
8# The client is self-updating, so the actual version may be newer.
···12 arch = {
13 "x86_64-linux" = "x86_64";
14 "i686-linux" = "x86";
15+ }.${stdenv.hostPlatform.system};
1617 installer = "https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.${arch}-${version}.tar.gz";
18in
···13# xdotool script; the cause of this hang is not yet known.
14# TODO: There is a fair chance that Teensyduino works with arm-linux, but it
15# has not yet been tested.
16-if withTeensyduino && (stdenv.system != "x86_64-linux") then throw
17 "Teensyduino is only supported on x86_64-linux at this time (patches welcome)."
18else
19let
20- externalDownloads = import ./downloads.nix {inherit fetchurl; inherit (lib) optionalAttrs; inherit (stdenv) system;};
000021 # Some .so-files are later copied from .jar-s to $HOME, so patch them beforehand
22 patchelfInJars =
23- 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";}
24- ++ lib.optional (stdenv.system == "i686-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86.so";}
25 ;
26 # abiVersion 6 is default, but we need 5 for `avrdude_bin` executable
27 ncurses5 = ncurses.override { abiVersion = "5"; };
···46 zlib
47 ];
48 teensy_architecture =
49- lib.optionalString (stdenv.system == "x86_64-linux") "linux64"
50- + lib.optionalString (stdenv.system == "i686-linux") "linux32"
51- + lib.optionalString (stdenv.system == "arm-linux") "linuxarm";
5253 flavor = (if withTeensyduino then "teensyduino" else "arduino")
54 + stdenv.lib.optionalString (!withGui) "-core";
···13# xdotool script; the cause of this hang is not yet known.
14# TODO: There is a fair chance that Teensyduino works with arm-linux, but it
15# has not yet been tested.
16+if withTeensyduino && (stdenv.hostPlatform.system != "x86_64-linux") then throw
17 "Teensyduino is only supported on x86_64-linux at this time (patches welcome)."
18else
19let
20+ externalDownloads = import ./downloads.nix {
21+ inherit fetchurl;
22+ inherit (lib) optionalAttrs;
23+ inherit (stdenv.hostPlatform) system;
24+ };
25 # Some .so-files are later copied from .jar-s to $HOME, so patch them beforehand
26 patchelfInJars =
27+ 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";}
28+ ++ 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";}
29 ;
30 # abiVersion 6 is default, but we need 5 for `avrdude_bin` executable
31 ncurses5 = ncurses.override { abiVersion = "5"; };
···50 zlib
51 ];
52 teensy_architecture =
53+ lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "linux64"
54+ + lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "linux32"
55+ + lib.optionalString (stdenv.hostPlatform.system == "arm-linux") "linuxarm";
5657 flavor = (if withTeensyduino then "teensyduino" else "arduino")
58 + stdenv.lib.optionalString (!withGui) "-core";
···1{ stdenv, targetPackages, fetchurl, noSysDirs
2, langC ? true, langCC ? true, langFortran ? false
3-, langObjC ? targetPlatform.isDarwin
4-, langObjCpp ? targetPlatform.isDarwin
5, langGo ? false
6, profiledCompiler ? false
7, staticCompiler ? false
···13, isl ? null # optional, for the Graphite optimization framework.
14, zlib ? null
15, enableMultilib ? false
16-, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
17, name ? "gcc"
18, libcCross ? null
19, crossStageStatic ? false
20, # Strip kills static libs of other archs (hence no cross)
21- stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
022, gnused ? null
23, cloog # unused; just for compat with gcc4, as we override the parameter on some places
24, flex ? null
25-, buildPlatform, hostPlatform, targetPlatform
26, buildPackages
27}:
28···30assert libelf != null -> zlib != null;
3132# Make sure we get GNU sed.
33-assert hostPlatform.isDarwin -> gnused != null;
3435# The go frontend is written in c++
36assert langGo -> langCC;
···41let version = "7-20170409";
4243 enableParallelBuilding = true;
004445 patches =
46 [ ]
···1{ stdenv, targetPackages, fetchurl, noSysDirs
2, langC ? true, langCC ? true, langFortran ? false
3+, langObjC ? stdenv.targetPlatform.isDarwin
4+, langObjCpp ? stdenv.targetPlatform.isDarwin
5, langGo ? false
6, profiledCompiler ? false
7, staticCompiler ? false
···13, isl ? null # optional, for the Graphite optimization framework.
14, zlib ? null
15, enableMultilib ? false
16+, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
17, name ? "gcc"
18, libcCross ? null
19, crossStageStatic ? false
20, # Strip kills static libs of other archs (hence no cross)
21+ stripped ? stdenv.hostPlatform == stdenv.buildPlatform
22+ && stdenv.targetPlatform == stdenv.hostPlatform
23, gnused ? null
24, cloog # unused; just for compat with gcc4, as we override the parameter on some places
25, flex ? null
026, buildPackages
27}:
28···30assert libelf != null -> zlib != null;
3132# Make sure we get GNU sed.
33+assert stdenv.hostPlatform.isDarwin -> gnused != null;
3435# The go frontend is written in c++
36assert langGo -> langCC;
···41let version = "7-20170409";
4243 enableParallelBuilding = true;
44+45+ inherit (stdenv) buildPlatform hostPlatform targetPlatform;
4647 patches =
48 [ ]
+5-4
pkgs/development/compilers/ghc/7.10.3.nix
···1{ stdenv, targetPackages
2-, buildPlatform, hostPlatform, targetPlatform
34# build-tools
5, bootPkgs, hscolour
···89, libiconv ? null, ncurses
1011-, useLLVM ? !targetPlatform.isx86
12, # LLVM is conceptually a run-time-only depedendency, but for
13 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
14 # build-time dependency too.
···19 enableIntegerSimple ? !(gmp.meta.available or false), gmp
2021, # If enabled, use -fPIC when compiling static libs.
22- enableRelocatedStaticLibs ? targetPlatform != hostPlatform
2324, # Whether to build dynamic libs for the standard library (on the target
25 # platform). Static libs are always built.
···2728, # What flavour to build. An empty string indicates no
29 # specific flavour and falls back to ghc default values.
30- ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
31}:
3233let
0034 inherit (bootPkgs) ghc;
3536 # TODO(@Ericson2314) Make unconditional
···1{ stdenv, targetPackages
023# build-tools
4, bootPkgs, hscolour
···78, libiconv ? null, ncurses
910+, useLLVM ? !stdenv.targetPlatform.isx86
11, # LLVM is conceptually a run-time-only depedendency, but for
12 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
13 # build-time dependency too.
···18 enableIntegerSimple ? !(gmp.meta.available or false), gmp
1920, # If enabled, use -fPIC when compiling static libs.
21+ enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
2223, # Whether to build dynamic libs for the standard library (on the target
24 # platform). Static libs are always built.
···2627, # What flavour to build. An empty string indicates no
28 # specific flavour and falls back to ghc default values.
29+ ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
30}:
3132let
33+ inherit (stdenv) buildPlatform hostPlatform targetPlatform;
34+35 inherit (bootPkgs) ghc;
3637 # TODO(@Ericson2314) Make unconditional
+5-4
pkgs/development/compilers/ghc/8.0.2.nix
···1{ stdenv, targetPackages
2-, buildPlatform, hostPlatform, targetPlatform
34# build-tools
5, bootPkgs, hscolour
···78, libiconv ? null, ncurses
910-, useLLVM ? !targetPlatform.isx86
11, # LLVM is conceptually a run-time-only depedendency, but for
12 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
13 # build-time dependency too.
···18 enableIntegerSimple ? !(gmp.meta.available or false), gmp
1920, # If enabled, use -fPIC when compiling static libs.
21- enableRelocatedStaticLibs ? targetPlatform != hostPlatform
2223, # Whether to build dynamic libs for the standard library (on the target
24 # platform). Static libs are always built.
···2627, # What flavour to build. An empty string indicates no
28 # specific flavour and falls back to ghc default values.
29- ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
30}:
3132assert !enableIntegerSimple -> gmp != null;
3334let
0035 inherit (bootPkgs) ghc;
3637 # TODO(@Ericson2314) Make unconditional
···1{ stdenv, targetPackages
023# build-tools
4, bootPkgs, hscolour
···67, libiconv ? null, ncurses
89+, useLLVM ? !stdenv.targetPlatform.isx86
10, # LLVM is conceptually a run-time-only depedendency, but for
11 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
12 # build-time dependency too.
···17 enableIntegerSimple ? !(gmp.meta.available or false), gmp
1819, # If enabled, use -fPIC when compiling static libs.
20+ enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
2122, # Whether to build dynamic libs for the standard library (on the target
23 # platform). Static libs are always built.
···2526, # What flavour to build. An empty string indicates no
27 # specific flavour and falls back to ghc default values.
28+ ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
29}:
3031assert !enableIntegerSimple -> gmp != null;
3233let
34+ inherit (stdenv) buildPlatform hostPlatform targetPlatform;
35+36 inherit (bootPkgs) ghc;
3738 # TODO(@Ericson2314) Make unconditional
+5-4
pkgs/development/compilers/ghc/8.2.2.nix
···1{ stdenv, targetPackages
2-, buildPlatform, hostPlatform, targetPlatform
34# build-tools
5, bootPkgs, alex, happy, hscolour
···89, libiconv ? null, ncurses
1011-, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform)
12, # LLVM is conceptually a run-time-only depedendency, but for
13 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
14 # build-time dependency too.
···19 enableIntegerSimple ? !(gmp.meta.available or false), gmp
2021, # If enabled, use -fPIC when compiling static libs.
22- enableRelocatedStaticLibs ? targetPlatform != hostPlatform
2324, # Whether to build dynamic libs for the standard library (on the target
25 # platform). Static libs are always built.
···2728, # What flavour to build. An empty string indicates no
29 # specific flavour and falls back to ghc default values.
30- ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
31, # Whether to backport https://phabricator.haskell.org/D4388 for
32 # deterministic profiling symbol names, at the cost of a slightly
33 # non-standard GHC API
···37assert !enableIntegerSimple -> gmp != null;
3839let
0040 inherit (bootPkgs) ghc;
4142 # TODO(@Ericson2314) Make unconditional
···1{ stdenv, targetPackages
023# build-tools
4, bootPkgs, alex, happy, hscolour
···78, libiconv ? null, ncurses
910+, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
11, # LLVM is conceptually a run-time-only depedendency, but for
12 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
13 # build-time dependency too.
···18 enableIntegerSimple ? !(gmp.meta.available or false), gmp
1920, # If enabled, use -fPIC when compiling static libs.
21+ enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
2223, # Whether to build dynamic libs for the standard library (on the target
24 # platform). Static libs are always built.
···2627, # What flavour to build. An empty string indicates no
28 # specific flavour and falls back to ghc default values.
29+ ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
30, # Whether to backport https://phabricator.haskell.org/D4388 for
31 # deterministic profiling symbol names, at the cost of a slightly
32 # non-standard GHC API
···36assert !enableIntegerSimple -> gmp != null;
3738let
39+ inherit (stdenv) buildPlatform hostPlatform targetPlatform;
40+41 inherit (bootPkgs) ghc;
4243 # TODO(@Ericson2314) Make unconditional
+7-6
pkgs/development/compilers/ghc/8.4.3.nix
···1{ stdenv, targetPackages
2-, buildPlatform, hostPlatform, targetPlatform
34# build-tools
5, bootPkgs, alex, happy, hscolour
···78, libiconv ? null, ncurses
910-, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform)
11, # LLVM is conceptually a run-time-only depedendency, but for
12 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
13 # build-time dependency too.
···18 enableIntegerSimple ? !(gmp.meta.available or false), gmp
1920, # If enabled, use -fPIC when compiling static libs.
21- enableRelocatedStaticLibs ? targetPlatform != hostPlatform
2223, # Whether to build dynamic libs for the standard library (on the target
24 # platform). Static libs are always built.
25- enableShared ? !targetPlatform.isWindows && !targetPlatform.useiOSPrebuilt
2627, # Whetherto build terminfo.
28- enableTerminfo ? !targetPlatform.isWindows
2930, # What flavour to build. An empty string indicates no
31 # specific flavour and falls back to ghc default values.
32- ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
33, # Whether to backport https://phabricator.haskell.org/D4388 for
34 # deterministic profiling symbol names, at the cost of a slightly
35 # non-standard GHC API
···39assert !enableIntegerSimple -> gmp != null;
4041let
0042 inherit (bootPkgs) ghc;
4344 # TODO(@Ericson2314) Make unconditional
···1{ stdenv, targetPackages
023# build-tools
4, bootPkgs, alex, happy, hscolour
···67, libiconv ? null, ncurses
89+, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
10, # LLVM is conceptually a run-time-only depedendency, but for
11 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
12 # build-time dependency too.
···17 enableIntegerSimple ? !(gmp.meta.available or false), gmp
1819, # If enabled, use -fPIC when compiling static libs.
20+ enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
2122, # Whether to build dynamic libs for the standard library (on the target
23 # platform). Static libs are always built.
24+ enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
2526, # Whetherto build terminfo.
27+ enableTerminfo ? !stdenv.targetPlatform.isWindows
2829, # What flavour to build. An empty string indicates no
30 # specific flavour and falls back to ghc default values.
31+ ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
32, # Whether to backport https://phabricator.haskell.org/D4388 for
33 # deterministic profiling symbol names, at the cost of a slightly
34 # non-standard GHC API
···38assert !enableIntegerSimple -> gmp != null;
3940let
41+ inherit (stdenv) buildPlatform hostPlatform targetPlatform;
42+43 inherit (bootPkgs) ghc;
4445 # TODO(@Ericson2314) Make unconditional
+7-6
pkgs/development/compilers/ghc/8.6.1.nix
···1{ stdenv, targetPackages
2-, buildPlatform, hostPlatform, targetPlatform
34# build-tools
5, bootPkgs, alex, happy, hscolour
···78, libiconv ? null, ncurses
910-, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform)
11, # LLVM is conceptually a run-time-only depedendency, but for
12 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
13 # build-time dependency too.
···18 enableIntegerSimple ? !(gmp.meta.available or false), gmp
1920, # If enabled, use -fPIC when compiling static libs.
21- enableRelocatedStaticLibs ? targetPlatform != hostPlatform
2223, # Whether to build dynamic libs for the standard library (on the target
24 # platform). Static libs are always built.
25- enableShared ? !targetPlatform.isWindows && !targetPlatform.useiOSPrebuilt
2627, # Whetherto build terminfo.
28- enableTerminfo ? !targetPlatform.isWindows
2930, # What flavour to build. An empty string indicates no
31 # specific flavour and falls back to ghc default values.
32- ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
33}:
3435assert !enableIntegerSimple -> gmp != null;
3637let
0038 inherit (bootPkgs) ghc;
3940 # TODO(@Ericson2314) Make unconditional
···1{ stdenv, targetPackages
023# build-tools
4, bootPkgs, alex, happy, hscolour
···67, libiconv ? null, ncurses
89+, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
10, # LLVM is conceptually a run-time-only depedendency, but for
11 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
12 # build-time dependency too.
···17 enableIntegerSimple ? !(gmp.meta.available or false), gmp
1819, # If enabled, use -fPIC when compiling static libs.
20+ enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
2122, # Whether to build dynamic libs for the standard library (on the target
23 # platform). Static libs are always built.
24+ enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
2526, # Whetherto build terminfo.
27+ enableTerminfo ? !stdenv.targetPlatform.isWindows
2829, # What flavour to build. An empty string indicates no
30 # specific flavour and falls back to ghc default values.
31+ ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
32}:
3334assert !enableIntegerSimple -> gmp != null;
3536let
37+ inherit (stdenv) buildPlatform hostPlatform targetPlatform;
38+39 inherit (bootPkgs) ghc;
4041 # TODO(@Ericson2314) Make unconditional
+7-6
pkgs/development/compilers/ghc/head.nix
···1{ stdenv, targetPackages
2-, buildPlatform, hostPlatform, targetPlatform
34# build-tools
5, bootPkgs, alex, happy, hscolour
···78, libiconv ? null, ncurses
910-, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform)
11, # LLVM is conceptually a run-time-only depedendency, but for
12 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
13 # build-time dependency too.
···18 enableIntegerSimple ? !(gmp.meta.available or false), gmp
1920, # If enabled, use -fPIC when compiling static libs.
21- enableRelocatedStaticLibs ? targetPlatform != hostPlatform
2223, # Whether to build dynamic libs for the standard library (on the target
24 # platform). Static libs are always built.
25- enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt
2627, # Whetherto build terminfo.
28- enableTerminfo ? !targetPlatform.isWindows
2930, version ? "8.5.20180118"
31, # What flavour to build. An empty string indicates no
32 # specific flavour and falls back to ghc default values.
33- ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
34}:
3536let
0037 inherit (bootPkgs) ghc;
3839 # TODO(@Ericson2314) Make unconditional
···1{ stdenv, targetPackages
023# build-tools
4, bootPkgs, alex, happy, hscolour
···67, libiconv ? null, ncurses
89+, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
10, # LLVM is conceptually a run-time-only depedendency, but for
11 # non-x86, we need LLVM to bootstrap later stages, so it becomes a
12 # build-time dependency too.
···17 enableIntegerSimple ? !(gmp.meta.available or false), gmp
1819, # If enabled, use -fPIC when compiling static libs.
20+ enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
2122, # Whether to build dynamic libs for the standard library (on the target
23 # platform). Static libs are always built.
24+ enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useAndroidPrebuilt
2526, # Whetherto build terminfo.
27+ enableTerminfo ? !stdenv.targetPlatform.isWindows
2829, version ? "8.5.20180118"
30, # What flavour to build. An empty string indicates no
31 # specific flavour and falls back to ghc default values.
32+ ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
33}:
3435let
36+ inherit (stdenv) buildPlatform hostPlatform targetPlatform;
37+38 inherit (bootPkgs) ghc;
3940 # TODO(@Ericson2314) Make unconditional
···134135 GOOS = if stdenv.isDarwin then "darwin" else "linux";
136 GOARCH = if stdenv.isDarwin then "amd64"
137- else if stdenv.system == "i686-linux" then "386"
138- else if stdenv.system == "x86_64-linux" then "amd64"
139 else if stdenv.isAarch32 then "arm"
140 else if stdenv.isAarch64 then "arm64"
141 else throw "Unsupported system";
142- GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
143 GO386 = 387; # from Arch: don't assume sse2 on i686
144 CGO_ENABLED = 1;
145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
···134135 GOOS = if stdenv.isDarwin then "darwin" else "linux";
136 GOARCH = if stdenv.isDarwin then "amd64"
137+ else if stdenv.hostPlatform.system == "i686-linux" then "386"
138+ else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
139 else if stdenv.isAarch32 then "arm"
140 else if stdenv.isAarch64 then "arm64"
141 else throw "Unsupported system";
142+ GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
143 GO386 = 387; # from Arch: don't assume sse2 on i686
144 CGO_ENABLED = 1;
145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
+5-5
pkgs/development/compilers/go/1.11.nix
···134135 GOOS = if stdenv.isDarwin then "darwin" else "linux";
136 GOARCH = if stdenv.isDarwin then "amd64"
137- else if stdenv.system == "i686-linux" then "386"
138- else if stdenv.system == "x86_64-linux" then "amd64"
139- else if stdenv.isAarch32 then "arm"
140- else if stdenv.isAarch64 then "arm64"
141 else throw "Unsupported system";
142- GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
143 GO386 = 387; # from Arch: don't assume sse2 on i686
144 CGO_ENABLED = 1;
145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
···134135 GOOS = if stdenv.isDarwin then "darwin" else "linux";
136 GOARCH = if stdenv.isDarwin then "amd64"
137+ else if stdenv.targetPlatform.isi686 then "386"
138+ else if stdenv.targetPlatform.isx86_64 then "amd64"
139+ else if stdenv.targetPlatform.isAarch32 then "arm"
140+ else if stdenv.targetPlatform.isAarch64 then "arm64"
141 else throw "Unsupported system";
142+ GOARM = stdenv.targetPlatform.parsed.cpu.version or "";
143 GO386 = 387; # from Arch: don't assume sse2 on i686
144 CGO_ENABLED = 1;
145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
+3-3
pkgs/development/compilers/go/1.4.nix
···128129 GOOS = if stdenv.isDarwin then "darwin" else "linux";
130 GOARCH = if stdenv.isDarwin then "amd64"
131- else if stdenv.system == "i686-linux" then "386"
132- else if stdenv.system == "x86_64-linux" then "amd64"
133 else if stdenv.isAarch32 then "arm"
134 else throw "Unsupported system";
135- GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
136 GO386 = 387; # from Arch: don't assume sse2 on i686
137 CGO_ENABLED = 0;
138
···128129 GOOS = if stdenv.isDarwin then "darwin" else "linux";
130 GOARCH = if stdenv.isDarwin then "amd64"
131+ else if stdenv.hostPlatform.system == "i686-linux" then "386"
132+ else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
133 else if stdenv.isAarch32 then "arm"
134 else throw "Unsupported system";
135+ GOARM = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
136 GO386 = 387; # from Arch: don't assume sse2 on i686
137 CGO_ENABLED = 0;
138
+3-3
pkgs/development/compilers/go/1.9.nix
···134135 GOOS = if stdenv.isDarwin then "darwin" else "linux";
136 GOARCH = if stdenv.isDarwin then "amd64"
137- else if stdenv.system == "i686-linux" then "386"
138- else if stdenv.system == "x86_64-linux" then "amd64"
139 else if stdenv.isAarch32 then "arm"
140 else if stdenv.isAarch64 then "arm64"
141 else throw "Unsupported system";
142- GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
143 GO386 = 387; # from Arch: don't assume sse2 on i686
144 CGO_ENABLED = 1;
145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
···134135 GOOS = if stdenv.isDarwin then "darwin" else "linux";
136 GOARCH = if stdenv.isDarwin then "amd64"
137+ else if stdenv.hostPlatform.system == "i686-linux" then "386"
138+ else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
139 else if stdenv.isAarch32 then "arm"
140 else if stdenv.isAarch64 then "arm64"
141 else throw "Unsupported system";
142+ GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
143 GO386 = 387; # from Arch: don't assume sse2 on i686
144 CGO_ENABLED = 1;
145 GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
···13 * The JRE libraries are in directories that depend on the CPU.
14 */
15 architecture =
16- if stdenv.system == "i686-linux" then
17 "i386"
18 else "amd64";
19
···13 * The JRE libraries are in directories that depend on the CPU.
14 */
15 architecture =
16+ if stdenv.hostPlatform.system == "i686-linux" then
17 "i386"
18 else "amd64";
19
···1{ stdenv, fetchurl, writeText, sbclBootstrap
2, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
3-, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.system)
4 # Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
5 # Note that the created binaries still need `patchelf --set-interpreter ...`
6 # to get rid of ${glibc} dependency.
···1{ stdenv, fetchurl, writeText, sbclBootstrap
2, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
3+, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
4 # Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
5 # Note that the created binaries still need `patchelf --set-interpreter ...`
6 # to get rid of ${glibc} dependency.
···43 # of polkit, which is what matters most, it does not override the allocator
44 # so the failure of that test does not matter much.
45 configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ] ++
46- stdenv.lib.optionals (stdenv.system == "armv5tel-linux") [
47 "--with-cpu-arch=armv5t"
48 "--disable-tracejit" ];
49
···43 # of polkit, which is what matters most, it does not override the allocator
44 # so the failure of that test does not matter much.
45 configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ] ++
46+ stdenv.lib.optionals (stdenv.hostPlatform.system == "armv5tel-linux") [
47 "--with-cpu-arch=armv5t"
48 "--disable-tracejit" ];
49
···13, SDL # only for avplay in $bin, adds nontrivial closure to it
14, enableGPL ? true # ToDo: some additional default stuff may need GPL
15, enableUnfree ? faacSupport
16-, hostPlatform
17}:
1819assert faacSupport -> enableUnfree;
···5354 configurePlatforms = [];
55 configureFlags = assert stdenv.lib.all (x: x!=null) buildInputs; [
56- "--arch=${hostPlatform.parsed.cpu.name}"
57- "--target_os=${hostPlatform.parsed.kernel.name}"
58 #"--enable-postproc" # it's now a separate package in upstream
59 "--disable-avserver" # upstream says it's in a bad state
60 "--enable-avplay"
···13, SDL # only for avplay in $bin, adds nontrivial closure to it
14, enableGPL ? true # ToDo: some additional default stuff may need GPL
15, enableUnfree ? faacSupport
016}:
1718assert faacSupport -> enableUnfree;
···5253 configurePlatforms = [];
54 configureFlags = assert stdenv.lib.all (x: x!=null) buildInputs; [
55+ "--arch=${stdenv.hostPlatform.parsed.cpu.name}"
56+ "--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
57 #"--enable-postproc" # it's now a separate package in upstream
58 "--disable-avserver" # upstream says it's in a bad state
59 "--enable-avplay"
···1{ stdenv
2, fetchurl, autoreconfHook, gettext
3-, buildPlatform, hostPlatform
4}:
56stdenv.mkDerivation rec {
···20 configureFlags = []
21 # Configure check for dynamic lib support is broken, see
22 # http://lists.uclibc.org/pipermail/uclibc-cvs/2005-August/019383.html
23- ++ stdenv.lib.optional (hostPlatform != buildPlatform) "mr_cv_target_elf=yes"
24 # Libelf's custom NLS macros fail to determine the catalog file extension
25 # on Darwin, so disable NLS for now.
26- ++ stdenv.lib.optional hostPlatform.isDarwin "--disable-nls";
2728 nativeBuildInputs = [ gettext ]
29 # Need to regenerate configure script with newer version in order to pass
30 # "mr_cv_target_elf=yes", but `autoreconfHook` brings in `makeWrapper`
31 # which doesn't work with the bootstrapTools bash, so can only do this
32 # for cross builds when `stdenv.shell` is a newer bash.
33- ++ stdenv.lib.optional (hostPlatform != buildPlatform) autoreconfHook;
3435 meta = {
36 description = "ELF object file access library";
···1{ stdenv
2, fetchurl, autoreconfHook, gettext
03}:
45stdenv.mkDerivation rec {
···19 configureFlags = []
20 # Configure check for dynamic lib support is broken, see
21 # http://lists.uclibc.org/pipermail/uclibc-cvs/2005-August/019383.html
22+ ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "mr_cv_target_elf=yes"
23 # Libelf's custom NLS macros fail to determine the catalog file extension
24 # on Darwin, so disable NLS for now.
25+ ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "--disable-nls";
2627 nativeBuildInputs = [ gettext ]
28 # Need to regenerate configure script with newer version in order to pass
29 # "mr_cv_target_elf=yes", but `autoreconfHook` brings in `makeWrapper`
30 # which doesn't work with the bootstrapTools bash, so can only do this
31 # for cross builds when `stdenv.shell` is a newer bash.
32+ ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) autoreconfHook;
3334 meta = {
35 description = "ELF object file access library";
+5-5
pkgs/development/libraries/libffi/default.nix
···1{ stdenv, fetchurl, fetchpatch
2-, buildPlatform, hostPlatform, autoreconfHook
34# libffi is used in darwin stdenv
5# we cannot run checks within it
···19 url = https://src.fedoraproject.org/rpms/libffi/raw/ccffc1700abfadb0969495a6e51b964117fc03f6/f/libffi-aarch64-rhbz1174037.patch;
20 sha256 = "1vpirrgny43hp0885rswgv3xski8hg7791vskpbg3wdjdpb20wbc";
21 })
22- ++ stdenv.lib.optional hostPlatform.isMusl (fetchpatch {
23 name = "gnu-linux-define.patch";
24 url = "https://git.alpinelinux.org/cgit/aports/plain/main/libffi/gnu-linux-define.patch?id=bb024fd8ec6f27a76d88396c9f7c5c4b5800d580";
25 sha256 = "11pvy3xkhyvnjfyy293v51f1xjy3x0azrahv1nw9y9mw8bifa2j2";
26 })
27- ++ stdenv.lib.optional hostPlatform.isRiscV (fetchpatch {
28 name = "riscv-support.patch";
29 url = https://github.com/sorear/libffi-riscv/commit/e46492e8bb1695a19bc1053ed869e6c2bab02ff2.patch;
30 sha256 = "1vl1vbvdkigs617kckxvj8j4m2cwg62kxm1clav1w5rnw9afxg0y";
···4445 outputs = [ "out" "dev" "man" "info" ];
4647- nativeBuildInputs = stdenv.lib.optional hostPlatform.isRiscV autoreconfHook;
4849 configureFlags = [
50 "--with-gcc-arch=generic" # no detection of -march= or -mtune=
···6061 inherit doCheck;
6263- dontStrip = hostPlatform != buildPlatform; # Don't run the native `strip' when cross-compiling.
6465 # Install headers and libs in the right places.
66 postFixup = ''
···1{ stdenv, fetchurl, fetchpatch
2+, autoreconfHook
34# libffi is used in darwin stdenv
5# we cannot run checks within it
···19 url = https://src.fedoraproject.org/rpms/libffi/raw/ccffc1700abfadb0969495a6e51b964117fc03f6/f/libffi-aarch64-rhbz1174037.patch;
20 sha256 = "1vpirrgny43hp0885rswgv3xski8hg7791vskpbg3wdjdpb20wbc";
21 })
22+ ++ stdenv.lib.optional stdenv.hostPlatform.isMusl (fetchpatch {
23 name = "gnu-linux-define.patch";
24 url = "https://git.alpinelinux.org/cgit/aports/plain/main/libffi/gnu-linux-define.patch?id=bb024fd8ec6f27a76d88396c9f7c5c4b5800d580";
25 sha256 = "11pvy3xkhyvnjfyy293v51f1xjy3x0azrahv1nw9y9mw8bifa2j2";
26 })
27+ ++ stdenv.lib.optional stdenv.hostPlatform.isRiscV (fetchpatch {
28 name = "riscv-support.patch";
29 url = https://github.com/sorear/libffi-riscv/commit/e46492e8bb1695a19bc1053ed869e6c2bab02ff2.patch;
30 sha256 = "1vl1vbvdkigs617kckxvj8j4m2cwg62kxm1clav1w5rnw9afxg0y";
···4445 outputs = [ "out" "dev" "man" "info" ];
4647+ nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isRiscV autoreconfHook;
4849 configureFlags = [
50 "--with-gcc-arch=generic" # no detection of -march= or -mtune=
···6061 inherit doCheck;
6263+ dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; # Don't run the native `strip' when cross-compiling.
6465 # Install headers and libs in the right places.
66 postFixup = ''
···63 sha256 = "1ys9mshfpm8iy8h4ml792gnqrq959dsrcv26axx14niivxyjbji8";
64 } + "/ippicv";
65 files = let name = platform : "ippicv_2017u3_${platform}_general_20180518.tgz"; in
66- if stdenv.system == "x86_64-linux" then
67 { ${name "lnx_intel64"} = "b7cc351267db2d34b9efa1cd22ff0572"; }
68- else if stdenv.system == "i686-linux" then
69 { ${name "lnx_ia32"} = "ea72de74dae3c604eb6348395366e78e"; }
70- else if stdenv.system == "x86_64-darwin" then
71 { ${name "mac_intel64"} = "3ae52b9be0fe73dd45bc5e9429cd3732"; }
72 else
73 throw "ICV is not available for this platform (or not yet supported by this package)";
···63 sha256 = "1ys9mshfpm8iy8h4ml792gnqrq959dsrcv26axx14niivxyjbji8";
64 } + "/ippicv";
65 files = let name = platform : "ippicv_2017u3_${platform}_general_20180518.tgz"; in
66+ if stdenv.hostPlatform.system == "x86_64-linux" then
67 { ${name "lnx_intel64"} = "b7cc351267db2d34b9efa1cd22ff0572"; }
68+ else if stdenv.hostPlatform.system == "i686-linux" then
69 { ${name "lnx_ia32"} = "ea72de74dae3c604eb6348395366e78e"; }
70+ else if stdenv.hostPlatform.system == "x86_64-darwin" then
71 { ${name "mac_intel64"} = "3ae52b9be0fe73dd45bc5e9429cd3732"; }
72 else
73 throw "ICV is not available for this platform (or not yet supported by this package)";
···6768let
69 config =
70- configs.${stdenv.system}
71- or (throw "unsupported system: ${stdenv.system}");
72in
7374let
75 blas64 =
76 if blas64_ != null
77 then blas64_
78- else hasPrefix "x86_64" stdenv.system;
79in
80stdenv.mkDerivation rec {
81 name = "openblas-${version}";
···6768let
69 config =
70+ configs.${stdenv.hostPlatform.system}
71+ or (throw "unsupported system: ${stdenv.hostPlatform.system}");
72in
7374let
75 blas64 =
76 if blas64_ != null
77 then blas64_
78+ else hasPrefix "x86_64" stdenv.hostPlatform.system;
79in
80stdenv.mkDerivation rec {
81 name = "openblas-${version}";
+2-2
pkgs/development/libraries/scmccid/default.nix
···5stdenv.mkDerivation rec {
6 name = "scmccid-5.0.11";
78- src = if stdenv.system == "i686-linux" then (fetchurl {
9 url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux.tar.gz";
10 sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm";
11 })
12- else if stdenv.system == "x86_64-linux" then (fetchurl {
13 url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux_x64.tar.gz";
14 sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i";
15 })
···5stdenv.mkDerivation rec {
6 name = "scmccid-5.0.11";
78+ src = if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
9 url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux.tar.gz";
10 sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm";
11 })
12+ else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
13 url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux_x64.tar.gz";
14 sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i";
15 })
+1-1
pkgs/development/libraries/skalibs/default.nix
···33 # Explicitly setting target ensures code can be compiled against a skalibs
34 # binary built on a different version of darwin.
35 # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
36- ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
3738 postInstall = ''
39 mkdir -p $doc/share/doc/skalibs
···33 # Explicitly setting target ensures code can be compiled against a skalibs
34 # binary built on a different version of darwin.
35 # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
36+ ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
3738 postInstall = ''
39 mkdir -p $doc/share/doc/skalibs
+9-9
pkgs/development/libraries/tachyon/default.nix
···34 export USEPNG=" -DUSEPNG"
35 export PNGLIB=" -lpng -lz"
36 '';
37- arch = if stdenv.system == "x86_64-linux" then "linux-64-thr" else
38- if stdenv.system == "i686-linux" then "linux-thr" else
39- if stdenv.system == "aarch64-linux" then "linux-arm-thr" else
40- if stdenv.system == "armv7l-linux" then "linux-arm-thr" else
41- if stdenv.system == "x86_64-darwin" then "macosx-thr" else
42- if stdenv.system == "i686-darwin" then "macosx-64-thr" else
43- if stdenv.system == "i686-cygwin" then "win32" else
44- if stdenv.system == "x86_64-freebsd" then "bsd" else
45- if stdenv.system == "x686-freebsd" then "bsd" else
46 throw "Don't know what arch to select for tachyon build";
47 makeFlags = "${arch}";
48 patches = [
···34 export USEPNG=" -DUSEPNG"
35 export PNGLIB=" -lpng -lz"
36 '';
37+ arch = if stdenv.hostPlatform.system == "x86_64-linux" then "linux-64-thr" else
38+ if stdenv.hostPlatform.system == "i686-linux" then "linux-thr" else
39+ if stdenv.hostPlatform.system == "aarch64-linux" then "linux-arm-thr" else
40+ if stdenv.hostPlatform.system == "armv7l-linux" then "linux-arm-thr" else
41+ if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx-thr" else
42+ if stdenv.hostPlatform.system == "i686-darwin" then "macosx-64-thr" else
43+ if stdenv.hostPlatform.system == "i686-cygwin" then "win32" else
44+ if stdenv.hostPlatform.system == "x86_64-freebsd" then "bsd" else
45+ if stdenv.hostPlatform.system == "x686-freebsd" then "bsd" else
46 throw "Don't know what arch to select for tachyon build";
47 makeFlags = "${arch}";
48 patches = [
···9stdenv.mkDerivation rec {
10 name = "android-ndk-r8e";
1112- src = if stdenv.system == "i686-linux"
13 then fetchurl {
14 url = "http://dl.google.com/android/ndk/${name}-linux-x86.tar.bz2";
15 sha256 = "c2c4e0c8b3037149a0f5dbb08d72f814a52af4da9fff9d80328c675457e95a98";
16 }
17- else if stdenv.system == "x86_64-linux" then fetchurl {
18 url = "http://dl.google.com/android/ndk/${name}-linux-x86_64.tar.bz2";
19 sha256 = "093gf55zbh38p2gk5bdykj1vg9p5l774wjdzw5mhk4144jm1wdq7";
20 }
21- else throw "platform ${stdenv.system} not supported!";
2223 phases = "buildPhase";
24
···9stdenv.mkDerivation rec {
10 name = "android-ndk-r8e";
1112+ src = if stdenv.hostPlatform.system == "i686-linux"
13 then fetchurl {
14 url = "http://dl.google.com/android/ndk/${name}-linux-x86.tar.bz2";
15 sha256 = "c2c4e0c8b3037149a0f5dbb08d72f814a52af4da9fff9d80328c675457e95a98";
16 }
17+ else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
18 url = "http://dl.google.com/android/ndk/${name}-linux-x86_64.tar.bz2";
19 sha256 = "093gf55zbh38p2gk5bdykj1vg9p5l774wjdzw5mhk4144jm1wdq7";
20 }
21+ else throw "platform ${stdenv.hostPlatform.system} not supported!";
2223 phases = "buildPhase";
24
+9-9
pkgs/development/mobile/androidenv/androidsdk.nix
···22 name = "android-sdk-${version}";
23 version = "25.2.5";
2425- src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
26 then fetchurl {
27 url = "https://dl.google.com/android/repository/tools_r${version}-linux.zip";
28 sha256 = "0gnk49pkwy4m0nqwm1xnf3w4mfpi9w0kk7841xlawpwbkj0icxap";
29 }
30- else if stdenv.system == "x86_64-darwin" then fetchurl {
31 url = "http://dl.google.com/android/repository/tools_r${version}-macosx.zip";
32 sha256 = "0yg7wjmyw70xsh8k4hgbqb5rilam2a94yc8dwbh7fjwqcmpxgwqb";
33 }
34- else throw "platform not ${stdenv.system} supported!";
3536 buildCommand = ''
37 mkdir -p $out/libexec
···44 sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" "$f"
45 done
4647- ${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
48 ''
49 # There are a number of native binaries. We must patch them to let them find the interpreter and libstdc++
50···54 patchelf --set-rpath ${stdenv_32bit.cc.cc.lib}/lib $i
55 done
5657- ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
58 for i in bin64/{mkfs.ext4,fsck.ext4,e2fsck,tune2fs,resize2fs}
59 do
60 patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
···62 done
63 ''}
6465- ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
66 # We must also patch the 64-bit emulator instances, if needed
6768 for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service emulator-check qemu/linux-x86_64/qemu-system-*
···8990 # The emulators need additional libraries, which are dynamically loaded => let's wrap them
9192- ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
93 for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service
94 do
95 wrapProgram `pwd`/$i \
···102103 patchShebangs .
104105- ${if stdenv.system == "i686-linux" then
106 ''
107 # The monitor requires some more patching
108···115116 cd ../..
117 ''
118- else if stdenv.system == "x86_64-linux" then
119 ''
120 # The monitor requires some more patching
121
···22 name = "android-sdk-${version}";
23 version = "25.2.5";
2425+ src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
26 then fetchurl {
27 url = "https://dl.google.com/android/repository/tools_r${version}-linux.zip";
28 sha256 = "0gnk49pkwy4m0nqwm1xnf3w4mfpi9w0kk7841xlawpwbkj0icxap";
29 }
30+ else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
31 url = "http://dl.google.com/android/repository/tools_r${version}-macosx.zip";
32 sha256 = "0yg7wjmyw70xsh8k4hgbqb5rilam2a94yc8dwbh7fjwqcmpxgwqb";
33 }
34+ else throw "platform not ${stdenv.hostPlatform.system} supported!";
3536 buildCommand = ''
37 mkdir -p $out/libexec
···44 sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" "$f"
45 done
4647+ ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
48 ''
49 # There are a number of native binaries. We must patch them to let them find the interpreter and libstdc++
50···54 patchelf --set-rpath ${stdenv_32bit.cc.cc.lib}/lib $i
55 done
5657+ ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
58 for i in bin64/{mkfs.ext4,fsck.ext4,e2fsck,tune2fs,resize2fs}
59 do
60 patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
···62 done
63 ''}
6465+ ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
66 # We must also patch the 64-bit emulator instances, if needed
6768 for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service emulator-check qemu/linux-x86_64/qemu-system-*
···8990 # The emulators need additional libraries, which are dynamically loaded => let's wrap them
9192+ ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
93 for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service
94 do
95 wrapProgram `pwd`/$i \
···102103 patchShebangs .
104105+ ${if stdenv.hostPlatform.system == "i686-linux" then
106 ''
107 # The monitor requires some more patching
108···115116 cd ../..
117 ''
118+ else if stdenv.hostPlatform.system == "x86_64-linux" then
119 ''
120 # The monitor requires some more patching
121
···1{stdenv, fetchurl, ocaml, findlib}:
200003stdenv.mkDerivation rec {
4 name = "ocaml-cryptgps-${version}";
5 version = "0.2.1";
···1{stdenv, fetchurl, ocaml, findlib}:
23+if stdenv.lib.versionAtLeast ocaml.version "4.06"
4+then throw "cryptgps is not available for OCaml ${ocaml.version}"
5+else
6+7stdenv.mkDerivation rec {
8 name = "ocaml-cryptgps-${version}";
9 version = "0.2.1";
+4
pkgs/development/ocaml-modules/dypgen/default.nix
···4 pname = "dypgen";
5in
600007stdenv.mkDerivation rec {
8 name = "${pname}-${version}";
9 version = "20120619-1";
···4 pname = "dypgen";
5in
67+if stdenv.lib.versionAtLeast ocaml.version "4.06"
8+then throw "${pname} is not available for OCaml ${ocaml.version}"
9+else
10+11stdenv.mkDerivation rec {
12 name = "${pname}-${version}";
13 version = "20120619-1";
···1{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }:
200003let version = "0.3"; in
45stdenv.mkDerivation {
···1{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }:
23+if stdenv.lib.versionAtLeast ocaml.version "4.06"
4+then throw "erm_xml is not available for OCaml ${ocaml.version}"
5+else
6+7let version = "0.3"; in
89stdenv.mkDerivation {
···23assert stdenv.lib.versionOlder "4.00" (stdenv.lib.getVersion ocaml);
45+if stdenv.lib.versionAtLeast ocaml.version "4.06"
6+then throw "fieldslib-109.20.03 is not available for OCaml ${ocaml.version}"
7+else
8+9stdenv.mkDerivation {
10 name = "ocaml-fieldslib-109.20.03";
11
+5-1
pkgs/development/ocaml-modules/frontc/default.nix
···1-{lib, buildOcaml, fetchurl}:
000023buildOcaml rec {
4 name = "FrontC";
···1+{ lib, buildOcaml, fetchurl, ocaml }:
2+3+if lib.versionAtLeast ocaml.version "4.06"
4+then throw "FrontC is not available for OCaml ${ocaml.version}"
5+else
67buildOcaml rec {
8 name = "FrontC";
+4
pkgs/development/ocaml-modules/gtktop/default.nix
···23let pname = "gtktop-2.0"; in
400005stdenv.mkDerivation {
6 name = "ocaml-${pname}";
7
···23let pname = "gtktop-2.0"; in
45+if stdenv.lib.versionAtLeast ocaml.version "4.06"
6+then throw "${pname} is not available for OCaml ${ocaml.version}"
7+else
8+9stdenv.mkDerivation {
10 name = "ocaml-${pname}";
11
+1
pkgs/development/ocaml-modules/lwt/legacy.nix
···6}:
78if !stdenv.lib.versionAtLeast ocaml.version "4"
09then throw "lwt is not available for OCaml ${ocaml.version}"
10else
11
···6}:
78if !stdenv.lib.versionAtLeast ocaml.version "4"
9+ || stdenv.lib.versionAtLeast ocaml.version "4.06"
10then throw "lwt is not available for OCaml ${ocaml.version}"
11else
12
···4 pname = "ocaml-cairo";
5in
600007stdenv.mkDerivation rec {
8 name = "${pname}-${version}";
9 version = "1.2.0";
···4 pname = "ocaml-cairo";
5in
67+if stdenv.lib.versionAtLeast ocaml.version "4.06"
8+then throw "${pname} is not available for OCaml ${ocaml.version}"
9+else
10+11stdenv.mkDerivation rec {
12 name = "${pname}-${version}";
13 version = "1.2.0";
···4 pname = "ocamlsdl";
5in
600007stdenv.mkDerivation rec {
8 name = "${pname}-${version}";
9 version = "0.9.1";
···4 pname = "ocamlsdl";
5in
67+if stdenv.lib.versionAtLeast ocaml.version "4.06"
8+then throw "${pname} is not available for OCaml ${ocaml.version}"
9+else
10+11stdenv.mkDerivation rec {
12 name = "${pname}-${version}";
13 version = "0.9.1";
···4 pname = "ulex";
5in
600007stdenv.mkDerivation rec {
8 name = "${pname}-${version}";
9 version = "0.8";
···4 pname = "ulex";
5in
67+if stdenv.lib.versionAtLeast ocaml.version "4.06"
8+then throw "ulex-0.8 is not available for OCaml ${ocaml.version}"
9+else
10+11stdenv.mkDerivation rec {
12 name = "${pname}-${version}";
13 version = "0.8";
···1-{ stdenv, hostPlatform, fetchurl }:
23stdenv.mkDerivation rec {
4 name = "gnum4-1.4.18";
···13 configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ];
1415 # Upstream is aware of it; it may be in the next release.
16- patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional hostPlatform.isDarwin stdenv.secure-format-patch;
1718 meta = {
19 homepage = http://www.gnu.org/software/m4/;
···1+{ stdenv, fetchurl }:
23stdenv.mkDerivation rec {
4 name = "gnum4-1.4.18";
···13 configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ];
1415 # Upstream is aware of it; it may be in the next release.
16+ patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin stdenv.secure-format-patch;
1718 meta = {
19 homepage = http://www.gnu.org/software/m4/;
+3-3
pkgs/development/tools/misc/help2man/default.nix
···1-{ stdenv, hostPlatform, fetchurl, perl, gettext, LocaleGettext }:
23stdenv.mkDerivation rec {
4 name = "help2man-1.47.6";
···1314 doCheck = false; # target `check' is missing
1516- patches = if hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null;
1718 # We don't use makeWrapper here because it uses substitutions our
19 # bootstrap shell can't handle.
···23 cat > $out/bin/help2man <<EOF
24 #! $SHELL -e
25 export PERL5LIB=\''${PERL5LIB:+:}$gettext_perl
26- ${stdenv.lib.optionalString hostPlatform.isCygwin
27 "export PATH=\''${PATH:+:}${gettext}/bin"}
28 exec -a \$0 $out/bin/.help2man-wrapped "\$@"
29 EOF
···1+{ stdenv, fetchurl, perl, gettext, LocaleGettext }:
23stdenv.mkDerivation rec {
4 name = "help2man-1.47.6";
···1314 doCheck = false; # target `check' is missing
1516+ patches = if stdenv.hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null;
1718 # We don't use makeWrapper here because it uses substitutions our
19 # bootstrap shell can't handle.
···23 cat > $out/bin/help2man <<EOF
24 #! $SHELL -e
25 export PERL5LIB=\''${PERL5LIB:+:}$gettext_perl
26+ ${stdenv.lib.optionalString stdenv.hostPlatform.isCygwin
27 "export PATH=\''${PATH:+:}${gettext}/bin"}
28 exec -a \$0 $out/bin/.help2man-wrapped "\$@"
29 EOF
+5-5
pkgs/development/tools/misc/iozone/default.nix
···1{ stdenv, fetchurl, gnuplot }:
23let
4- target = if stdenv.system == "i686-linux" then
5 "linux"
6- else if stdenv.system == "x86_64-linux" then
7 "linux-AMD64"
8- else if stdenv.system == "x86_64-darwin" then
9 "macosx"
10- else if stdenv.system == "aarch64-linux" then
11 "linux-arm"
12- else throw "Platform ${stdenv.system} not yet supported.";
13in
1415stdenv.mkDerivation rec {
···1{ stdenv, fetchurl, gnuplot }:
23let
4+ target = if stdenv.hostPlatform.system == "i686-linux" then
5 "linux"
6+ else if stdenv.hostPlatform.system == "x86_64-linux" then
7 "linux-AMD64"
8+ else if stdenv.hostPlatform.system == "x86_64-darwin" then
9 "macosx"
10+ else if stdenv.hostPlatform.system == "aarch64-linux" then
11 "linux-arm"
12+ else throw "Platform ${stdenv.hostPlatform.system} not yet supported.";
13in
1415stdenv.mkDerivation rec {
···1{ stdenv, fetchurl, m4, perl, help2man
2-, buildPlatform, hostPlatform
3}:
45stdenv.mkDerivation rec {
···2627 # Don't run the native `strip' when cross-compiling. This breaks at least
28 # with `.a' files for MinGW.
29- dontStrip = hostPlatform != buildPlatform;
3031 meta = {
32 description = "GNU Libtool, a generic library support script";
···1{ stdenv, fetchurl, m4, perl, help2man
02}:
34stdenv.mkDerivation rec {
···2526 # Don't run the native `strip' when cross-compiling. This breaks at least
27 # with `.a' files for MinGW.
28+ dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
2930 meta = {
31 description = "GNU Libtool, a generic library support script";
+1-1
pkgs/development/tools/misc/lsof/default.nix
···1{ stdenv, fetchurl, buildPackages, ncurses }:
23-let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in
45stdenv.mkDerivation rec {
6 name = "lsof-${version}";
···1{ stdenv, fetchurl, buildPackages, ncurses }:
23+let dialect = with stdenv.lib; last (splitString "-" stdenv.hostPlatform.system); in
45stdenv.mkDerivation rec {
6 name = "lsof-${version}";
···4 version = "0.9.8.6-0.rc1";
5 webpage = "http://omake.metaprl.org";
6in
000007stdenv.mkDerivation {
89 name = "${pname}-${version}";
···4 version = "0.9.8.6-0.rc1";
5 webpage = "http://omake.metaprl.org";
6in
7+8+if stdenv.lib.versionAtLeast ocaml.version "4.06"
9+then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
10+else
11+12stdenv.mkDerivation {
1314 name = "${pname}-${version}";
+2-2
pkgs/development/tools/phantomjs/default.nix
···12 # because it has bundled a lot of external libraries (like QT and Webkit)
13 # and no easy/nice way to use the system versions of these
1415- src = if stdenv.system == "i686-linux" then
16 fetchurl {
17 url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-i686.tar.bz2";
18 sha256 = "11fzmssz9pqf3arh4f36w06sl2nyz8l9h8iyxyd7w5aqnq5la0j1";
19 }
20 else
21- if stdenv.system == "x86_64-linux" then
22 fetchurl {
23 url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-x86_64.tar.bz2";
24 sha256 = "0fhnqxxsxhy125fmif1lwgnlhfx908spy7fx9mng4w72320n5nd1";
···12 # because it has bundled a lot of external libraries (like QT and Webkit)
13 # and no easy/nice way to use the system versions of these
1415+ src = if stdenv.hostPlatform.system == "i686-linux" then
16 fetchurl {
17 url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-i686.tar.bz2";
18 sha256 = "11fzmssz9pqf3arh4f36w06sl2nyz8l9h8iyxyd7w5aqnq5la0j1";
19 }
20 else
21+ if stdenv.hostPlatform.system == "x86_64-linux" then
22 fetchurl {
23 url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-x86_64.tar.bz2";
24 sha256 = "0fhnqxxsxhy125fmif1lwgnlhfx908spy7fx9mng4w72320n5nd1";
+2-2
pkgs/development/tools/sauce-connect/default.nix
···7 version = "4.4.12";
89 src = fetchurl (
10- if stdenv.system == "x86_64-linux" then {
11 url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
12 sha256 = "1yqvx64bgiq27hdhwkzgmzyib8pbjn1idpq6783srxq64asf6iyw";
13- } else if stdenv.system == "i686-linux" then {
14 url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz";
15 sha256 = "02kib56lv4lhwkj5r15484lvvbyjvf9ydi5vccsmxgsxrzmddnl6";
16 } else {
···7 version = "4.4.12";
89 src = fetchurl (
10+ if stdenv.hostPlatform.system == "x86_64-linux" then {
11 url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
12 sha256 = "1yqvx64bgiq27hdhwkzgmzyib8pbjn1idpq6783srxq64asf6iyw";
13+ } else if stdenv.hostPlatform.system == "i686-linux" then {
14 url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz";
15 sha256 = "02kib56lv4lhwkj5r15484lvvbyjvf9ydi5vccsmxgsxrzmddnl6";
16 } else {
···20 ];
2122 installPhase = with stdenv.lib; let
23- sys = last (splitString "-" stdenv.system);
24- arch = head (splitString "-" stdenv.system);
25 in ''
26 mkdir -p $out/bin
27 find .
···20 ];
2122 installPhase = with stdenv.lib; let
23+ sys = last (splitString "-" stdenv.hostPlatform.system);
24+ arch = head (splitString "-" stdenv.hostPlatform.system);
25 in ''
26 mkdir -p $out/bin
27 find .
+1-1
pkgs/games/factorio/default.nix
···46 };
47 };
48 };
49- actual = binDists.${stdenv.system}.${releaseType}.${branch} or (throw "Factorio: unsupported platform");
5051 bdistForArch = arch: { sha256 ? null
52 , version ? "0.16.51"
···46 };
47 };
48 };
49+ actual = binDists.${stdenv.hostPlatform.system}.${releaseType}.${branch} or (throw "Factorio: unsupported platform");
5051 bdistForArch = arch: { sha256 ? null
52 , version ? "0.16.51"
+1-1
pkgs/games/nethack/default.nix
···6let
7 platform =
8 if stdenv.hostPlatform.isUnix then "unix"
9- else throw "Unknown platform for NetHack: ${stdenv.system}";
10 unixHint =
11 if x11Mode then "linux-x11"
12 else if qtMode then "linux-qt4"
···6let
7 platform =
8 if stdenv.hostPlatform.isUnix then "unix"
9+ else throw "Unknown platform for NetHack: ${stdenv.hostPlatform.system}";
10 unixHint =
11 if x11Mode then "linux-x11"
12 else if qtMode then "linux-qt4"
···9 then "WorldOfGooDemo-1.41"
10 else "WorldofGoo-1.41";
1112- arch = if stdenv.system == "x86_64-linux" then "supported"
13 else throw "Sorry. World of Goo only is only supported on x86_64 now.";
1415 goBuyItNow = ''
···9 then "WorldOfGooDemo-1.41"
10 else "WorldofGoo-1.41";
1112+ arch = if stdenv.hostPlatform.system == "x86_64-linux" then "supported"
13 else throw "Sorry. World of Goo only is only supported on x86_64 now.";
1415 goBuyItNow = ''
···7 file included in the tarball */
89let arch =
10- if stdenv.system == "x86_64-linux" then "64"
11- else if stdenv.system == "i686-linux" then "32"
12- else throw "Unsupported system ${stdenv.system}";
1314in stdenv.mkDerivation rec {
15 name = "cnijfilter-${version}";
···7 file included in the tarball */
89let arch =
10+ if stdenv.hostPlatform.system == "x86_64-linux" then "64"
11+ else if stdenv.hostPlatform.system == "i686-linux" then "32"
12+ else throw "Unsupported system ${stdenv.hostPlatform.system}";
1314in stdenv.mkDerivation rec {
15 name = "cnijfilter-${version}";
+3-3
pkgs/misc/cups/drivers/kyocera/default.nix
···23let
4 platform =
5- if stdenv.system == "x86_64-linux" then "64bit"
6- else if stdenv.system == "i686-linux" then "32bit"
7- else throw "Unsupported system: ${stdenv.system}";
89 libPath = lib.makeLibraryPath [ cups ];
10in
···23let
4 platform =
5+ if stdenv.hostPlatform.system == "x86_64-linux" then "64bit"
6+ else if stdenv.hostPlatform.system == "i686-linux" then "32bit"
7+ else throw "Unsupported system: ${stdenv.hostPlatform.system}";
89 libPath = lib.makeLibraryPath [ cups ];
10in
+3-3
pkgs/misc/cups/drivers/kyodialog3/default.nix
···67let
8 platform =
9- if stdenv.system == "x86_64-linux" then "64bit"
10- else if stdenv.system == "i686-linux" then "32bit"
11- else throw "Unsupported system: ${stdenv.system}";
12 debPlatform =
13 if platform == "64bit" then "amd64"
14 else "i386";
···67let
8 platform =
9+ if stdenv.hostPlatform.system == "x86_64-linux" then "64bit"
10+ else if stdenv.hostPlatform.system == "i686-linux" then "32bit"
11+ else throw "Unsupported system: ${stdenv.hostPlatform.system}";
12 debPlatform =
13 if platform == "64bit" then "amd64"
14 else "i386";
+2-2
pkgs/misc/cups/drivers/samsung/4.01.17.nix
···16# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
17# to see what will break when upgrading. Consider a new versioned attribute.
18let
19- installationPath = if stdenv.system == "x86_64-linux" then "x86_64" else "i386";
20- appendPath = if stdenv.system == "x86_64-linux" then "64" else "";
21 libPath = stdenv.lib.makeLibraryPath [ cups libusb ] + ":$out/lib:${stdenv.cc.cc.lib}/lib${appendPath}";
22in stdenv.mkDerivation rec {
23 name = "samsung-UnifiedLinuxDriver-${version}";
···16# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
17# to see what will break when upgrading. Consider a new versioned attribute.
18let
19+ installationPath = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "i386";
20+ appendPath = if stdenv.hostPlatform.system == "x86_64-linux" then "64" else "";
21 libPath = stdenv.lib.makeLibraryPath [ cups libusb ] + ":$out/lib:${stdenv.cc.cc.lib}/lib${appendPath}";
22in stdenv.mkDerivation rec {
23 name = "samsung-UnifiedLinuxDriver-${version}";
+1-1
pkgs/misc/cups/drivers/samsung/default.nix
···23let
45- arch = if stdenv.system == "x86_64-linux"
6 then "x86_64"
7 else "i386";
8
···23let
45+ arch = if stdenv.hostPlatform.system == "x86_64-linux"
6 then "x86_64"
7 else "i386";
8
+1-1
pkgs/misc/drivers/gutenprint/bin.nix
···27stdenv.mkDerivation {
28 name = "cups-gutenprint-binary-5.0.1";
2930- src = if stdenv.system == "x86_64-linux" then fetchurl {
31 url = https://www.openprinting.org/download/printdriver/debian/dists/lsb3.1/main/binary-amd64/gutenprint_5.0.1-1lsb3.1_amd64.deb;
32 sha256 = "0an5gba6r6v54r53s2gj2fjk8fzpl4lrksjas2333528b0k8gbbc";
33 } else throw "TODO"; # get from openprint.com -> drivers -> gutenprint
···27stdenv.mkDerivation {
28 name = "cups-gutenprint-binary-5.0.1";
2930+ src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
31 url = https://www.openprinting.org/download/printdriver/debian/dists/lsb3.1/main/binary-amd64/gutenprint_5.0.1-1lsb3.1_amd64.deb;
32 sha256 = "0an5gba6r6v54r53s2gj2fjk8fzpl4lrksjas2333528b0k8gbbc";
33 } else throw "TODO"; # get from openprint.com -> drivers -> gutenprint
+3-3
pkgs/misc/drivers/hplip/3.16.11.nix
···34 "armv7l-linux" = "arm32";
35 };
3637- hplipArch = hplipPlatforms."${stdenv.system}"
38- or (throw "HPLIP not supported on ${stdenv.system}");
3940 pluginArches = [ "x86_32" "x86_64" "arm32" ];
4142in
4344assert withPlugin -> builtins.elem hplipArch pluginArches
45- || throw "HPLIP plugin not supported on ${stdenv.system}";
4647pythonPackages.buildPythonApplication {
48 inherit name src;
···34 "armv7l-linux" = "arm32";
35 };
3637+ hplipArch = hplipPlatforms."${stdenv.hostPlatform.system}"
38+ or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}");
3940 pluginArches = [ "x86_32" "x86_64" "arm32" ];
4142in
4344assert withPlugin -> builtins.elem hplipArch pluginArches
45+ || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}";
4647pythonPackages.buildPythonApplication {
48 inherit name src;
+3-3
pkgs/misc/drivers/hplip/default.nix
···36 "armv7l-linux" = "arm32";
37 };
3839- hplipArch = hplipPlatforms."${stdenv.system}"
40- or (throw "HPLIP not supported on ${stdenv.system}");
4142 pluginArches = [ "x86_32" "x86_64" "arm32" ];
4344in
4546assert withPlugin -> builtins.elem hplipArch pluginArches
47- || throw "HPLIP plugin not supported on ${stdenv.system}";
4849pythonPackages.buildPythonApplication {
50 inherit name src;
···36 "armv7l-linux" = "arm32";
37 };
3839+ hplipArch = hplipPlatforms."${stdenv.hostPlatform.system}"
40+ or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}");
4142 pluginArches = [ "x86_32" "x86_64" "arm32" ];
4344in
4546assert withPlugin -> builtins.elem hplipArch pluginArches
47+ || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}";
4849pythonPackages.buildPythonApplication {
50 inherit name src;
···16 bitness = if stdenv.is64bit then "64" else "32";
1718 libArch =
19- if stdenv.system == "i686-linux" then
20 "i386-linux-gnu"
21- else if stdenv.system == "x86_64-linux" then
22 "x86_64-linux-gnu"
23 else throw "amdgpu-pro is Linux only. Sorry. The build was stopped.";
24
···16 bitness = if stdenv.is64bit then "64" else "32";
1718 libArch =
19+ if stdenv.hostPlatform.system == "i686-linux" then
20 "i386-linux-gnu"
21+ else if stdenv.hostPlatform.system == "x86_64-linux" then
22 "x86_64-linux-gnu"
23 else throw "amdgpu-pro is Linux only. Sorry. The build was stopped.";
24
+2-2
pkgs/os-specific/linux/ati-drivers/default.nix
···37 build = "15.302";
3839 linuxonly =
40- if stdenv.system == "i686-linux" then
41 true
42- else if stdenv.system == "x86_64-linux" then
43 true
44 else throw "ati-drivers are Linux only. Sorry. The build was stopped.";
45
···37 build = "15.302";
3839 linuxonly =
40+ if stdenv.hostPlatform.system == "i686-linux" then
41 true
42+ else if stdenv.hostPlatform.system == "x86_64-linux" then
43 true
44 else throw "ati-drivers are Linux only. Sorry. The build was stopped.";
45
···24 homepage = https://www.jool.mx/;
25 description = "Fairly compliant SIIT and Stateful NAT64 for Linux - CLI tools";
26 platforms = platforms.linux;
027 maintainers = with maintainers; [ fpletz ];
28 };
29}
···24 homepage = https://www.jool.mx/;
25 description = "Fairly compliant SIIT and Stateful NAT64 for Linux - CLI tools";
26 platforms = platforms.linux;
27+ license = licenses.gpl2;
28 maintainers = with maintainers; [ fpletz ];
29 };
30}
+3-4
pkgs/os-specific/linux/kernel-headers/default.nix
···1{ stdenvNoCC, lib, buildPackages
2-, hostPlatform
3, fetchurl, perl
4}:
56-assert hostPlatform.isLinux;
78let
9 common = { version, sha256, patches ? null }: stdenvNoCC.mkDerivation {
···14 inherit sha256;
15 };
1617- ARCH = hostPlatform.platform.kernelArch;
1819 # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc.
20 # We do this so we have a build->build, not build->host, C compiler.
21 depsBuildBuild = [ buildPackages.stdenv.cc ];
22 nativeBuildInputs = [ perl ];
2324- extraIncludeDirs = lib.optional hostPlatform.isPowerPC ["ppc"];
2526 # "patches" array defaults to 'null' to avoid changing hash
27 # and causing mass rebuild
···1{ stdenvNoCC, lib, buildPackages
02, fetchurl, perl
3}:
45+assert stdenvNoCC.hostPlatform.isLinux;
67let
8 common = { version, sha256, patches ? null }: stdenvNoCC.mkDerivation {
···13 inherit sha256;
14 };
1516+ ARCH = stdenvNoCC.hostPlatform.platform.kernelArch;
1718 # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc.
19 # We do this so we have a build->build, not build->host, C compiler.
20 depsBuildBuild = [ buildPackages.stdenv.cc ];
21 nativeBuildInputs = [ perl ];
2223+ extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
2425 # "patches" array defaults to 'null' to avoid changing hash
26 # and causing mass rebuild
···3536 configureFlags = [ "--localstatedir=/var" "--enable-lvm2" ];
3738- meta = {
39 homepage = http://www.freedesktop.org/wiki/Software/udisks;
40 description = "A daemon and command-line utility for querying and manipulating storage devices";
41- platforms = stdenv.lib.platforms.linux;
042 };
43}
···3536 configureFlags = [ "--localstatedir=/var" "--enable-lvm2" ];
3738+ meta = with stdenv.lib; {
39 homepage = http://www.freedesktop.org/wiki/Software/udisks;
40 description = "A daemon and command-line utility for querying and manipulating storage devices";
41+ platforms = platforms.linux;
42+ license = with licenses; [ gpl2 lgpl2Plus ];
43 };
44}
+3-2
pkgs/os-specific/linux/usbutils/default.nix
···17 --replace /usr/share/usb.ids ${hwdata}/data/hwdata/usb.ids
18 '';
1920- meta = {
21 homepage = http://www.linux-usb.org/;
22 description = "Tools for working with USB devices, such as lsusb";
23- platforms = stdenv.lib.platforms.linux;
024 };
25}
···17 --replace /usr/share/usb.ids ${hwdata}/data/hwdata/usb.ids
18 '';
1920+ meta = with stdenv.lib; {
21 homepage = http://www.linux-usb.org/;
22 description = "Tools for working with USB devices, such as lsusb";
23+ license = licenses.gpl2Plus;
24+ platforms = platforms.linux;
25 };
26}
···348349 darwin = super.darwin // {
350 inherit (darwin) dyld ICU Libsystem libiconv;
351- } // lib.optionalAttrs (super.targetPlatform == localSystem) {
352 inherit (darwin) binutils binutils-unwrapped cctools;
353 };
354- } // lib.optionalAttrs (super.targetPlatform == localSystem) {
355 # Need to get rid of these when cross-compiling.
356 inherit binutils binutils-unwrapped;
357 };
···348349 darwin = super.darwin // {
350 inherit (darwin) dyld ICU Libsystem libiconv;
351+ } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
352 inherit (darwin) binutils binutils-unwrapped cctools;
353 };
354+ } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
355 # Need to get rid of these when cross-compiling.
356 inherit binutils binutils-unwrapped;
357 };
+1-1
pkgs/stdenv/generic/make-derivation.nix
···187 builder = attrs.realBuilder or stdenv.shell;
188 args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
189 inherit stdenv;
190- inherit (stdenv) system;
191 userHook = config.stdenv.userHook or null;
192 __ignoreNulls = true;
193
···187 builder = attrs.realBuilder or stdenv.shell;
188 args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
189 inherit stdenv;
190+ inherit (stdenv.hostPlatform) system;
191 userHook = config.stdenv.userHook or null;
192 __ignoreNulls = true;
193
+1-1
pkgs/stdenv/linux/default.nix
···366 gnumake gnused gnutar gnugrep gnupatch patchelf
367 attr acl paxctl zlib pcre;
368 ${localSystem.libc} = getLibc prevStage;
369- } // lib.optionalAttrs (super.targetPlatform == localSystem) {
370 # Need to get rid of these when cross-compiling.
371 inherit (prevStage) binutils binutils-unwrapped;
372 gcc = cc;
···366 gnumake gnused gnutar gnugrep gnupatch patchelf
367 attr acl paxctl zlib pcre;
368 ${localSystem.libc} = getLibc prevStage;
369+ } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
370 # Need to get rid of these when cross-compiling.
371 inherit (prevStage) binutils binutils-unwrapped;
372 gcc = cc;
+3-3
pkgs/tools/X11/xwinwrap/default.nix
···16 xlibsWrapper
17 ];
1819- buildPhase = if stdenv.system == "x86_64-linux" then ''
20 make all64
21- '' else if stdenv.system == "i686-linux" then ''
22 make all32
23- '' else throw "xwinwrap is not supported on ${stdenv.system}";
2425 installPhase = ''
26 mkdir -p $out/bin
···16 xlibsWrapper
17 ];
1819+ buildPhase = if stdenv.hostPlatform.system == "x86_64-linux" then ''
20 make all64
21+ '' else if stdenv.hostPlatform.system == "i686-linux" then ''
22 make all32
23+ '' else throw "xwinwrap is not supported on ${stdenv.hostPlatform.system}";
2425 installPhase = ''
26 mkdir -p $out/bin
+1-1
pkgs/tools/admin/bluemix-cli/default.nix
···5 version = "0.8.0";
67 src =
8- if stdenv.system == "i686-linux" then
9 fetchurl {
10 name = "linux32-${version}.tar.gz";
11 url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux32";
···5 version = "0.8.0";
67 src =
8+ if stdenv.hostPlatform.system == "i686-linux" then
9 fetchurl {
10 name = "linux32-${version}.tar.gz";
11 url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux32";
+1-1
pkgs/tools/admin/google-cloud-sdk/default.nix
···32 name = "google-cloud-sdk-${version}";
33 version = "206.0.0";
3435- src = fetchurl (sources name stdenv.system);
3637 buildInputs = [ python makeWrapper ];
38
···32 name = "google-cloud-sdk-${version}";
33 version = "206.0.0";
3435+ src = fetchurl (sources name stdenv.hostPlatform.system);
3637 buildInputs = [ python makeWrapper ];
38
+1-1
pkgs/tools/archivers/gnutar/default.nix
···3031 # May have some issues with root compilation because the bootstrap tool
32 # cannot be used as a login shell for now.
33- FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux" || stdenv.isSunOS) "1";
3435 preConfigure = if stdenv.isCygwin then ''
36 sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
···3031 # May have some issues with root compilation because the bootstrap tool
32 # cannot be used as a login shell for now.
33+ FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv7l-linux" || stdenv.isSunOS) "1";
3435 preConfigure = if stdenv.isCygwin then ''
36 sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
···28 "aarch64-linux".target = "arm64";
29 };
3031- canEfi = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
32- inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems);
3334 version = "2.02";
35···8687 configureFlags = [ "--enable-grub-mount" ] # dep of os-prober
88 ++ optional zfsSupport "--enable-libzfs"
89- ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ]
90- ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.system}.target}"];
9192 # save target that grub is compiled for
93 grubTarget = if efiSupport
94- then "${efiSystemsInstall.${stdenv.system}.target}-efi"
95 else if inPCSystems
96- then "${pcSystems.${stdenv.system}.target}-pc"
97 else "";
9899 doCheck = false;
···28 "aarch64-linux".target = "arm64";
29 };
3031+ canEfi = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
32+ inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems);
3334 version = "2.02";
35···8687 configureFlags = [ "--enable-grub-mount" ] # dep of os-prober
88 ++ optional zfsSupport "--enable-libzfs"
89+ ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}" "--program-prefix=" ]
90+ ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}"];
9192 # save target that grub is compiled for
93 grubTarget = if efiSupport
94+ then "${efiSystemsInstall.${stdenv.hostPlatform.system}.target}-efi"
95 else if inPCSystems
96+ then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc"
97 else "";
9899 doCheck = false;
+4-4
pkgs/tools/misc/grub/pvgrub_image/default.nix
···22 tar -cf memdisk.tar grub.cfg
23 # We include all modules except all_video.mod as otherwise grub will fail printing "no symbol table"
24 # if we include it.
25- grub-mkimage -O "${efiSystemsBuild.${stdenv.system}.target}-xen" -c grub-bootstrap.cfg \
26- -m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" \
27- $(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$')
28 mkdir -p "$out/lib/grub-xen"
29- cp "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" $out/lib/grub-xen/
30 '';
3132 meta = with stdenv.lib; {
···22 tar -cf memdisk.tar grub.cfg
23 # We include all modules except all_video.mod as otherwise grub will fail printing "no symbol table"
24 # if we include it.
25+ grub-mkimage -O "${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen" -c grub-bootstrap.cfg \
26+ -m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" \
27+ $(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$')
28 mkdir -p "$out/lib/grub-xen"
29+ cp "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" $out/lib/grub-xen/
30 '';
3132 meta = with stdenv.lib; {
+2-2
pkgs/tools/misc/grub/trusted.nix
···10 "x86_64-linux".target = "i386";
11 };
1213- inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems);
1415 version = if for_HP_laptop then "1.2.1" else "1.2.0";
16···8485 # save target that grub is compiled for
86 grubTarget = if inPCSystems
87- then "${pcSystems.${stdenv.system}.target}-pc"
88 else "";
8990 doCheck = false;
···10 "x86_64-linux".target = "i386";
11 };
1213+ inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems);
1415 version = if for_HP_laptop then "1.2.1" else "1.2.0";
16···8485 # save target that grub is compiled for
86 grubTarget = if inPCSystems
87+ then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc"
88 else "";
8990 doCheck = false;
+2-2
pkgs/tools/misc/mongodb-compass/default.nix
···43 ] + ":${stdenv.cc.cc.lib}/lib64";
4445 src =
46- if stdenv.system == "x86_64-linux" then
47 fetchurl {
48 url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb";
49 sha256 = "0x23jshnr0rafm5sn2vhq2y2gryg8mksahzyv5fszblgaxay234p";
50 }
51 else
52- throw "MongoDB compass is not supported on ${stdenv.system}";
5354in stdenv.mkDerivation {
55 name = "mongodb-compass-${version}";
···43 ] + ":${stdenv.cc.cc.lib}/lib64";
4445 src =
46+ if stdenv.hostPlatform.system == "x86_64-linux" then
47 fetchurl {
48 url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb";
49 sha256 = "0x23jshnr0rafm5sn2vhq2y2gryg8mksahzyv5fszblgaxay234p";
50 }
51 else
52+ throw "MongoDB compass is not supported on ${stdenv.hostPlatform.system}";
5354in stdenv.mkDerivation {
55 name = "mongodb-compass-${version}";
+7-7
pkgs/tools/misc/mprime/default.nix
···23let
4 srcDir =
5- if stdenv.system == "x86_64-linux" then "linux64"
6- else if stdenv.system == "i686-linux" then "linux"
7- else if stdenv.system == "x86_64-darwin" then "macosx64"
8 else throwSystem;
9- throwSystem = throw "Unsupported system: ${stdenv.system}";
10 gwnum =
11- if stdenv.system == "x86_64-linux" then "make64"
12- else if stdenv.system == "i686-linux" then "makefile"
13- else if stdenv.system == "x86_64-darwin" then "makemac"
14 else throwSystem;
15in
16
···23let
4 srcDir =
5+ if stdenv.hostPlatform.system == "x86_64-linux" then "linux64"
6+ else if stdenv.hostPlatform.system == "i686-linux" then "linux"
7+ else if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx64"
8 else throwSystem;
9+ throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
10 gwnum =
11+ if stdenv.hostPlatform.system == "x86_64-linux" then "make64"
12+ else if stdenv.hostPlatform.system == "i686-linux" then "makefile"
13+ else if stdenv.hostPlatform.system == "x86_64-darwin" then "makemac"
14 else throwSystem;
15in
16
+1-1
pkgs/tools/misc/ocz-ssd-guru/default.nix
···1{ fetchurl, stdenv, xorg, freetype, fontconfig, libGLU_combined, glibc, makeWrapper }:
23let
4- system = if stdenv.system == "x86_64-linux" then "linux64" else "linux32";
5in
6stdenv.mkDerivation rec {
7 name = "ocz-ssd-guru-${version}";
···1{ fetchurl, stdenv, xorg, freetype, fontconfig, libGLU_combined, glibc, makeWrapper }:
23let
4+ system = if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" else "linux32";
5in
6stdenv.mkDerivation rec {
7 name = "ocz-ssd-guru-${version}";
···29 # Explicitly setting target ensures code can be compiled against a skalibs
30 # binary built on a different version of darwin.
31 # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
32- ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
3334 postInstall = ''
35 mkdir -p $doc/share/doc/s6-portable-utils/
···29 # Explicitly setting target ensures code can be compiled against a skalibs
30 # binary built on a different version of darwin.
31 # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
32+ ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
3334 postInstall = ''
35 mkdir -p $doc/share/doc/s6-portable-utils/
+1-1
pkgs/tools/misc/staruml/default.nix
···13 name = "staruml-${version}";
1415 src =
16- if stdenv.system == "i686-linux" then fetchurl {
17 url = "http://staruml.io/download/release/v${version}/StarUML-v${version}-32-bit.deb";
18 sha256 = "0vb3k9m3l6pmsid4shlk0xdjsriq3gxzm8q7l04didsppg0vvq1n";
19 } else fetchurl {
···13 name = "staruml-${version}";
1415 src =
16+ if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
17 url = "http://staruml.io/download/release/v${version}/StarUML-v${version}-32-bit.deb";
18 sha256 = "0vb3k9m3l6pmsid4shlk0xdjsriq3gxzm8q7l04didsppg0vvq1n";
19 } else fetchurl {
···37 ./set-buildroot.patch
38 ]
3940- ++ stdenv.lib.optional (stdenv.system == "x86_64-linux")
41 # Force use of old memcpy so that installwatch works on Glibc <
42 # 2.14.
43 ./use-old-memcpy.patch;
···37 ./set-buildroot.patch
38 ]
3940+ ++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux")
41 # Force use of old memcpy so that installwatch works on Glibc <
42 # 2.14.
43 ./use-old-memcpy.patch;
···45let
6 afl-qemu = callPackage ./qemu.nix {};
7- qemu-exe-name = if stdenv.system == "x86_64-linux" then "qemu-x86_64"
8- else if stdenv.system == "i686-linux" then "qemu-i386"
9- else throw "afl: no support for ${stdenv.system}!";
10in
1112stdenv.mkDerivation rec {
···45let
6 afl-qemu = callPackage ./qemu.nix {};
7+ qemu-exe-name = if stdenv.hostPlatform.system == "x86_64-linux" then "qemu-x86_64"
8+ else if stdenv.hostPlatform.system == "i686-linux" then "qemu-i386"
9+ else throw "afl: no support for ${stdenv.hostPlatform.system}!";
10in
1112stdenv.mkDerivation rec {
+4-4
pkgs/tools/security/afl/qemu.nix
···16 aflTypesFile = writeText "afl-types.h"
17 (builtins.readFile ./qemu-patches/afl-types.h);
1819- cpuTarget = if stdenv.system == "x86_64-linux" then "x86_64-linux-user"
20- else if stdenv.system == "i686-linux" then "i386-linux-user"
21- else throw "afl: no support for ${stdenv.system}!";
22in
23stdenv.mkDerivation rec {
24 name = "afl-${n}";
···33 vde2 texinfo libuuid flex bison lzo snappy autoconf
34 libcap_ng gnutls
35 ]
36- ++ optionals (hasSuffix "linux" stdenv.system) [ libaio ];
3738 enableParallelBuilding = true;
39
···16 aflTypesFile = writeText "afl-types.h"
17 (builtins.readFile ./qemu-patches/afl-types.h);
1819+ cpuTarget = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-user"
20+ else if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-user"
21+ else throw "afl: no support for ${stdenv.hostPlatform.system}!";
22in
23stdenv.mkDerivation rec {
24 name = "afl-${n}";
···33 vde2 texinfo libuuid flex bison lzo snappy autoconf
34 libcap_ng gnutls
35 ]
36+ ++ optionals (hasSuffix "linux" stdenv.hostPlatform.system) [ libaio ];
3738 enableParallelBuilding = true;
39
+6-6
pkgs/tools/security/encryptr/default.nix
···5}:
67let
8- arch = if stdenv.system == "x86_64-linux" then "amd"
9- else if stdenv.system == "i686-linux" then "i386"
10- else throw "Encryptr for ${stdenv.system} not supported!";
1112- sha256 = if stdenv.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2"
13- else if stdenv.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm"
14- else throw "Encryptr for ${stdenv.system} not supported!";
1516in stdenv.mkDerivation rec {
17 name = "encryptr-${version}";
···5}:
67let
8+ arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd"
9+ else if stdenv.hostPlatform.system == "i686-linux" then "i386"
10+ else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!";
1112+ sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2"
13+ else if stdenv.hostPlatform.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm"
14+ else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!";
1516in stdenv.mkDerivation rec {
17 name = "encryptr-${version}";
···56stdenv.mkDerivation rec {
7 name = "at-${version}";
8- version = "3.1.20";
910 src = fetchurl {
11 # Debian is apparently the last location where it can be found.
12 url = "mirror://debian/pool/main/a/at/at_${version}.orig.tar.gz";
13- sha256 = "1fgsrqpx0r6qcjxmlsqnwilydhfxn976c870mjc0n1bkmcy94w88";
14 };
1516 patches = [
···56stdenv.mkDerivation rec {
7 name = "at-${version}";
8+ version = "3.1.23";
910 src = fetchurl {
11 # Debian is apparently the last location where it can be found.
12 url = "mirror://debian/pool/main/a/at/at_${version}.orig.tar.gz";
13+ sha256 = "040pr2ivfbrhvrhzis97cpwfkzpr7nin33nc301aga5aajlhlicp";
14 };
1516 patches = [
···1{ stdenv, fetchurl
2# TODO: links -lsigsegv but loses the reference for some reason
3-, withSigsegv ? (false && stdenv.system != "x86_64-cygwin"), libsigsegv
4, interactive ? false, readline
56/* Test suite broke on:
···1{ stdenv, fetchurl
2# TODO: links -lsigsegv but loses the reference for some reason
3+, withSigsegv ? (false && stdenv.hostPlatform.system != "x86_64-cygwin"), libsigsegv
4, interactive ? false, readline
56/* Test suite broke on:
···27 defaultBuildBuildScope = pkgs.buildPackages.buildPackages // pkgs.buildPackages.buildPackages.xorg;
28 defaultBuildHostScope = pkgs.buildPackages // pkgs.buildPackages.xorg;
29 defaultBuildTargetScope =
30- if pkgs.targetPlatform == pkgs.hostPlatform
31 then defaultBuildHostScope
32- else assert pkgs.hostPlatform == pkgs.buildPlatform; defaultHostTargetScope;
33 defaultHostHostScope = {}; # unimplemented
34 defaultHostTargetScope = pkgs // pkgs.xorg;
35 defaultTargetTargetScope = pkgs.targetPackages // pkgs.targetPackages.xorg or {};
···114 pkgsTargetTarget = defaultTargetTargetScope;
115 } // {
116 # These should never be spliced under any circumstances
117- inherit (pkgs) pkgs buildPackages targetPackages
118- buildPlatform targetPlatform hostPlatform;
119 };
120121in
···27 defaultBuildBuildScope = pkgs.buildPackages.buildPackages // pkgs.buildPackages.buildPackages.xorg;
28 defaultBuildHostScope = pkgs.buildPackages // pkgs.buildPackages.xorg;
29 defaultBuildTargetScope =
30+ if pkgs.stdenv.targetPlatform == pkgs.stdenv.hostPlatform
31 then defaultBuildHostScope
32+ else assert pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform; defaultHostTargetScope;
33 defaultHostHostScope = {}; # unimplemented
34 defaultHostTargetScope = pkgs // pkgs.xorg;
35 defaultTargetTargetScope = pkgs.targetPackages // pkgs.targetPackages.xorg or {};
···114 pkgsTargetTarget = defaultTargetTargetScope;
115 } // {
116 # These should never be spliced under any circumstances
117+ inherit (pkgs) pkgs buildPackages targetPackages;
118+ inherit (pkgs.stdenv) buildPlatform targetPlatform hostPlatform;
119 };
120121in
+4-4
pkgs/top-level/unix-tools.nix
···1-{ pkgs, buildEnv, runCommand, hostPlatform, lib, stdenv }:
23# These are some unix tools that are commonly included in the /usr/bin
4# and /usr/sbin directory under more normal distributions. Along with
···16 version = "1003.1-2008";
1718 singleBinary = cmd: providers: let
19- provider = providers.${hostPlatform.parsed.kernel.name};
20 bin = "${getBin provider}/bin/${cmd}";
21 manpage = "${getOutput "man" provider}/share/man/man1/${cmd}.1.gz";
22 in runCommand "${cmd}-${version}" {
···59 linux = pkgs.utillinux;
60 };
61 getconf = {
62- linux = if hostPlatform.libc == "glibc" then pkgs.glibc
63 else pkgs.netbsd.getconf;
64 darwin = pkgs.darwin.system_cmds;
65 };
66 getent = {
67- linux = if hostPlatform.libc == "glibc" then pkgs.glibc
68 else pkgs.netbsd.getent;
69 darwin = pkgs.netbsd.getent;
70 };
···1+{ pkgs, buildEnv, runCommand, lib, stdenv }:
23# These are some unix tools that are commonly included in the /usr/bin
4# and /usr/sbin directory under more normal distributions. Along with
···16 version = "1003.1-2008";
1718 singleBinary = cmd: providers: let
19+ provider = providers.${stdenv.hostPlatform.parsed.kernel.name};
20 bin = "${getBin provider}/bin/${cmd}";
21 manpage = "${getOutput "man" provider}/share/man/man1/${cmd}.1.gz";
22 in runCommand "${cmd}-${version}" {
···59 linux = pkgs.utillinux;
60 };
61 getconf = {
62+ linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc
63 else pkgs.netbsd.getconf;
64 darwin = pkgs.darwin.system_cmds;
65 };
66 getent = {
67+ linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc
68 else pkgs.netbsd.getent;
69 darwin = pkgs.netbsd.getent;
70 };