From ee903f23cdba587a219e67e840f88e6f12f51989 Mon Sep 17 00:00:00 2001 From: Corbin Date: Mon, 25 Jun 2018 12:17:41 -0700 Subject: [PATCH 001/123] pythonPackages.dictionaries: init at 0.0.1 --- .../python-modules/dictionaries/default.nix | 19 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 pkgs/development/python-modules/dictionaries/default.nix diff --git a/pkgs/development/python-modules/dictionaries/default.nix b/pkgs/development/python-modules/dictionaries/default.nix new file mode 100644 index 00000000000..0deab276255 --- /dev/null +++ b/pkgs/development/python-modules/dictionaries/default.nix @@ -0,0 +1,19 @@ +{ buildPythonPackage, fetchPypi, lib, six }: + +buildPythonPackage rec { + pname = "dictionaries"; + version = "0.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1jx2ph509sk4l7spslz16y8l6xn97d13nspn4ds2lxn5ward9ihy"; + }; + + buildInputs = [ six ]; + + meta = { + description = "Dict implementations with attribute access"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.MostAwesomeDude ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0af6cd7f320..81d27ad7152 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -248,6 +248,8 @@ in { dkimpy = callPackage ../development/python-modules/dkimpy { }; + dictionaries = callPackage ../development/python-modules/dictionaries { }; + diff_cover = callPackage ../development/python-modules/diff_cover { }; emcee = callPackage ../development/python-modules/emcee { }; From f20100a3e44babda44c55d7873e5200c5114a2c3 Mon Sep 17 00:00:00 2001 From: Corbin Date: Mon, 25 Jun 2018 20:33:09 -0700 Subject: [PATCH 002/123] igraph: init at 0.7.1 --- pkgs/development/libraries/igraph/default.nix | 31 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/libraries/igraph/default.nix diff --git a/pkgs/development/libraries/igraph/default.nix b/pkgs/development/libraries/igraph/default.nix new file mode 100644 index 00000000000..4ac3ebc0988 --- /dev/null +++ b/pkgs/development/libraries/igraph/default.nix @@ -0,0 +1,31 @@ +{ stdenv, lib, fetchFromGitHub, + pkgconfig, autoreconfHook, + flex, yacc, zlib, libxml2 }: + +stdenv.mkDerivation rec { + name = "igraph"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "igraph"; + repo = name; + rev = version; + sha256 = "1wsy0r511gk069il6iqjs27q8cjvqz20gf0a7inybx1bw84845z8"; + }; + + nativeBuildInputs = [ pkgconfig autoreconfHook ]; + buildInputs = [ flex yacc zlib libxml2 ]; + + # This file is normally generated by igraph's bootstrap.sh, but we can do it + # ourselves. ~ C. + postPatch = '' + echo "${version}" > VERSION + ''; + + meta = { + description = "The network analysis package"; + homepage = http://igraph.org/; + license = lib.licenses.gpl2; + maintainers = [ lib.maintainers.MostAwesomeDude ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5c5a58c4f4f..0bb3409347c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21241,6 +21241,8 @@ with pkgs; idsk = callPackage ../tools/filesystems/idsk { }; + igraph = callPackage ../development/libraries/igraph { }; + illum = callPackage ../tools/system/illum { }; # using the new configuration style proposal which is unstable From 14c88b67c14fb7e4ab56adee9854ca7a23858113 Mon Sep 17 00:00:00 2001 From: Corbin Date: Thu, 28 Jun 2018 21:41:45 -0700 Subject: [PATCH 003/123] pythonPackages.python-igraph: init at 0.7.1.post6 --- .../python-modules/python-igraph/default.nix | 22 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 5 +++++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/development/python-modules/python-igraph/default.nix diff --git a/pkgs/development/python-modules/python-igraph/default.nix b/pkgs/development/python-modules/python-igraph/default.nix new file mode 100644 index 00000000000..a24f3a9fedc --- /dev/null +++ b/pkgs/development/python-modules/python-igraph/default.nix @@ -0,0 +1,22 @@ +{ buildPythonPackage, fetchPypi, lib, + pkgconfig, igraph }: + +buildPythonPackage rec { + pname = "python-igraph"; + version = "0.7.1.post6"; + + buildInputs = [ pkgconfig igraph ]; + + src = fetchPypi { + inherit pname version; + sha256 = "0xp61zz710qlzhmzbfr65d5flvsi8zf2xy78s6rsszh719wl5sm5"; + }; + + meta = { + description = "High performance graph data structures and algorithms"; + license = lib.licenses.gpl2; + maintainers = [ lib.maintainers.MostAwesomeDude ]; + }; +} + + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 81d27ad7152..b3c558cff59 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -449,6 +449,11 @@ in { python-hosts = callPackage ../development/python-modules/python-hosts { }; + python-igraph = callPackage ../development/python-modules/python-igraph { + pkgconfig = pkgs.pkgconfig; + igraph = pkgs.igraph; + }; + python3-openid = callPackage ../development/python-modules/python3-openid { }; python-periphery = callPackage ../development/python-modules/python-periphery { }; From a502f2c4c8c274a63fa762417a1c76ee8119863a Mon Sep 17 00:00:00 2001 From: Corbin Date: Sat, 28 Jul 2018 07:23:41 -0700 Subject: [PATCH 004/123] pythonPackages.ordered-set: init at 3.0.1 This package has working tests! A minor miracle in the Python tree. --- .../python-modules/ordered-set/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/python-modules/ordered-set/default.nix diff --git a/pkgs/development/python-modules/ordered-set/default.nix b/pkgs/development/python-modules/ordered-set/default.nix new file mode 100644 index 00000000000..bf20f7827be --- /dev/null +++ b/pkgs/development/python-modules/ordered-set/default.nix @@ -0,0 +1,26 @@ +{ buildPythonPackage, fetchPypi, lib, pytest }: + +buildPythonPackage rec { + pname = "ordered-set"; + version = "3.0.1"; + + buildInputs = [ pytest ]; + + src = fetchPypi { + inherit pname version; + sha256 = "0yyfkkfzpwlx4jlfqzb7p1xpzmn2jyzq2qlakqx62pxizfzxfvrx"; + }; + + checkPhase = '' + py.test test.py + ''; + + meta = { + description = "A MutableSet that remembers its order, so that every entry has an index."; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.MostAwesomeDude ]; + }; +} + + + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b3c558cff59..7e9eb275833 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -334,6 +334,8 @@ in { oauthenticator = callPackage ../development/python-modules/oauthenticator { }; + ordered-set = callPackage ../development/python-modules/ordered-set { }; + outcome = callPackage ../development/python-modules/outcome {}; pdf2image = callPackage ../development/python-modules/pdf2image { }; From 9470c68b9f858098c0708e98eb742689d4c52cfe Mon Sep 17 00:00:00 2001 From: Corbin Date: Sun, 22 Jul 2018 11:59:14 -0700 Subject: [PATCH 005/123] pythonPackages.cozy: init at 2.0a1 --- .../python-modules/cozy/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/cozy/default.nix diff --git a/pkgs/development/python-modules/cozy/default.nix b/pkgs/development/python-modules/cozy/default.nix new file mode 100644 index 00000000000..0feca2773b3 --- /dev/null +++ b/pkgs/development/python-modules/cozy/default.nix @@ -0,0 +1,38 @@ +{ buildPythonPackage, fetchFromGitHub, lib, + z3, ply, python-igraph, oset, ordered-set, dictionaries }: + +buildPythonPackage { + pname = "cozy"; + version = "2.0a1"; + + propagatedBuildInputs = [ + z3 ply python-igraph oset ordered-set dictionaries + ]; + + src = fetchFromGitHub { + owner = "CozySynthesizer"; + repo = "cozy"; + rev = "f553e9b"; + sha256 = "1jhr5gzihj8dkg0yc5dmi081v2isxharl0ph7v2grqj0bwqzl40j"; + }; + + # Yoink the Z3 dependency name, because our Z3 package doesn't provide it. + postPatch = '' + sed -i -e '/z3-solver/d' requirements.txt + ''; + + # Tests are not correctly set up in the source tree. + doCheck = false; + + # There is some first-time-run codegen that we will force to happen. + postInstall = '' + $out/bin/cozy --help + ''; + + meta = { + description = "The collection synthesizer"; + homepage = https://cozy.uwplse.org/; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.MostAwesomeDude ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7e9eb275833..b21767bd867 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -238,6 +238,8 @@ in { clustershell = callPackage ../development/python-modules/clustershell { }; + cozy = callPackage ../development/python-modules/cozy { }; + dendropy = callPackage ../development/python-modules/dendropy { }; dbf = callPackage ../development/python-modules/dbf { }; From fc03a9f5b7bdd839f9f51f0ec950ae53228643e4 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Sat, 25 Aug 2018 18:08:24 -0400 Subject: [PATCH 006/123] initial work on incron service --- nixos/modules/module-list.nix | 1 + nixos/modules/services/monitoring/incron.nix | 73 ++++++++++++++++++++ pkgs/tools/system/incron/default.nix | 33 +++++++++ 3 files changed, 107 insertions(+) create mode 100644 nixos/modules/services/monitoring/incron.nix create mode 100644 pkgs/tools/system/incron/default.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 2846afea8fb..4d83e10d029 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -416,6 +416,7 @@ ./services/monitoring/graphite.nix ./services/monitoring/hdaps.nix ./services/monitoring/heapster.nix + ./services/monitoring/incron.nix ./services/monitoring/longview.nix ./services/monitoring/monit.nix ./services/monitoring/munin.nix diff --git a/nixos/modules/services/monitoring/incron.nix b/nixos/modules/services/monitoring/incron.nix new file mode 100644 index 00000000000..8e312c65f93 --- /dev/null +++ b/nixos/modules/services/monitoring/incron.nix @@ -0,0 +1,73 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.incron; + +in + +{ + options = { + + services.incron = { + + enable = mkOption { + type = types.bool; + default = false; + description = "Whether to enable the incron daemon."; + }; + + allow = mkOption { + type = types.nullOr (types.listOf types.str); + default = null; + description = "Users allowed to use incrontab."; + }; + + deny = mkOption { + type = types.nullOr (types.listOf types.str); + default = null; + description = "Users forbidden from using incrontab."; + }; + + systab = mkOption { + type = types.lines; + default = ""; + description = "The system incrontab contents."; + example = '' + "/var/mail IN_CLOSE_WRITE abc $@/$#" + "/tmp IN_ALL_EVENTS efg $@/$# $&" + ''; + }; + + }; + + }; + + config = mkIf cfg.enable { + + environment.systemPackages = [ pkgs.incron ]; + + security.wrappers.incrontab.source = "${pkgs.incron}/bin/incrontab"; + + environment.etc."incron.d/system".text = "${cfg.systab}"; + environment.etc."incron.allow" = mkIf (cfg.allow != null) { + text = "${concatStringsSep "\n" cfg.allow}"; + }; + environment.etc."incron.deny" = mkIf (cfg.deny != null) { + text = "${concatStringsSep "\n" cfg.deny}"; + }; + + systemd.services.incron = { + description = "File system events scheduler"; + wantedBy = [ "multi-user.target" ]; + path = [ config.system.path ]; + preStart = "mkdir -m 710 -p /var/spool/incron"; + serviceConfig.Type = "forking"; + serviceConfig.PIDFile = "/run/incrond.pid"; + serviceConfig.ExecStart = "${pkgs.incron}/bin/incrond"; + }; + }; + +} diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix new file mode 100644 index 00000000000..bb320f8d894 --- /dev/null +++ b/pkgs/tools/system/incron/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, bash }: + +stdenv.mkDerivation rec { + name = "incron-0.5.12"; + src = fetchurl { + url = "https://github.com/ar-/incron/archive/0.5.12.tar.gz"; + sha256 = "14cgsfyl43pd86wy40m1xwr7ww023n2jyks66ngybz5s4gbhps6c"; + }; + + patchPhase = '' + sed -i "s|PREFIX = /usr/local|PREFIX = $out|g" Makefile + sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp + ''; + + installPhase = '' + mkdir -p $out/bin + + # make install doesn't work because setuid and permissions + # just manually install the binaries instead + cp incrond incrontab $out/bin/ + + # make install-man is fine for documentation + make install-man + ''; + + meta = with stdenv.lib; { + description = " + The inotify cron daemon (incrond) is a daemon which monitors filesystem events and executes commands defined in system and user tables. It's use is generally similar to cron."; + license = gpl2; + homepage = https://github.com/ar-/incron; + platforms = platforms.linux; + }; +} From 63c3b7ce10ab8672ecb28226f31c09e9809e80c0 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Sat, 25 Aug 2018 20:51:39 -0400 Subject: [PATCH 007/123] fixed license added incron to pkgs --- pkgs/tools/system/incron/default.nix | 2 +- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix index bb320f8d894..a06bb324aaa 100644 --- a/pkgs/tools/system/incron/default.nix +++ b/pkgs/tools/system/incron/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = " The inotify cron daemon (incrond) is a daemon which monitors filesystem events and executes commands defined in system and user tables. It's use is generally similar to cron."; - license = gpl2; + license = licenses.gpl2; homepage = https://github.com/ar-/incron; platforms = platforms.linux; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6a25ec7c561..0183f3e8f16 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3237,6 +3237,8 @@ with pkgs; inboxer = callPackage ../applications/networking/mailreaders/inboxer { }; + incron = callPackage ../tools/system/incron { }; + inetutils = callPackage ../tools/networking/inetutils { }; infiniband-diags = callPackage ../tools/networking/infiniband-diags { }; From 944f0b01a4029472565c91642ed5819fab4f4cc0 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Sun, 26 Aug 2018 01:02:33 +0000 Subject: [PATCH 008/123] replace hardcoded guess path with what i hope is the proper nixos path --- pkgs/tools/system/incron/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix index a06bb324aaa..2f78a37203f 100644 --- a/pkgs/tools/system/incron/default.nix +++ b/pkgs/tools/system/incron/default.nix @@ -10,6 +10,7 @@ stdenv.mkDerivation rec { patchPhase = '' sed -i "s|PREFIX = /usr/local|PREFIX = $out|g" Makefile sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp + sed -i "s|/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin|/run/current-system/sw/bin|g" usertable.cpp ''; installPhase = '' From 8da9d7ceb186a92e0737fa98f334b4c4d7a16543 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Sat, 25 Aug 2018 21:10:59 -0400 Subject: [PATCH 009/123] conforming to CONTRIBUTING.md --- maintainers/maintainer-list.nix | 5 +++++ pkgs/tools/system/incron/default.nix | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 657e5696041..a5e48aa30f4 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -23,6 +23,11 @@ github = "a1russell"; name = "Adam Russell"; }; + aanderse = { + email = "aaron@fosslib.net"; + github = "aanderse"; + name = "Aaron Andersen"; + }; aaronschif = { email = "aaronschif@gmail.com"; github = "aaronschif"; diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix index 2f78a37203f..8c1b717d6d2 100644 --- a/pkgs/tools/system/incron/default.nix +++ b/pkgs/tools/system/incron/default.nix @@ -25,10 +25,10 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - description = " - The inotify cron daemon (incrond) is a daemon which monitors filesystem events and executes commands defined in system and user tables. It's use is generally similar to cron."; - license = licenses.gpl2; + description = "A daemon which monitors filesystem events and executes commands defined in system and user tables"; homepage = https://github.com/ar-/incron; + license = licenses.gpl2; + maintainers = [ maintainers.aanderse ]; platforms = platforms.linux; }; } From fc1f33bc2c45fbffc6d2217d95e9f64fce509d90 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 27 Aug 2018 15:23:19 +0000 Subject: [PATCH 010/123] fixed issue with system jobs --- nixos/modules/services/monitoring/incron.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/monitoring/incron.nix b/nixos/modules/services/monitoring/incron.nix index 8e312c65f93..5eec4b82fa0 100644 --- a/nixos/modules/services/monitoring/incron.nix +++ b/nixos/modules/services/monitoring/incron.nix @@ -51,7 +51,11 @@ in security.wrappers.incrontab.source = "${pkgs.incron}/bin/incrontab"; - environment.etc."incron.d/system".text = "${cfg.systab}"; + # incron won't read symlinks + environment.etc."incron.d/system" = { + mode = "0444"; + text = "${cfg.systab}"; + }; environment.etc."incron.allow" = mkIf (cfg.allow != null) { text = "${concatStringsSep "\n" cfg.allow}"; }; From 4d89adcd7292b69765eb7692c7e145b28256b30f Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 27 Aug 2018 15:24:10 +0000 Subject: [PATCH 011/123] tweak the PATH variable to better match what NixOS provides --- pkgs/tools/system/incron/default.nix | 5 +-- pkgs/tools/system/incron/default_path.patch | 36 +++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 pkgs/tools/system/incron/default_path.patch diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix index 8c1b717d6d2..6c708a49b64 100644 --- a/pkgs/tools/system/incron/default.nix +++ b/pkgs/tools/system/incron/default.nix @@ -7,10 +7,11 @@ stdenv.mkDerivation rec { sha256 = "14cgsfyl43pd86wy40m1xwr7ww023n2jyks66ngybz5s4gbhps6c"; }; - patchPhase = '' + patches = [ ./default_path.patch ]; + + prePatch = '' sed -i "s|PREFIX = /usr/local|PREFIX = $out|g" Makefile sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp - sed -i "s|/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin|/run/current-system/sw/bin|g" usertable.cpp ''; installPhase = '' diff --git a/pkgs/tools/system/incron/default_path.patch b/pkgs/tools/system/incron/default_path.patch new file mode 100644 index 00000000000..72ef477a92e --- /dev/null +++ b/pkgs/tools/system/incron/default_path.patch @@ -0,0 +1,36 @@ +diff --git usertable.cpp usertable.cpp +index 11fd04b..a8681bd 100644 +--- a/usertable.cpp ++++ b/usertable.cpp +@@ -43,9 +43,6 @@ + #define DONT_FOLLOW(mask) (false) + #endif // IN_DONT_FOLLOW + +-// this is not enough, but... +-#define DEFAULT_PATH "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin" +- + + PROC_MAP UserTable::s_procMap; + +@@ -597,12 +594,20 @@ void UserTable::RunAsUser(std::string cmd) const + if (clearenv() != 0) + goto failed; + ++ // try to recreate the user path as best as possible ++ std::string DEFAULT_PATH; ++ DEFAULT_PATH += "/run/wrappers/bin:/home/"; ++ DEFAULT_PATH += pwd->pw_name; ++ DEFAULT_PATH += "/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/etc/profiles/per-user/"; ++ DEFAULT_PATH += pwd->pw_name; ++ DEFAULT_PATH += "/bin"; ++ + if ( setenv("LOGNAME", pwd->pw_name, 1) != 0 + || setenv("USER", pwd->pw_name, 1) != 0 + || setenv("USERNAME", pwd->pw_name, 1) != 0 + || setenv("HOME", pwd->pw_dir, 1) != 0 + || setenv("SHELL", pwd->pw_shell, 1) != 0 +- || setenv("PATH", DEFAULT_PATH, 1) != 0) ++ || setenv("PATH", DEFAULT_PATH.c_str(), 1) != 0) + { + goto failed; + } From 64fd3f10aaaca018334ca019d1c9aa4b7c87fe2b Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 27 Aug 2018 15:49:41 +0000 Subject: [PATCH 012/123] fixed mistake about location of HOME --- pkgs/tools/system/incron/default_path.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/incron/default_path.patch b/pkgs/tools/system/incron/default_path.patch index 72ef477a92e..ae173ea29e6 100644 --- a/pkgs/tools/system/incron/default_path.patch +++ b/pkgs/tools/system/incron/default_path.patch @@ -18,8 +18,8 @@ index 11fd04b..a8681bd 100644 + // try to recreate the user path as best as possible + std::string DEFAULT_PATH; -+ DEFAULT_PATH += "/run/wrappers/bin:/home/"; -+ DEFAULT_PATH += pwd->pw_name; ++ DEFAULT_PATH += "/run/wrappers/bin:"; ++ DEFAULT_PATH += pwd->pw_dir; + DEFAULT_PATH += "/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/etc/profiles/per-user/"; + DEFAULT_PATH += pwd->pw_name; + DEFAULT_PATH += "/bin"; From e8d79aba4e1a955bec8573de766e99c26ec3b15b Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 27 Aug 2018 20:59:19 +0000 Subject: [PATCH 013/123] use fetchFromGitHub instead of fetchurl as recommended by @jtojnar --- pkgs/tools/system/incron/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix index 6c708a49b64..4133342f6c4 100644 --- a/pkgs/tools/system/incron/default.nix +++ b/pkgs/tools/system/incron/default.nix @@ -1,10 +1,12 @@ -{ stdenv, fetchurl, bash }: +{ stdenv, fetchFromGitHub, bash }: stdenv.mkDerivation rec { name = "incron-0.5.12"; - src = fetchurl { - url = "https://github.com/ar-/incron/archive/0.5.12.tar.gz"; - sha256 = "14cgsfyl43pd86wy40m1xwr7ww023n2jyks66ngybz5s4gbhps6c"; + src = fetchFromGitHub { + owner = "ar-"; + repo = "incron"; + rev = "incron-0.5.12"; + sha256 = "11d5f98cjafiv9h9zzzrw2s06s2fvdg8gp64km7mdprd2xmy6dih"; }; patches = [ ./default_path.patch ]; From 7840d00532f87ce0712522e0fbbdc335ce83fd3f Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 27 Aug 2018 21:15:03 +0000 Subject: [PATCH 014/123] clarified the descriptions of the allow and deny options --- nixos/modules/services/monitoring/incron.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/monitoring/incron.nix b/nixos/modules/services/monitoring/incron.nix index 5eec4b82fa0..4a9e1a9b7b8 100644 --- a/nixos/modules/services/monitoring/incron.nix +++ b/nixos/modules/services/monitoring/incron.nix @@ -22,7 +22,14 @@ in allow = mkOption { type = types.nullOr (types.listOf types.str); default = null; - description = "Users allowed to use incrontab."; + description = '' + Users allowed to use incrontab. + + If empty then no user will be allowed to have their own incrontab. + If null then will defer to . + If both and are null + then all users will be allowed to have their own incrontab. + ''; }; deny = mkOption { From bd50320cb1fe6e16294d93d7d051ecd4111e3a16 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 27 Aug 2018 21:28:20 +0000 Subject: [PATCH 015/123] some cleanup of the package .nix file as recommended by @jtojnar --- pkgs/tools/system/incron/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix index 4133342f6c4..43b91f6fac1 100644 --- a/pkgs/tools/system/incron/default.nix +++ b/pkgs/tools/system/incron/default.nix @@ -16,15 +16,15 @@ stdenv.mkDerivation rec { sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp ''; - installPhase = '' + installFlags = [ "PREFIX=$(out)" ]; + installTargets = [ "install-man" ]; + + preInstall = '' mkdir -p $out/bin # make install doesn't work because setuid and permissions # just manually install the binaries instead cp incrond incrontab $out/bin/ - - # make install-man is fine for documentation - make install-man ''; meta = with stdenv.lib; { From b77f38c3cd715f59447f4e318fe38abd4f3fee57 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 27 Aug 2018 21:31:55 +0000 Subject: [PATCH 016/123] added a comment about the PATH variable under which incrontab commands will run --- nixos/modules/services/monitoring/incron.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/monitoring/incron.nix b/nixos/modules/services/monitoring/incron.nix index 4a9e1a9b7b8..edba38140c6 100644 --- a/nixos/modules/services/monitoring/incron.nix +++ b/nixos/modules/services/monitoring/incron.nix @@ -1,3 +1,4 @@ + { config, lib, pkgs, ... }: with lib; @@ -16,7 +17,11 @@ in enable = mkOption { type = types.bool; default = false; - description = "Whether to enable the incron daemon."; + description = '' + Whether to enable the incron daemon. + + Note that commands run under incrontab only support common Nix profiles for the PATH provided variable. + ''; }; allow = mkOption { From 9153e499a821e946c075191073397f76152bd89b Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 27 Aug 2018 22:35:25 +0000 Subject: [PATCH 017/123] removed redundant line --- pkgs/tools/system/incron/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix index 43b91f6fac1..d29575f8be3 100644 --- a/pkgs/tools/system/incron/default.nix +++ b/pkgs/tools/system/incron/default.nix @@ -12,7 +12,6 @@ stdenv.mkDerivation rec { patches = [ ./default_path.patch ]; prePatch = '' - sed -i "s|PREFIX = /usr/local|PREFIX = $out|g" Makefile sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp ''; From 1a05952f442393a2a489f2d47c9a42e839af7ea9 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 27 Aug 2018 22:37:22 +0000 Subject: [PATCH 018/123] remove duplicate string --- pkgs/tools/system/incron/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix index d29575f8be3..29e3b88acc8 100644 --- a/pkgs/tools/system/incron/default.nix +++ b/pkgs/tools/system/incron/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "ar-"; repo = "incron"; - rev = "incron-0.5.12"; + rev = name; sha256 = "11d5f98cjafiv9h9zzzrw2s06s2fvdg8gp64km7mdprd2xmy6dih"; }; From 3d1091eb5b50667b71cd174b0beaadddceba2364 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Tue, 28 Aug 2018 23:50:55 +0000 Subject: [PATCH 019/123] added a check to make sure a situation where a defined configuration wouldn't be unused as per recommended by @maurer --- nixos/modules/services/monitoring/incron.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/modules/services/monitoring/incron.nix b/nixos/modules/services/monitoring/incron.nix index edba38140c6..c850bad881c 100644 --- a/nixos/modules/services/monitoring/incron.nix +++ b/nixos/modules/services/monitoring/incron.nix @@ -59,6 +59,12 @@ in config = mkIf cfg.enable { + assertions = [ + { assertion = cfg.allow != null -> cfg.deny == null; + message = "If `services.incron.allow` is set then `services.incron.deny` will be ignored."; + } + ]; + environment.systemPackages = [ pkgs.incron ]; security.wrappers.incrontab.source = "${pkgs.incron}/bin/incrontab"; From d9943e6bba6c325c8d7bf11f4c91ad00f861e566 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Wed, 29 Aug 2018 00:43:28 +0000 Subject: [PATCH 020/123] added option to specify which packages are available to the system incrontab recommendation by @jtojnar and @maurer --- nixos/modules/services/monitoring/incron.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/monitoring/incron.nix b/nixos/modules/services/monitoring/incron.nix index c850bad881c..b366597fb2b 100644 --- a/nixos/modules/services/monitoring/incron.nix +++ b/nixos/modules/services/monitoring/incron.nix @@ -53,6 +53,13 @@ in ''; }; + extraPackages = mkOption { + type = types.listOf types.package; + default = []; + example = "[ pkgs.rsync ];"; + description = "Extra packages available to the system incrontab."; + }; + }; }; @@ -84,7 +91,7 @@ in systemd.services.incron = { description = "File system events scheduler"; wantedBy = [ "multi-user.target" ]; - path = [ config.system.path ]; + path = cfg.extraPackages; preStart = "mkdir -m 710 -p /var/spool/incron"; serviceConfig.Type = "forking"; serviceConfig.PIDFile = "/run/incrond.pid"; From b5a6e6cf010a53dd6a761c08ad08815f295bb32a Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 12:36:21 +0000 Subject: [PATCH 021/123] unison: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index da150ae19ca..92ea89a043a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18898,7 +18898,7 @@ with pkgs; unigine-valley = callPackage ../applications/graphics/unigine-valley { }; - inherit (ocamlPackages) unison; + inherit (ocaml-ng.ocamlPackages_4_05) unison; unpaper = callPackage ../tools/graphics/unpaper { }; From 28ee1ae69d17eb61131e29f6a7d497cf4c2c70a4 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 12:43:13 +0000 Subject: [PATCH 022/123] libbap: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 92ea89a043a..597b2df2123 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10095,7 +10095,7 @@ with pkgs; libb2 = callPackage ../development/libraries/libb2 { }; libbap = callPackage ../development/libraries/libbap { - inherit (ocamlPackages) bap ocaml findlib ctypes; + inherit (ocaml-ng.ocamlPackages_4_05) bap ocaml findlib ctypes; }; libbass = (callPackage ../development/libraries/audio/libbass { }).bass; From c81d4f800e1fdc041ec2c7f1e190cb192d088c0c Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 12:54:19 +0000 Subject: [PATCH 023/123] acgtk: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 597b2df2123..432746a6091 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20835,7 +20835,9 @@ with pkgs; abella = callPackage ../applications/science/logic/abella {}; - acgtk = callPackage ../applications/science/logic/acgtk { }; + acgtk = callPackage ../applications/science/logic/acgtk { + ocamlPackages = ocaml-ng.ocamlPackages_4_05; + }; alt-ergo = callPackage ../applications/science/logic/alt-ergo { }; From 18b3b676894f531b49471a93da39cdf9d1940a73 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 12:58:31 +0000 Subject: [PATCH 024/123] alt-ergo: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 432746a6091..f54734844a2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20839,7 +20839,9 @@ with pkgs; ocamlPackages = ocaml-ng.ocamlPackages_4_05; }; - alt-ergo = callPackage ../applications/science/logic/alt-ergo { }; + alt-ergo = callPackage ../applications/science/logic/alt-ergo { + ocamlPackages = ocaml-ng.ocamlPackages_4_05; + }; aspino = callPackage ../applications/science/logic/aspino {}; From 124639bd8f244b2aba905e72e1fc28ed610832f1 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 18:36:25 +0000 Subject: [PATCH 025/123] jackline: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f54734844a2..f9a49dddb7d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16844,7 +16844,9 @@ with pkgs; extra-packages = [ csound ]; }; - jackline = callPackage ../applications/networking/instant-messengers/jackline { }; + jackline = callPackage ../applications/networking/instant-messengers/jackline { + ocamlPackages = ocaml-ng.ocamlPackages_4_05; + }; slack = callPackage ../applications/networking/instant-messengers/slack { }; From 65f42595cfa161c874720ed39dbd47d604c0f8b0 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 19:10:18 +0000 Subject: [PATCH 026/123] sapic: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f9a49dddb7d..097c1b2b41b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20964,7 +20964,9 @@ with pkgs; proverif = callPackage ../applications/science/logic/proverif { }; - sapic = callPackage ../applications/science/logic/sapic { }; + sapic = callPackage ../applications/science/logic/sapic { + inherit (ocaml-ng.ocamlPackages_4_05) ocaml; + }; satallax = callPackage ../applications/science/logic/satallax { ocaml = ocaml-ng.ocamlPackages_4_01_0.ocaml; From be6769816d0cb05709b10969bf29fe19ad1e72cb Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 19:17:10 +0000 Subject: [PATCH 027/123] statverif: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 097c1b2b41b..22e6e45af0a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20978,7 +20978,9 @@ with pkgs; stdenv = gccStdenv; }; - statverif = callPackage ../applications/science/logic/statverif { }; + statverif = callPackage ../applications/science/logic/statverif { + inherit (ocaml-ng.ocamlPackages_4_05) ocaml; + }; tptp = callPackage ../applications/science/logic/tptp {}; From 8cdb0c3cbdab5769db25098954fd0806fb6d0939 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 19:45:15 +0000 Subject: [PATCH 028/123] opam: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 22e6e45af0a..cae82e79cef 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7113,7 +7113,9 @@ with pkgs; opaline = callPackage ../development/tools/ocaml/opaline { }; - opam = callPackage ../development/tools/ocaml/opam { }; + opam = callPackage ../development/tools/ocaml/opam { + inherit (ocaml-ng.ocamlPackages_4_05) ocaml; + }; picat = callPackage ../development/compilers/picat { stdenv = overrideCC stdenv gcc49; From 9b76bf991f19fdba247a8ecfcf57ca01ddd0971a Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 21:22:24 +0000 Subject: [PATCH 029/123] coq_8_5: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- pkgs/top-level/coq-packages.nix | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cae82e79cef..519f695c039 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20855,7 +20855,9 @@ with pkgs; inherit (callPackage ./coq-packages.nix { inherit (ocaml-ng) ocamlPackages_3_12_1 - ocamlPackages_4_02; + ocamlPackages_4_02 + ocamlPackages_4_05 + ; }) mkCoqPackages coq_8_3 coq_8_4 coq_8_5 coq_8_6 coq_8_7 coq_8_8 coqPackages_8_5 coqPackages_8_6 coqPackages_8_7 coqPackages_8_8 diff --git a/pkgs/top-level/coq-packages.nix b/pkgs/top-level/coq-packages.nix index 5f784e64534..907c2eb0e27 100644 --- a/pkgs/top-level/coq-packages.nix +++ b/pkgs/top-level/coq-packages.nix @@ -2,6 +2,7 @@ , gnumake3 , ocamlPackages_3_12_1 , ocamlPackages_4_02 +, ocamlPackages_4_05 }: let @@ -65,6 +66,7 @@ in rec { camlp5 = ocamlPackages_4_02.camlp5_transitional; }; coq_8_5 = callPackage ../applications/science/logic/coq { + ocamlPackages = ocamlPackages_4_05; version = "8.5pl3"; }; coq_8_6 = callPackage ../applications/science/logic/coq { From 271af919e352c1a0d301fd364e1b5482701aff96 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 21:29:54 +0000 Subject: [PATCH 030/123] coccinelle: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 519f695c039..2d7672b77f6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8089,7 +8089,9 @@ with pkgs; # Does not actually depend on Qt 5 inherit (kdeFrameworks) extra-cmake-modules kapidox kdoctools; - coccinelle = callPackage ../development/tools/misc/coccinelle { }; + coccinelle = callPackage ../development/tools/misc/coccinelle { + ocamlPackages = ocaml-ng.ocamlPackages_4_05; + }; cpptest = callPackage ../development/libraries/cpptest { }; From 9edd1875bc07fae5d5ac7e5beb0d4d26b8ad191f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 21:33:13 +0000 Subject: [PATCH 031/123] coq_8_6: use OCaml 4.05 --- pkgs/top-level/coq-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/coq-packages.nix b/pkgs/top-level/coq-packages.nix index 907c2eb0e27..818f896048b 100644 --- a/pkgs/top-level/coq-packages.nix +++ b/pkgs/top-level/coq-packages.nix @@ -70,6 +70,7 @@ in rec { version = "8.5pl3"; }; coq_8_6 = callPackage ../applications/science/logic/coq { + ocamlPackages = ocamlPackages_4_05; version = "8.6.1"; }; coq_8_7 = callPackage ../applications/science/logic/coq { From 4d26e2a31238682932cc2c756dee56968738d181 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 21:41:24 +0000 Subject: [PATCH 032/123] mldonkey: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2d7672b77f6..3ecbf984b52 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17454,7 +17454,9 @@ with pkgs; mjpg-streamer = callPackage ../applications/video/mjpg-streamer { }; - mldonkey = callPackage ../applications/networking/p2p/mldonkey { }; + mldonkey = callPackage ../applications/networking/p2p/mldonkey { + ocamlPackages = ocaml-ng.ocamlPackages_4_05; + }; MMA = callPackage ../applications/audio/MMA { }; From 7211ee1aeb45f19b0edcd33326f3600e3da4e6af Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 22:13:27 +0000 Subject: [PATCH 033/123] haxe: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3ecbf984b52..0da9fc4e15d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6716,7 +6716,7 @@ with pkgs; graphviz = graphviz-nox; }); - inherit (ocamlPackages.haxe) haxe_3_2 haxe_3_4; + inherit (ocaml-ng.ocamlPackages_4_05.haxe) haxe_3_2 haxe_3_4; haxe = haxe_3_4; haxePackages = recurseIntoAttrs (callPackage ./haxe-packages.nix { }); inherit (haxePackages) hxcpp; From 4d8c0d75b35cc0bc127f5a139ec70b37eff06c5d Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 22:39:30 +0000 Subject: [PATCH 034/123] cubicle: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0da9fc4e15d..dded6609426 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20876,7 +20876,9 @@ with pkgs; caprice32 = callPackage ../misc/emulators/caprice32 { }; - cubicle = callPackage ../applications/science/logic/cubicle { }; + cubicle = callPackage ../applications/science/logic/cubicle { + ocamlPackages = ocaml-ng.ocamlPackages_4_05; + }; cvc3 = callPackage ../applications/science/logic/cvc3 { gmp = lib.overrideDerivation gmp (a: { dontDisableStatic = true; }); From 6a220840afdaf2b316ded71e54e51ac7e8a70b81 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 27 Aug 2018 08:03:51 +0000 Subject: [PATCH 035/123] xen_4_8: use OCaml 4.05 --- pkgs/applications/virtualization/xen/4.8.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/xen/4.8.nix b/pkgs/applications/virtualization/xen/4.8.nix index f99cdb69d2a..2a59cd1f061 100644 --- a/pkgs/applications/virtualization/xen/4.8.nix +++ b/pkgs/applications/virtualization/xen/4.8.nix @@ -1,4 +1,5 @@ { stdenv, callPackage, fetchurl, fetchpatch, fetchgit +, ocaml-ng , withInternalQemu ? true , withInternalTraditionalQemu ? true , withInternalSeabios ? true @@ -181,4 +182,4 @@ callPackage (import ./generic.nix (rec { else throw "this xen has no qemu builtin"; }; -})) args +})) ({ ocamlPackages = ocaml-ng.ocamlPackages_4_05; } // args) From 5670f77a90650d7a224d12e89144741f696b1fb7 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 28 Aug 2018 04:52:28 +0000 Subject: [PATCH 036/123] obliv-c: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dded6609426..6b7b8d3b260 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7088,7 +7088,9 @@ with pkgs; nvidia_cg_toolkit = callPackage ../development/compilers/nvidia-cg-toolkit { }; - obliv-c = callPackage ../development/compilers/obliv-c {}; + obliv-c = callPackage ../development/compilers/obliv-c { + ocamlPackages = ocaml-ng.ocamlPackages_4_05; + }; ocaml-ng = callPackage ./ocaml-packages.nix { }; ocaml = ocamlPackages.ocaml; From 8a23558db1ec96452eed6bd78813bd7084a68ee7 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 28 Aug 2018 05:09:44 +0000 Subject: [PATCH 037/123] xen_4_10: use OCaml 4.05 --- pkgs/applications/virtualization/xen/4.10.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/xen/4.10.nix b/pkgs/applications/virtualization/xen/4.10.nix index 5e21f7ee608..f3055fc79c3 100644 --- a/pkgs/applications/virtualization/xen/4.10.nix +++ b/pkgs/applications/virtualization/xen/4.10.nix @@ -1,4 +1,5 @@ { stdenv, callPackage, fetchurl, fetchpatch, fetchgit +, ocaml-ng , withInternalQemu ? true , withInternalTraditionalQemu ? true , withInternalSeabios ? true @@ -177,4 +178,4 @@ callPackage (import ./generic.nix (rec { else throw "this xen has no qemu builtin"; }; -})) args +})) ({ ocamlPackages = ocaml-ng.ocamlPackages_4_05; } // args) From f661b0dbf69719ac143dce0c4a2ec234a0cb4148 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 29 Aug 2018 12:29:01 +0000 Subject: [PATCH 038/123] tlaps: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6b7b8d3b260..4353b940136 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21023,7 +21023,9 @@ with pkgs; z3 = callPackage ../applications/science/logic/z3 { python = python2; }; tlaplus = callPackage ../applications/science/logic/tlaplus {}; - tlaps = callPackage ../applications/science/logic/tlaplus/tlaps.nix {}; + tlaps = callPackage ../applications/science/logic/tlaplus/tlaps.nix { + inherit (ocaml-ng.ocamlPackages_4_05) ocaml; + }; tlaplusToolbox = callPackage ../applications/science/logic/tlaplus/toolbox.nix {gtk = gtk2;}; aiger = callPackage ../applications/science/logic/aiger {}; From 6d38ada0ba0831f1d3aba5354ad9df15ffd22296 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 29 Aug 2018 12:31:35 +0000 Subject: [PATCH 039/123] wyrd: use OCaml 4.05 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4353b940136..98ed8a046d9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6050,7 +6050,9 @@ with pkgs; wv2 = callPackage ../tools/misc/wv2 { }; - wyrd = callPackage ../tools/misc/wyrd { }; + wyrd = callPackage ../tools/misc/wyrd { + ocamlPackages = ocaml-ng.ocamlPackages_4_05; + }; x86info = callPackage ../os-specific/linux/x86info { }; From 15a568cfe67abf19f2443163ef50bdf38f70937b Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 13:15:58 +0000 Subject: [PATCH 040/123] =?UTF-8?q?ocamlPackages.bin=5Fprot=5Fp4:=20disabl?= =?UTF-8?q?e=20for=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/bin_prot/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/bin_prot/default.nix b/pkgs/development/ocaml-modules/bin_prot/default.nix index 1acb17a8f7a..bc075295cf3 100644 --- a/pkgs/development/ocaml-modules/bin_prot/default.nix +++ b/pkgs/development/ocaml-modules/bin_prot/default.nix @@ -1,4 +1,8 @@ -{stdenv, buildOcaml, fetchurl, type_conv}: +{ stdenv, buildOcaml, fetchurl, ocaml, type_conv }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "bin_prot-112.24.00 is not available for OCaml ${ocaml.version}" +else buildOcaml rec { name = "bin_prot"; From c2b86bc5bbde88b94f658a56f69bf92460251616 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 13:20:43 +0000 Subject: [PATCH 041/123] =?UTF-8?q?ocamlPackages.fieldslib=5Fp4:=20disable?= =?UTF-8?q?=20for=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/fieldslib/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/fieldslib/default.nix b/pkgs/development/ocaml-modules/fieldslib/default.nix index 6a8db9e6281..36c1342e61f 100644 --- a/pkgs/development/ocaml-modules/fieldslib/default.nix +++ b/pkgs/development/ocaml-modules/fieldslib/default.nix @@ -2,6 +2,10 @@ assert stdenv.lib.versionOlder "4.00" (stdenv.lib.getVersion ocaml); +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "fieldslib-109.20.03 is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation { name = "ocaml-fieldslib-109.20.03"; From f7c617e34d6a39d1b5e7664d3dc15bd029d26cd0 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 13:23:32 +0000 Subject: [PATCH 042/123] =?UTF-8?q?ocamlPackages.enumerate:=20disable=20fo?= =?UTF-8?q?r=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/enumerate/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/enumerate/default.nix b/pkgs/development/ocaml-modules/enumerate/default.nix index 557f2f88d8d..4f0c182726d 100644 --- a/pkgs/development/ocaml-modules/enumerate/default.nix +++ b/pkgs/development/ocaml-modules/enumerate/default.nix @@ -2,6 +2,10 @@ assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.00"; +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "enumerate-111.08.00 is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation { name = "ocaml-enumerate-111.08.00"; From a04f3afc3c4f512a1ae8a44901493757ff09b4ce Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 13:26:56 +0000 Subject: [PATCH 043/123] =?UTF-8?q?ocamlPackages.faillib:=20disable=20for?= =?UTF-8?q?=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/faillib/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/faillib/default.nix b/pkgs/development/ocaml-modules/faillib/default.nix index 98acc8032e3..9b80433b6d1 100644 --- a/pkgs/development/ocaml-modules/faillib/default.nix +++ b/pkgs/development/ocaml-modules/faillib/default.nix @@ -1,4 +1,8 @@ -{stdenv, buildOcaml, fetchurl, herelib, camlp4}: +{ stdenv, buildOcaml, fetchurl, ocaml, herelib, camlp4 }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "faillib-111.17.00 is not available for OCaml ${ocaml.version}" +else buildOcaml rec { minimumSupportedOcamlVersion = "4.00"; From efbc322c9fb4bc9f35ad8b8c12f5dfa406a57188 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 13:30:36 +0000 Subject: [PATCH 044/123] =?UTF-8?q?ocamlPackages.variantslib=5Fp4:=20disab?= =?UTF-8?q?le=20for=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/variantslib/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/variantslib/default.nix b/pkgs/development/ocaml-modules/variantslib/default.nix index cb25b844606..425383a6485 100644 --- a/pkgs/development/ocaml-modules/variantslib/default.nix +++ b/pkgs/development/ocaml-modules/variantslib/default.nix @@ -1,4 +1,8 @@ -{stdenv, buildOcaml, fetchurl, type_conv}: +{ stdenv, buildOcaml, ocaml, fetchurl, type_conv }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "variantslib-109.15.03 is not available for OCaml ${ocaml.version}" +else buildOcaml rec { name = "variantslib"; From 09821d23ba3fe37a26d30592e6833de336581212 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 13:35:54 +0000 Subject: [PATCH 045/123] =?UTF-8?q?ocamlPackages.bolt:=20disable=20for=20O?= =?UTF-8?q?Caml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/bolt/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/bolt/default.nix b/pkgs/development/ocaml-modules/bolt/default.nix index 121f484ce41..b5a4f179b17 100644 --- a/pkgs/development/ocaml-modules/bolt/default.nix +++ b/pkgs/development/ocaml-modules/bolt/default.nix @@ -5,6 +5,10 @@ let inherit (stdenv.lib) getVersion versionAtLeast; in assert versionAtLeast (getVersion ocaml) "4.00.0"; assert versionAtLeast (getVersion findlib) "1.3.3"; +if versionAtLeast ocaml.version "4.06" +then throw "bolt is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation rec { name = "bolt-1.4"; From 354dedfec3691f5504429bcb876a8b8e4e007323 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 13:40:03 +0000 Subject: [PATCH 046/123] =?UTF-8?q?ocamlPackages.camlimages=5F4=5F1:=20dis?= =?UTF-8?q?able=20for=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/camlimages/4.1.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/camlimages/4.1.nix b/pkgs/development/ocaml-modules/camlimages/4.1.nix index 77a252de52f..31b4047efc8 100644 --- a/pkgs/development/ocaml-modules/camlimages/4.1.nix +++ b/pkgs/development/ocaml-modules/camlimages/4.1.nix @@ -2,6 +2,10 @@ assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.00"; +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "camlimages-4.1.2 is not available for OCaml ${ocaml.version}" +else + let pname = "camlimages"; version = "4.1.2"; From 6a9831940d364b8bed5eac6148b5cf0fddfddf27 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 13:43:01 +0000 Subject: [PATCH 047/123] =?UTF-8?q?ocamlPackages.dypgen:=20disable=20for?= =?UTF-8?q?=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/dypgen/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/dypgen/default.nix b/pkgs/development/ocaml-modules/dypgen/default.nix index 1bdcae521dd..1abf387bdd3 100644 --- a/pkgs/development/ocaml-modules/dypgen/default.nix +++ b/pkgs/development/ocaml-modules/dypgen/default.nix @@ -4,6 +4,10 @@ let pname = "dypgen"; in +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "${pname} is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation rec { name = "${pname}-${version}"; version = "20120619-1"; From 23fd7e452fd0759bbbc9d01940a8b7de261fe99f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 13:45:30 +0000 Subject: [PATCH 048/123] =?UTF-8?q?ocamlPackages.frontc:=20disable=20for?= =?UTF-8?q?=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/frontc/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/frontc/default.nix b/pkgs/development/ocaml-modules/frontc/default.nix index ecf1ddc8fba..e5330789e26 100644 --- a/pkgs/development/ocaml-modules/frontc/default.nix +++ b/pkgs/development/ocaml-modules/frontc/default.nix @@ -1,4 +1,8 @@ -{lib, buildOcaml, fetchurl}: +{ lib, buildOcaml, fetchurl, ocaml }: + +if lib.versionAtLeast ocaml.version "4.06" +then throw "FrontC is not available for OCaml ${ocaml.version}" +else buildOcaml rec { name = "FrontC"; From 78b8fc7a757aa30db59a0b41c2a1fcfa47ea2e28 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 13:53:38 +0000 Subject: [PATCH 049/123] =?UTF-8?q?ocamlPackages.gtktop:=20disable=20for?= =?UTF-8?q?=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/gtktop/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/gtktop/default.nix b/pkgs/development/ocaml-modules/gtktop/default.nix index de0334c2a18..07420693005 100644 --- a/pkgs/development/ocaml-modules/gtktop/default.nix +++ b/pkgs/development/ocaml-modules/gtktop/default.nix @@ -2,6 +2,10 @@ let pname = "gtktop-2.0"; in +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "${pname} is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation { name = "ocaml-${pname}"; From 4f7c4e70e4007b270247de66a73f4ba9a9f3c995 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 14:14:54 +0000 Subject: [PATCH 050/123] =?UTF-8?q?ocamlPackages.lwt2:=20disable=20for=20O?= =?UTF-8?q?Caml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/lwt/legacy.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/ocaml-modules/lwt/legacy.nix b/pkgs/development/ocaml-modules/lwt/legacy.nix index 53ba904f628..cd40a5051be 100644 --- a/pkgs/development/ocaml-modules/lwt/legacy.nix +++ b/pkgs/development/ocaml-modules/lwt/legacy.nix @@ -6,6 +6,7 @@ }: if !stdenv.lib.versionAtLeast ocaml.version "4" + || stdenv.lib.versionAtLeast ocaml.version "4.06" then throw "lwt is not available for OCaml ${ocaml.version}" else From 84e3cece288368029b028b39c41a69024d1f774e Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 14:24:41 +0000 Subject: [PATCH 051/123] =?UTF-8?q?ocamlPackages.ulex08:=20disable=20for?= =?UTF-8?q?=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/ulex/0.8/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/ulex/0.8/default.nix b/pkgs/development/ocaml-modules/ulex/0.8/default.nix index 288e9a6933e..6c0cf9214f2 100644 --- a/pkgs/development/ocaml-modules/ulex/0.8/default.nix +++ b/pkgs/development/ocaml-modules/ulex/0.8/default.nix @@ -4,6 +4,10 @@ let pname = "ulex"; in +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "ulex-0.8 is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation rec { name = "${pname}-${version}"; version = "0.8"; From 06cd948ba305db25b02149061cb0b6bc52d3992e Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 16:02:42 +0000 Subject: [PATCH 052/123] =?UTF-8?q?ocamlPackages.sqlite3EZ:=20disable=20fo?= =?UTF-8?q?r=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/sqlite3EZ/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/sqlite3EZ/default.nix b/pkgs/development/ocaml-modules/sqlite3EZ/default.nix index ef9c254aba1..e8f248ee4a1 100644 --- a/pkgs/development/ocaml-modules/sqlite3EZ/default.nix +++ b/pkgs/development/ocaml-modules/sqlite3EZ/default.nix @@ -2,6 +2,10 @@ assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12"; +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "sqlite3EZ is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation { name = "ocaml-sqlite3EZ-0.1.0"; From ea276e21cf4d1b83e3169f2bab2e8361a78e3e1e Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 16:17:57 +0000 Subject: [PATCH 053/123] =?UTF-8?q?ocamlPackages.pa=5Founit:=20disable=20f?= =?UTF-8?q?or=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/pa_ounit/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/pa_ounit/default.nix b/pkgs/development/ocaml-modules/pa_ounit/default.nix index fa4ecfcc28b..2471c855cf5 100644 --- a/pkgs/development/ocaml-modules/pa_ounit/default.nix +++ b/pkgs/development/ocaml-modules/pa_ounit/default.nix @@ -1,4 +1,8 @@ -{stdenv, buildOcaml, fetchurl, ounit}: +{ stdenv, buildOcaml, ocaml, fetchurl, ounit }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "pa_ounit is not available for OCaml ${ocaml.version}" +else buildOcaml rec { name = "pa_ounit"; From 450e35804025d9e26fbd142a653741bcc89f36fa Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 16:32:48 +0000 Subject: [PATCH 054/123] =?UTF-8?q?ocamlPackages.omake=5Frc1:=20disable=20?= =?UTF-8?q?for=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix b/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix index 84365889638..4d7900de80d 100644 --- a/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix +++ b/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix @@ -4,6 +4,11 @@ let version = "0.9.8.6-0.rc1"; webpage = "http://omake.metaprl.org"; in + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "${pname}-${version} is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation { name = "${pname}-${version}"; From ebd62e2423a7c12083566086f2ffb697321cf858 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 17:34:09 +0000 Subject: [PATCH 055/123] =?UTF-8?q?ocamlPackages.ocaml=5Fcairo:=20disable?= =?UTF-8?q?=20for=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/ocaml-cairo/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/ocaml-cairo/default.nix b/pkgs/development/ocaml-modules/ocaml-cairo/default.nix index e1590bb0c9a..22215b8da0d 100644 --- a/pkgs/development/ocaml-modules/ocaml-cairo/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-cairo/default.nix @@ -4,6 +4,10 @@ let pname = "ocaml-cairo"; in +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "${pname} is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation rec { name = "${pname}-${version}"; version = "1.2.0"; From 3fb8dac658a4792f8735bfbc5801f476d3309e66 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 17:41:42 +0000 Subject: [PATCH 056/123] =?UTF-8?q?ocamlPackages.ocaml=5Fcryptgps:=20disab?= =?UTF-8?q?le=20for=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/cryptgps/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/cryptgps/default.nix b/pkgs/development/ocaml-modules/cryptgps/default.nix index cb85ebce501..f8eb80837a3 100644 --- a/pkgs/development/ocaml-modules/cryptgps/default.nix +++ b/pkgs/development/ocaml-modules/cryptgps/default.nix @@ -1,5 +1,9 @@ {stdenv, fetchurl, ocaml, findlib}: +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "cryptgps is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation rec { name = "ocaml-cryptgps-${version}"; version = "0.2.1"; From 0c3cf014e21ba3f9c1dbfb10c32ed773187fc859 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 18:11:23 +0000 Subject: [PATCH 057/123] =?UTF-8?q?ocamlPackages.ojquery:=20disable=20for?= =?UTF-8?q?=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/ojquery/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/ojquery/default.nix b/pkgs/development/ocaml-modules/ojquery/default.nix index 2d697a285fd..8cf5819c900 100644 --- a/pkgs/development/ocaml-modules/ojquery/default.nix +++ b/pkgs/development/ocaml-modules/ojquery/default.nix @@ -1,5 +1,9 @@ { stdenv, fetchgit, ocaml, findlib, ocamlbuild, js_of_ocaml, js_of_ocaml-camlp4, camlp4, lwt3, react }: +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "ojquery is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation rec { version = "0.1"; name = "ocaml-ojquery-${version}"; From 9590e46c05c33baadb6e7663707c0423fd6383ce Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 18:16:40 +0000 Subject: [PATCH 058/123] =?UTF-8?q?ocamlPackages.ocaml=5Fdata=5Fnotation:?= =?UTF-8?q?=20disable=20for=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/odn/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/odn/default.nix b/pkgs/development/ocaml-modules/odn/default.nix index f30fea2c419..a56a6140f8e 100644 --- a/pkgs/development/ocaml-modules/odn/default.nix +++ b/pkgs/development/ocaml-modules/odn/default.nix @@ -1,5 +1,9 @@ { stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, ounit, camlp4 }: +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "ocaml-data-notation is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation { name = "ocaml-data-notation-0.0.11"; From 24f47da9b35f1ad2410c3938c777207e1864de01 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 18:18:49 +0000 Subject: [PATCH 059/123] =?UTF-8?q?ocamlPackages.erm=5Fxml:=20disable=20fo?= =?UTF-8?q?r=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/erm_xml/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/erm_xml/default.nix b/pkgs/development/ocaml-modules/erm_xml/default.nix index ae264b657d8..c944752ff6b 100644 --- a/pkgs/development/ocaml-modules/erm_xml/default.nix +++ b/pkgs/development/ocaml-modules/erm_xml/default.nix @@ -1,5 +1,9 @@ { stdenv, fetchzip, ocaml, findlib, ocamlbuild }: +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "erm_xml is not available for OCaml ${ocaml.version}" +else + let version = "0.3"; in stdenv.mkDerivation { From e79e66cad13e116351cc8e339a27f92e4784ac84 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 18:35:50 +0000 Subject: [PATCH 060/123] =?UTF-8?q?ocamlPackages.magick:=20disable=20for?= =?UTF-8?q?=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/magick/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/magick/default.nix b/pkgs/development/ocaml-modules/magick/default.nix index 021962154bd..ca6ab458fff 100644 --- a/pkgs/development/ocaml-modules/magick/default.nix +++ b/pkgs/development/ocaml-modules/magick/default.nix @@ -1,5 +1,9 @@ { stdenv, fetchurl, which, pkgconfig, ocaml, findlib, imagemagick }: +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "magick is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation { name = "ocaml-magick-0.34"; src = fetchurl { From 8a62ad06c2ddb5af80028f78524ff16cd29bc327 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 18:52:09 +0000 Subject: [PATCH 061/123] =?UTF-8?q?ocamlPackages.cil:=20disable=20for=20OC?= =?UTF-8?q?aml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/cil/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/ocaml-modules/cil/default.nix b/pkgs/development/ocaml-modules/cil/default.nix index 0394266353c..5fbb141b6cc 100644 --- a/pkgs/development/ocaml-modules/cil/default.nix +++ b/pkgs/development/ocaml-modules/cil/default.nix @@ -1,4 +1,9 @@ { stdenv, fetchurl, perl, ocaml, findlib, ocamlbuild }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "cil is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation { name = "ocaml-cil-1.7.3"; src = fetchurl { From bdaec23d14de5c4b9c9a402baab1ade3c56c153f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 18:55:25 +0000 Subject: [PATCH 062/123] ocamlPackages.ocaml_extlib_maximal: remove at 1.7.5 --- pkgs/top-level/ocaml-packages.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 5787f84335b..c94e0d5fb20 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -610,9 +610,6 @@ let else null; ocaml_extlib = callPackage ../development/ocaml-modules/extlib { }; - ocaml_extlib_maximal = callPackage ../development/ocaml-modules/extlib { - minimal = false; - }; ocb-stubblr = callPackage ../development/ocaml-modules/ocb-stubblr { }; From e63e4c11cc25b2bd8f67eec138eb7f19f87695fe Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 19:20:23 +0000 Subject: [PATCH 063/123] =?UTF-8?q?ocamlPackages.mezzo:=20disable=20for=20?= =?UTF-8?q?OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/compilers/mezzo/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/compilers/mezzo/default.nix b/pkgs/development/compilers/mezzo/default.nix index 79dc479fae8..c0b53574713 100644 --- a/pkgs/development/compilers/mezzo/default.nix +++ b/pkgs/development/compilers/mezzo/default.nix @@ -1,5 +1,9 @@ { stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, yojson, ulex, pprint, fix, functory }: +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "mezzo is not available for OCaml ${ocaml.version}" +else + let check-ocaml-version = with stdenv.lib; versionAtLeast (getVersion ocaml); in From 20af031a2ffa3cbcaacf10f4668e74ecf1380095 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 29 Aug 2018 12:44:12 +0000 Subject: [PATCH 064/123] =?UTF-8?q?ocamlPackages.ocamlsdl:=20disable=20for?= =?UTF-8?q?=20OCaml=20=E2=89=A5=204.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/ocamlsdl/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/ocamlsdl/default.nix b/pkgs/development/ocaml-modules/ocamlsdl/default.nix index e8441cf6937..8cfe43a5d32 100644 --- a/pkgs/development/ocaml-modules/ocamlsdl/default.nix +++ b/pkgs/development/ocaml-modules/ocamlsdl/default.nix @@ -4,6 +4,10 @@ let pname = "ocamlsdl"; in +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "${pname} is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation rec { name = "${pname}-${version}"; version = "0.9.1"; From 474c0aa2218fa5b70eed8c43cd2f04d7dfba6c65 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 Aug 2018 12:34:43 +0000 Subject: [PATCH 065/123] ocamlPackages: default to 4.06 --- pkgs/top-level/all-packages.nix | 12 +++--------- pkgs/top-level/ocaml-packages.nix | 7 +------ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 98ed8a046d9..f599477fe58 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6735,13 +6735,9 @@ with pkgs; mono = mono46; }; - fstar = callPackage ../development/compilers/fstar { - ocamlPackages = ocaml-ng.ocamlPackages_4_06; - }; + fstar = callPackage ../development/compilers/fstar { }; - pyre = callPackage ../development/tools/pyre { - ocamlPackages = ocaml-ng.ocamlPackages_4_06; - }; + pyre = callPackage ../development/tools/pyre { }; dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix {}); @@ -21862,9 +21858,7 @@ with pkgs; sane-frontends = callPackage ../applications/graphics/sane/frontends.nix { }; - satysfi = callPackage ../tools/typesetting/satysfi { - ocamlPackages = ocaml-ng.ocamlPackages_4_06; - }; + satysfi = callPackage ../tools/typesetting/satysfi { }; sc-controller = pythonPackages.callPackage ../misc/drivers/sc-controller { inherit libusb1; # Shadow python.pkgs.libusb1. diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index c94e0d5fb20..459a7614304 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1072,10 +1072,5 @@ in rec ocamlPackages_latest = ocamlPackages_4_07; - ocamlPackages = - # OCaml 4.05 is broken on aarch64 - if system == "aarch64-linux" then - ocamlPackages_4_06 - else - ocamlPackages_4_05; + ocamlPackages = ocamlPackages_4_06; } From 1adcb8890a01e226200588fc83949548c3e5c701 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 30 Aug 2018 09:12:20 -0700 Subject: [PATCH 066/123] wallabag: 2.3.2 -> 2.3.3 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from wallabag --- pkgs/servers/web-apps/wallabag/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/web-apps/wallabag/default.nix b/pkgs/servers/web-apps/wallabag/default.nix index c0d5876a3a2..ed399f58bcf 100644 --- a/pkgs/servers/web-apps/wallabag/default.nix +++ b/pkgs/servers/web-apps/wallabag/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "wallabag-${version}"; - version = "2.3.2"; + version = "2.3.3"; # remember to rm -r var/cache/* after a rebuild or unexpected errors will occur src = fetchurl { url = "https://static.wallabag.org/releases/wallabag-release-${version}.tar.gz"; - sha256 = "17yczdvgl43j6wa7hksxi2b51afvyd56vdya6hbbv68iiba4jyh4"; + sha256 = "12q5daigqn4xqp9pyfzac881qm9ywrflm8sivhl3spczyh41gwpg"; }; outputs = [ "out" ]; From c62bb34f7a99963e574032bb0b27c71ce4a6fd7d Mon Sep 17 00:00:00 2001 From: Uli Baum Date: Wed, 29 Aug 2018 14:26:53 +0200 Subject: [PATCH 067/123] nfs-utils: 2.1.1 -> 2.3.2, integrate libnfsidmap - switch source to kernel.org - libnfsidmap 2.3.2 is built from the nfs-utils source, put it in nfs-utils.lib - split outputs - adapt sssd, the only other package using libnfsidmap --- .../libraries/libnfsidmap/default.nix | 26 ------------------- pkgs/os-specific/linux/nfs-utils/default.nix | 24 ++++++++++++----- pkgs/os-specific/linux/sssd/default.nix | 4 +-- pkgs/top-level/all-packages.nix | 2 -- 4 files changed, 20 insertions(+), 36 deletions(-) delete mode 100644 pkgs/development/libraries/libnfsidmap/default.nix diff --git a/pkgs/development/libraries/libnfsidmap/default.nix b/pkgs/development/libraries/libnfsidmap/default.nix deleted file mode 100644 index ce21cda4a5d..00000000000 --- a/pkgs/development/libraries/libnfsidmap/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ stdenv, fetchurl }: - -stdenv.mkDerivation rec { - name = "libnfsidmap-0.25"; - - src = fetchurl { - url = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/${name}.tar.gz"; - sha256 = "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"; - }; - - postPatch = '' - sed -i '1i#include ' cfg.h - ''; - - preConfigure = - '' - configureFlags="--with-pluginpath=$out/lib/libnfsidmap" - ''; - - meta = { - homepage = http://www.citi.umich.edu/projects/nfsv4/linux/; - description = "Library for holding mulitiple methods of mapping names to id's and visa versa, mainly for NFSv4"; - license = "BSD"; - platforms = stdenv.lib.platforms.unix; - }; -} diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index 359d1869084..fa5fabdb3c4 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, lib, pkgconfig, utillinux, libcap, libtirpc, libevent, libnfsidmap +{ stdenv, fetchurl, fetchpatch, lib, pkgconfig, utillinux, libcap, libtirpc, libevent , sqlite, kerberos, kmod, libuuid, keyutils, lvm2, systemd, coreutils, tcp_wrappers , buildEnv }: @@ -14,17 +14,21 @@ let in stdenv.mkDerivation rec { name = "nfs-utils-${version}"; - version = "2.1.1"; + version = "2.3.2"; src = fetchurl { - url = "mirror://sourceforge/nfs/${name}.tar.bz2"; - sha256 = "02dvxphndpm8vpqqnl0zvij97dq9vsq2a179pzrjcv2i91ll2a0a"; + url = "https://kernel.org/pub/linux/utils/nfs-utils/${version}/${name}.tar.xz"; + sha256 = "06av6cjf8h18dpaxh8cd1awsra75zf6s5sj5r2z5g7scbj051ziw"; }; + # libnfsidmap is built together with nfs-utils from the same source, + # put it in the "lib" output, and the headers in "dev" + outputs = [ "out" "dev" "lib" "man" ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ - libtirpc libcap libevent libnfsidmap sqlite lvm2 + libtirpc libcap libevent sqlite lvm2 libuuid keyutils kerberos tcp_wrappers ]; @@ -36,6 +40,9 @@ in stdenv.mkDerivation rec { "--with-krb5=${kerberosEnv}" "--with-systemd=$(out)/etc/systemd/system" "--enable-libmount-mount" + # need an absolute path to lib output here. + # TODO: use ${placeholder lib} when nix 1.1 is no longer supported + "--with-pluginpath=@lib@/lib/libnfsidmap" # this installs libnfsidmap ] ++ lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen"; @@ -68,6 +75,11 @@ in stdenv.mkDerivation rec { sed '1i#include ' -i support/nsm/rpc.c ''; + # TODO: remove when placeholders are allowed (see configureFlags) + postConfigure = '' + substituteInPlace support/include/config.h --replace '@lib@' "$lib" + ''; + makeFlags = [ "sbindir=$(out)/bin" "generator_dir=$(out)/etc/systemd/system-generators" @@ -99,7 +111,7 @@ in stdenv.mkDerivation rec { daemons. ''; - homepage = https://sourceforge.net/projects/nfs/; + homepage = https://linux-nfs.org/; license = licenses.gpl2; platforms = platforms.linux; maintainers = with maintainers; [ abbradar ]; diff --git a/pkgs/os-specific/linux/sssd/default.nix b/pkgs/os-specific/linux/sssd/default.nix index 0a55608af96..4224c4900db 100644 --- a/pkgs/os-specific/linux/sssd/default.nix +++ b/pkgs/os-specific/linux/sssd/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgs, glibc, augeas, dnsutils, c-ares, curl, - cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, libnfsidmap, doxygen, + cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, nfs-utils, doxygen, python, python3, pam, popt, talloc, tdb, tevent, pkgconfig, ldb, openldap, pcre, kerberos, cifs-utils, glib, keyutils, dbus, fakeroot, libxslt, libxml2, libuuid, ldap, systemd, nspr, check, cmocka, uid_wrapper, @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; buildInputs = [ augeas dnsutils c-ares curl cyrus_sasl ding-libs libnl libunistring nss - samba libnfsidmap doxygen python python3 popt + samba nfs-utils doxygen python python3 popt talloc tdb tevent pkgconfig ldb pam openldap pcre kerberos cifs-utils glib keyutils dbus fakeroot libxslt libxml2 libuuid ldap systemd nspr check cmocka uid_wrapper diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 798521ac6f2..5165ff5fc70 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10532,8 +10532,6 @@ with pkgs; libnfs = callPackage ../development/libraries/libnfs { }; - libnfsidmap = callPackage ../development/libraries/libnfsidmap { }; - libnice = callPackage ../development/libraries/libnice { }; libnsl = callPackage ../development/libraries/libnsl { }; From e0ca51c36741a4a14ebaf059d488d3cab3128cd9 Mon Sep 17 00:00:00 2001 From: Uli Baum Date: Thu, 30 Aug 2018 19:57:39 +0200 Subject: [PATCH 068/123] nixos/tests/nfs: fix nfs4 client mount path nfs4 exports from a virtual filesystem root, so the client mount path differs from nfs3 --- nixos/tests/nfs.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/tests/nfs.nix b/nixos/tests/nfs.nix index 1992f240e7b..0ef44f1a489 100644 --- a/nixos/tests/nfs.nix +++ b/nixos/tests/nfs.nix @@ -6,7 +6,8 @@ let { pkgs, ... }: { fileSystems = pkgs.lib.mkVMOverride [ { mountPoint = "/data"; - device = "server:/data"; + # nfs4 exports the export with fsid=0 as a virtual root directory + device = if (version == 4) then "server:/" else "server:/data"; fsType = "nfs"; options = [ "vers=${toString version}" ]; } From 43110d8af50ed3c1e1ed4f540a34499733c726a9 Mon Sep 17 00:00:00 2001 From: Tom Hall Date: Mon, 27 Aug 2018 14:05:25 +0100 Subject: [PATCH 069/123] opencolorio: refactor to use system lcms2 and tinyxml The version of LCMS bundled with opencolorio is too old to build on aarch64, simply because its config files date from before aarch64 was announced. However, it can use the system lcms2 if it is found. Also de-vendor tinyxml. In addition, the version had been bumped to 1.1.0, but 1.0.9 was still hard-coded in the fetch uri. Some changes were necessary for 1.1.0 to build. As the sources are fetched from github, use fetchFromGitHub instead of fetchurl. --- .../libraries/opencolorio/default.nix | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/opencolorio/default.nix b/pkgs/development/libraries/opencolorio/default.nix index 751d845f773..42c0de4d493 100644 --- a/pkgs/development/libraries/opencolorio/default.nix +++ b/pkgs/development/libraries/opencolorio/default.nix @@ -1,22 +1,39 @@ -{ stdenv, lib, fetchurl, cmake, unzip, boost }: +{ stdenv, lib, fetchFromGitHub, cmake, boost, pkgconfig, lcms2, tinyxml, git }: + +with lib; stdenv.mkDerivation rec { name = "opencolorio-${version}"; version = "1.1.0"; - src = fetchurl { - url = "https://github.com/imageworks/OpenColorIO/archive/v1.0.9.zip"; - sha256 = "1vi5pcgj7gv8fp6cdnhszwfh7lh38rl2rk4c5yzsvmgcb7xf48bx"; + src = fetchFromGitHub { + owner = "imageworks"; + repo = "OpenColorIO"; + rev = "v${version}"; + sha256 = "0cjsyn681xsg89lirlll5pqlsqg2vnk1278iiicmzjy2a2v8x7zq"; }; outputs = [ "bin" "out" "dev" ]; - buildInputs = [ cmake unzip ] ++ lib.optional stdenv.isDarwin boost; + # TODO: Investigate whether git can be dropped: It's only used to apply patches + nativeBuildInputs = [ cmake pkgconfig git ]; - cmakeFlags = lib.optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON"; + buildInputs = [ lcms2 tinyxml ] ++ optional stdenv.isDarwin boost; + + postPatch = '' + substituteInPlace src/core/CMakeLists.txt --replace "-Werror" "" + substituteInPlace src/pyglue/CMakeLists.txt --replace "-Werror" "" + ''; + + cmakeFlags = [ + "-DUSE_EXTERNAL_LCMS=ON" + "-DUSE_EXTERNAL_TINYXML=ON" + # External libyamlcpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517 + "-DUSE_EXTERNAL_YAML=OFF" + ] ++ optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON" + ++ optional (!stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isx86_64) "-DOCIO_USE_SSE=OFF"; postInstall = '' - rm $out/lib/*.a mkdir -p $bin/bin; mv $out/bin $bin/ ''; From 037d27ed00435d6962c4eb9275466ccc4d2fbe77 Mon Sep 17 00:00:00 2001 From: Uli Baum Date: Thu, 30 Aug 2018 20:11:40 +0200 Subject: [PATCH 070/123] nfs-utils: simplify code using placeholders --- pkgs/os-specific/linux/nfs-utils/default.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index fa5fabdb3c4..f67663b3106 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -38,11 +38,9 @@ in stdenv.mkDerivation rec { [ "--enable-gss" "--with-statedir=/var/lib/nfs" "--with-krb5=${kerberosEnv}" - "--with-systemd=$(out)/etc/systemd/system" + "--with-systemd=${placeholder "out"}/etc/systemd/system" "--enable-libmount-mount" - # need an absolute path to lib output here. - # TODO: use ${placeholder lib} when nix 1.1 is no longer supported - "--with-pluginpath=@lib@/lib/libnfsidmap" # this installs libnfsidmap + "--with-pluginpath=${placeholder "lib"}/lib/libnfsidmap" # this installs libnfsidmap ] ++ lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen"; @@ -75,11 +73,6 @@ in stdenv.mkDerivation rec { sed '1i#include ' -i support/nsm/rpc.c ''; - # TODO: remove when placeholders are allowed (see configureFlags) - postConfigure = '' - substituteInPlace support/include/config.h --replace '@lib@' "$lib" - ''; - makeFlags = [ "sbindir=$(out)/bin" "generator_dir=$(out)/etc/systemd/system-generators" From 19ff9f60e2331e4a7aa2db14c0a5b0641c564359 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 30 Aug 2018 12:04:57 -0700 Subject: [PATCH 071/123] pspg: 1.3.0 -> 1.4.2 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from pspg --- pkgs/tools/misc/pspg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/pspg/default.nix b/pkgs/tools/misc/pspg/default.nix index a1492259e8c..21d81507dee 100644 --- a/pkgs/tools/misc/pspg/default.nix +++ b/pkgs/tools/misc/pspg/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "pspg-${version}"; - version = "1.3.0"; + version = "1.4.2"; src = fetchFromGitHub { owner = "okbob"; repo = "pspg"; rev = "${version}"; - sha256 = "1m63bhhglrpc2g68i5bigrzlpvg98qs83jgvf2gsbc4gnx9hywk5"; + sha256 = "0hmx9p5pbydnf8sil4vqpmly5mq2rvcj8a33s9fvfisnxxsqz73v"; }; nativeBuildInputs = [ pkgconfig ]; From b78424c386e4cc82125b3e59eb3fec5d4c8ce7d6 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 30 Aug 2018 12:15:08 -0700 Subject: [PATCH 072/123] pulseeffects: 4.2.8 -> 4.3.1 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from pulseeffects --- pkgs/applications/audio/pulseeffects/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/pulseeffects/default.nix b/pkgs/applications/audio/pulseeffects/default.nix index 313f737cd42..11eea900423 100644 --- a/pkgs/applications/audio/pulseeffects/default.nix +++ b/pkgs/applications/audio/pulseeffects/default.nix @@ -43,13 +43,13 @@ let ]; in stdenv.mkDerivation rec { name = "pulseeffects-${version}"; - version = "4.2.8"; + version = "4.3.1"; src = fetchFromGitHub { owner = "wwmm"; repo = "pulseeffects"; rev = "v${version}"; - sha256 = "0ckl0640n6lhk0gcmnmwngajkf46rrd8bxfh7xy5sq6qmm01dhdd"; + sha256 = "0qx5fc0kbxxwf9g0y6kf9myzl20s4cn725byzppjnqlbp4fpzqk9"; }; nativeBuildInputs = [ From d6aabb1f9a06eae6a83bbd7e99b86b066cf91eca Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:26:04 +0200 Subject: [PATCH 073/123] jool: add license --- pkgs/os-specific/linux/jool/cli.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/jool/cli.nix b/pkgs/os-specific/linux/jool/cli.nix index 50f0398e134..d851a47924d 100644 --- a/pkgs/os-specific/linux/jool/cli.nix +++ b/pkgs/os-specific/linux/jool/cli.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation { homepage = https://www.jool.mx/; description = "Fairly compliant SIIT and Stateful NAT64 for Linux - CLI tools"; platforms = platforms.linux; + license = licenses.gpl2; maintainers = with maintainers; [ fpletz ]; }; } From a3f9340d930a42883cc9c90aa3f1e205f489a145 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:28:03 +0200 Subject: [PATCH 074/123] kmod: add license --- pkgs/os-specific/linux/kmod/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kmod/default.nix b/pkgs/os-specific/linux/kmod/default.nix index 142c176a15f..43d69ac9574 100644 --- a/pkgs/os-specific/linux/kmod/default.nix +++ b/pkgs/os-specific/linux/kmod/default.nix @@ -33,9 +33,10 @@ in stdenv.mkDerivation rec { ln -s bin $out/sbin ''; - meta = { + meta = with stdenv.lib; { homepage = https://www.kernel.org/pub/linux/utils/kernel/kmod/; description = "Tools for loading and managing Linux kernel modules"; - platforms = stdenv.lib.platforms.linux; + license = licenses.lgpl21; + platforms = platforms.linux; }; } From e0c319cee3e72ec0dd8408736cc05296ba8c7d0e Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:30:20 +0200 Subject: [PATCH 075/123] libatasmart: add license, update homepage --- pkgs/os-specific/linux/libatasmart/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/libatasmart/default.nix b/pkgs/os-specific/linux/libatasmart/default.nix index 81333ce790e..3c8c71bdde5 100644 --- a/pkgs/os-specific/linux/libatasmart/default.nix +++ b/pkgs/os-specific/linux/libatasmart/default.nix @@ -11,9 +11,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ udev ]; - meta = { - homepage = http://0pointer.de/public/; + meta = with stdenv.lib; { + homepage = http://0pointer.de/blog/projects/being-smart.html; description = "Library for querying ATA SMART status"; - platforms = stdenv.lib.platforms.linux; + license = licenses.lgpl21; + platforms = platforms.linux; }; } From bbb8d5c2503099b0f8fa750bab797fd65739e768 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:33:49 +0200 Subject: [PATCH 076/123] lksctp-tools: add license --- pkgs/os-specific/linux/lksctp-tools/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/lksctp-tools/default.nix b/pkgs/os-specific/linux/lksctp-tools/default.nix index f5f08a3e7c6..6c644c9482a 100644 --- a/pkgs/os-specific/linux/lksctp-tools/default.nix +++ b/pkgs/os-specific/linux/lksctp-tools/default.nix @@ -8,9 +8,10 @@ stdenv.mkDerivation rec { sha256 = "05da6c2v3acc18ndvmkrag6x5lf914b7s0xkkr6wkvrbvd621sqs"; }; - meta = { + meta = with stdenv.lib; { description = "Linux Kernel Stream Control Transmission Protocol Tools."; homepage = http://lksctp.sourceforge.net/; - platforms = stdenv.lib.platforms.linux; + license = with licenses; [ gpl2 lgpl21 ]; # library is lgpl21 + platforms = platforms.linux; }; } From c8ff1aeb7be1d2ee62a92c7c276e1734a51e10cc Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:35:57 +0200 Subject: [PATCH 077/123] lm-sensors: add license --- pkgs/os-specific/linux/lm-sensors/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/lm-sensors/default.nix b/pkgs/os-specific/linux/lm-sensors/default.nix index 25b868369ae..af52dc551dd 100644 --- a/pkgs/os-specific/linux/lm-sensors/default.nix +++ b/pkgs/os-specific/linux/lm-sensors/default.nix @@ -27,9 +27,10 @@ stdenv.mkDerivation rec { ${stdenv.lib.optionalString sensord "PROG_EXTRA=sensord"}) ''; - meta = { + meta = with stdenv.lib; { homepage = http://www.lm-sensors.org/; description = "Tools for reading hardware sensors"; - platforms = stdenv.lib.platforms.linux; + license = with licenses; [ gpl2 lgpl21 ]; + platforms = platforms.linux; }; } From c6eff806968494ea21ee4fbc8304562c6f6758bd Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:37:57 +0200 Subject: [PATCH 078/123] multipath-tools: add license --- pkgs/os-specific/linux/multipath-tools/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/multipath-tools/default.nix b/pkgs/os-specific/linux/multipath-tools/default.nix index a1b207ffea0..6488f98565a 100644 --- a/pkgs/os-specific/linux/multipath-tools/default.nix +++ b/pkgs/os-specific/linux/multipath-tools/default.nix @@ -31,9 +31,10 @@ stdenv.mkDerivation rec { "unitdir=$(out)/lib/systemd/system" ]; - meta = { + meta = with stdenv.lib; { description = "Tools for the Linux multipathing driver"; homepage = http://christophe.varoqui.free.fr/; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2; + platforms = platforms.linux; }; } From 7c10761149e42c68d7057448ec609946138738c2 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:40:20 +0200 Subject: [PATCH 079/123] pam_ccreds: add license --- pkgs/os-specific/linux/pam_ccreds/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/pam_ccreds/default.nix b/pkgs/os-specific/linux/pam_ccreds/default.nix index 6026ac1d41a..8293ac0a830 100644 --- a/pkgs/os-specific/linux/pam_ccreds/default.nix +++ b/pkgs/os-specific/linux/pam_ccreds/default.nix @@ -11,10 +11,12 @@ stdenv.mkDerivation { sed 's/-o root -g root//' -i Makefile.in ''; - buildInputs = [pam openssl db]; - meta = { + buildInputs = [ pam openssl db ]; + + meta = with stdenv.lib; { homepage = http://www.padl.com/OSS/pam_ccreds.html; description = "PAM module to locally authenticate using an enterprise identity when the network is unavailable"; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2; + platforms = platforms.linux; }; } From 11bb3c134f4be779f30f14137a49933704ce6b8a Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:42:32 +0200 Subject: [PATCH 080/123] pam_mount: add licenses --- pkgs/os-specific/linux/pam_mount/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/pam_mount/default.nix b/pkgs/os-specific/linux/pam_mount/default.nix index c38990bdf8f..29ed9375c2e 100644 --- a/pkgs/os-specific/linux/pam_mount/default.nix +++ b/pkgs/os-specific/linux/pam_mount/default.nix @@ -27,10 +27,11 @@ stdenv.mkDerivation rec { rm -r $out/nix ''; - meta = { + meta = with stdenv.lib; { homepage = http://pam-mount.sourceforge.net/; description = "PAM module to mount volumes for a user session"; - maintainers = [ stdenv.lib.maintainers.tstrobel ]; - platforms = stdenv.lib.platforms.linux; + maintainers = [ maintainers.tstrobel ]; + license = with licenses; [ gpl2 gpl3 lgpl21 lgpl3 ]; + platforms = platforms.linux; }; } From 74470d51c3875a6459ca66014ec7760998cdd79e Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:46:29 +0200 Subject: [PATCH 081/123] perf-tools: add license --- pkgs/os-specific/linux/perf-tools/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/perf-tools/default.nix b/pkgs/os-specific/linux/perf-tools/default.nix index 31f86965ee8..ee12251ae5e 100644 --- a/pkgs/os-specific/linux/perf-tools/default.nix +++ b/pkgs/os-specific/linux/perf-tools/default.nix @@ -34,10 +34,11 @@ stdenv.mkDerivation { mv $d/man $out/share/ ''; - meta = { - platforms = lib.platforms.linux; + meta = with stdenv.lib; { + platforms = platforms.linux; homepage = https://github.com/brendangregg/perf-tools; description = "Performance analysis tools based on Linux perf_events (aka perf) and ftrace"; - maintainers = [ lib.maintainers.eelco ]; + maintainers = [ maintainers.eelco ]; + license = licenses.gpl2; }; } From a5dd0609b3d4587cc3ccd2f071eaa0ef3cd01bf0 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:51:23 +0200 Subject: [PATCH 082/123] rfkill: add license --- pkgs/os-specific/linux/rfkill/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/rfkill/default.nix b/pkgs/os-specific/linux/rfkill/default.nix index 48be4fbc343..6b6bef29cc3 100644 --- a/pkgs/os-specific/linux/rfkill/default.nix +++ b/pkgs/os-specific/linux/rfkill/default.nix @@ -10,10 +10,11 @@ stdenv.mkDerivation rec { makeFlags = "PREFIX=$(out)"; - meta = { + meta = with stdenv.lib; { homepage = http://wireless.kernel.org/en/users/Documentation/rfkill; description = "A tool to query, enable and disable wireless devices"; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.eelco ]; + platforms = platforms.linux; + maintainers = [ maintainers.eelco ]; + license = licenses.isc; }; } From b67770e03354616893620561d2a8584b61582853 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:54:56 +0200 Subject: [PATCH 083/123] rtkit: add licenses --- pkgs/os-specific/linux/rtkit/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/rtkit/default.nix b/pkgs/os-specific/linux/rtkit/default.nix index 868dcc9a58e..059b0944961 100644 --- a/pkgs/os-specific/linux/rtkit/default.nix +++ b/pkgs/os-specific/linux/rtkit/default.nix @@ -35,9 +35,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ dbus libcap ]; - meta = { + meta = with stdenv.lib; { homepage = http://0pointer.de/blog/projects/rtkit; description = "A daemon that hands out real-time priority to processes"; - platforms = stdenv.lib.platforms.linux; + license = with licenses; [ gpl3 bsd0 ]; # lib is bsd license + platforms = platforms.linux; }; } From 4927ecbf2565f59510cd6740cd877eaf4cd47c35 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 21:57:21 +0200 Subject: [PATCH 084/123] udisks: add license --- pkgs/os-specific/linux/udisks/1-default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/udisks/1-default.nix b/pkgs/os-specific/linux/udisks/1-default.nix index bdc6a63f069..d48c21f6b52 100644 --- a/pkgs/os-specific/linux/udisks/1-default.nix +++ b/pkgs/os-specific/linux/udisks/1-default.nix @@ -35,9 +35,10 @@ stdenv.mkDerivation rec { configureFlags = [ "--localstatedir=/var" "--enable-lvm2" ]; - meta = { + meta = with stdenv.lib; { homepage = http://www.freedesktop.org/wiki/Software/udisks; description = "A daemon and command-line utility for querying and manipulating storage devices"; - platforms = stdenv.lib.platforms.linux; + platforms = platforms.linux; + license = with licenses; [ gpl2 lgpl2Plus ]; }; } From 85c3661c088492de8f6df7e089adc47b69de40ee Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 22:00:16 +0200 Subject: [PATCH 085/123] usbutils: add license --- pkgs/os-specific/linux/usbutils/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/usbutils/default.nix b/pkgs/os-specific/linux/usbutils/default.nix index adb2a0ee2fb..657d6cc24a8 100644 --- a/pkgs/os-specific/linux/usbutils/default.nix +++ b/pkgs/os-specific/linux/usbutils/default.nix @@ -17,9 +17,10 @@ stdenv.mkDerivation rec { --replace /usr/share/usb.ids ${hwdata}/data/hwdata/usb.ids ''; - meta = { + meta = with stdenv.lib; { homepage = http://www.linux-usb.org/; description = "Tools for working with USB devices, such as lsusb"; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2Plus; + platforms = platforms.linux; }; } From b3d114e6f9dfc63600c90a62be38f4e7a6fe1495 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 22:03:07 +0200 Subject: [PATCH 086/123] wpa_gui: add license + homepage --- pkgs/os-specific/linux/wpa_supplicant/gui.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/wpa_supplicant/gui.nix b/pkgs/os-specific/linux/wpa_supplicant/gui.nix index f4ef1b1498f..891de61c017 100644 --- a/pkgs/os-specific/linux/wpa_supplicant/gui.nix +++ b/pkgs/os-specific/linux/wpa_supplicant/gui.nix @@ -23,8 +23,10 @@ stdenv.mkDerivation { cp -av icons/hicolor $out/share/icons ''; - meta = { + meta = with stdenv.lib; { description = "Qt-based GUI for wpa_supplicant"; - platforms = stdenv.lib.platforms.linux; + homepage = http://hostap.epitest.fi/wpa_supplicant/; + license = licenses.bsd3; + platforms = platforms.linux; }; } From 5c9fbdfbfc702926766424364968974981464eb6 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 30 Aug 2018 22:06:52 +0200 Subject: [PATCH 087/123] bsd_fingerd: add license --- pkgs/servers/fingerd/bsd-fingerd/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/fingerd/bsd-fingerd/default.nix b/pkgs/servers/fingerd/bsd-fingerd/default.nix index f7f2f93cf99..d5671921aba 100644 --- a/pkgs/servers/fingerd/bsd-fingerd/default.nix +++ b/pkgs/servers/fingerd/bsd-fingerd/default.nix @@ -18,7 +18,8 @@ stdenv.mkDerivation rec { preInstall = '' mkdir -p $out/man/man8 $out/sbin ''; - meta = { - platforms = stdenv.lib.platforms.linux; + meta = with stdenv.lib; { + platforms = platforms.linux; + license = licenses.bsdOriginal; }; } From 1251b34b5bbcd11a7a2974df7bada5d6d47b985d Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 30 Aug 2018 22:33:56 +0200 Subject: [PATCH 088/123] nixos/nginx: ensure TLS OCSP stapling works out of the box with LE The recommended TLS configuration comes with `ssl_stapling on` and `ssl_stapling_verify on`. However, this last directive also requires the use of `ssl_trusted_certificate` to verify the received answer. When using `enableACME` or similar, we can help the user by providing the correct value for the directive. The result can be tested with: openssl s_client -connect web.example.com:443 -status 2> /dev/null Without OCSP stapling, we get: OCSP response: no response sent After this change, we get: OCSP Response Data: OCSP Response Status: successful (0x0) Response Type: Basic OCSP Response Version: 1 (0x0) Responder Id: C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3 Produced At: Aug 30 20:46:00 2018 GMT --- nixos/modules/services/web-servers/nginx/default.nix | 5 +++++ nixos/modules/services/web-servers/nginx/vhost-options.nix | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 17b169f7c69..b231ee5a3f0 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -16,9 +16,11 @@ let } // (optionalAttrs vhostConfig.enableACME { sslCertificate = "${acmeDirectory}/${serverName}/fullchain.pem"; sslCertificateKey = "${acmeDirectory}/${serverName}/key.pem"; + sslTrustedCertificate = "${acmeDirectory}/${serverName}/full.pem"; }) // (optionalAttrs (vhostConfig.useACMEHost != null) { sslCertificate = "${acmeDirectory}/${vhostConfig.useACMEHost}/fullchain.pem"; sslCertificateKey = "${acmeDirectory}/${vhostConfig.useACMEHost}/key.pem"; + sslTrustedCertificate = "${acmeDirectory}/${vhostConfig.useACMEHost}/full.pem"; }) ) cfg.virtualHosts; enableIPv6 = config.networking.enableIPv6; @@ -228,6 +230,9 @@ let ssl_certificate ${vhost.sslCertificate}; ssl_certificate_key ${vhost.sslCertificateKey}; ''} + ${optionalString (hasSSL && vhost.sslTrustedCertificate != null) '' + ssl_trusted_certificate ${vhost.sslTrustedCertificate}; + ''} ${optionalString (vhost.basicAuthFile != null || vhost.basicAuth != {}) '' auth_basic secured; diff --git a/nixos/modules/services/web-servers/nginx/vhost-options.nix b/nixos/modules/services/web-servers/nginx/vhost-options.nix index 1075b00768f..6954d932eed 100644 --- a/nixos/modules/services/web-servers/nginx/vhost-options.nix +++ b/nixos/modules/services/web-servers/nginx/vhost-options.nix @@ -129,6 +129,13 @@ with lib; description = "Path to server SSL certificate key."; }; + sslTrustedCertificate = mkOption { + type = types.path; + default = null; + example = "/var/root.cert"; + description = "Path to root SSL certificate for stapling and client certificates."; + }; + http2 = mkOption { type = types.bool; default = true; From 08148a746a47bd1a6888485226a5b55bb2754549 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 10 Jun 2018 20:30:12 +0100 Subject: [PATCH 089/123] nixos/usbguard: disable debug output --- nixos/modules/services/security/usbguard.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/security/usbguard.nix b/nixos/modules/services/security/usbguard.nix index 5d469cabe2c..48950fe4c22 100644 --- a/nixos/modules/services/security/usbguard.nix +++ b/nixos/modules/services/security/usbguard.nix @@ -192,7 +192,7 @@ in { serviceConfig = { Type = "simple"; - ExecStart = ''${pkgs.usbguard}/bin/usbguard-daemon -P -d -k -c ${daemonConfFile}''; + ExecStart = ''${pkgs.usbguard}/bin/usbguard-daemon -P -k -c ${daemonConfFile}''; Restart = "on-failure"; }; }; From 9b9ba8405bc9ba6965f82f7806b22c31f3514898 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 30 Aug 2018 21:50:43 +0100 Subject: [PATCH 090/123] nixos/usbguard: ensure the audit log file can be created Since version 0.7.3, usbguard-daemon won't start if the file cannot be opened. --- nixos/modules/services/security/usbguard.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/security/usbguard.nix b/nixos/modules/services/security/usbguard.nix index 48950fe4c22..88d2f69db57 100644 --- a/nixos/modules/services/security/usbguard.nix +++ b/nixos/modules/services/security/usbguard.nix @@ -188,7 +188,10 @@ in { wants = [ "systemd-udevd.service" "local-fs.target" ]; # make sure an empty rule file and required directories exist - preStart = ''mkdir -p $(dirname "${cfg.ruleFile}") "${cfg.IPCAccessControlFiles}" && ([ -f "${cfg.ruleFile}" ] || touch ${cfg.ruleFile})''; + preStart = '' + mkdir -p $(dirname "${cfg.ruleFile}") $(dirname "${cfg.auditFilePath}") "${cfg.IPCAccessControlFiles}" \ + && ([ -f "${cfg.ruleFile}" ] || touch ${cfg.ruleFile}) + ''; serviceConfig = { Type = "simple"; From 2c2f1e37d4374ea61caefd9389927ea03df4ce31 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 20 Aug 2018 15:11:29 -0400 Subject: [PATCH 091/123] reewide: Purge all uses `stdenv.system` and top-level `system` It is deprecated and will be removed after 18.09. --- doc/old/cross.txt | 2 +- nixos/lib/make-system-tarball.nix | 2 +- nixos/lib/qemu-flags.nix | 4 +-- .../installer/cd-dvd/installation-cd-base.nix | 2 +- .../installer/cd-dvd/sd-image-aarch64.nix | 3 +- .../cd-dvd/sd-image-armv7l-multiplatform.nix | 3 +- .../installer/cd-dvd/sd-image-raspberrypi.nix | 3 +- nixos/modules/installer/cd-dvd/sd-image.nix | 4 +-- nixos/modules/installer/netboot/netboot.nix | 2 +- nixos/modules/services/misc/gitit.nix | 2 +- nixos/modules/services/networking/vsftpd.nix | 2 +- nixos/modules/system/boot/luksroot.nix | 2 +- nixos/modules/virtualisation/azure-agent.nix | 2 +- .../virtualisation/brightbox-image.nix | 2 +- .../virtualisation/google-compute-image.nix | 2 +- .../virtualisation/virtualbox-guest.nix | 2 +- .../virtualisation/virtualbox-image.nix | 10 +++---- nixos/modules/virtualisation/vmware-guest.nix | 2 +- nixos/modules/virtualisation/xen-dom0.nix | 2 +- pkgs/applications/altcoins/mist.nix | 4 +-- pkgs/applications/audio/baudline/default.nix | 6 ++-- .../audio/google-musicmanager/default.nix | 2 +- pkgs/applications/audio/renoise/default.nix | 4 +-- .../applications/audio/transcribe/default.nix | 4 +-- .../editors/eclipse/build-eclipse.nix | 2 +- pkgs/applications/editors/eclipse/default.nix | 14 ++++----- .../applications/editors/jetbrains/common.nix | 2 +- .../editors/kodestudio/default.nix | 14 ++++----- .../editors/music/tuxguitar/default.nix | 4 +-- .../editors/sublime/2/default.nix | 2 +- .../applications/editors/sublime/3/common.nix | 4 +-- pkgs/applications/editors/typora/default.nix | 2 +- pkgs/applications/editors/vscode/default.nix | 12 ++++---- .../applications/graphics/ImageMagick/7.0.nix | 8 ++--- .../graphics/ImageMagick/default.nix | 8 ++--- .../applications/graphics/gcolor2/default.nix | 4 +-- .../sane/backends/brscan4/default.nix | 6 ++-- .../graphics/unigine-valley/default.nix | 6 ++-- pkgs/applications/misc/1password/default.nix | 6 ++-- .../misc/adobe-reader/default.nix | 2 +- pkgs/applications/misc/cura/lulzbot.nix | 6 ++-- .../applications/misc/googleearth/default.nix | 6 ++-- pkgs/applications/misc/icesl/default.nix | 4 +-- pkgs/applications/misc/kdbplus/default.nix | 2 +- pkgs/applications/misc/kiwix/default.nix | 2 +- .../applications/misc/playonlinux/default.nix | 8 ++--- pkgs/applications/misc/rescuetime/default.nix | 2 +- .../applications/misc/sweethome3d/default.nix | 2 +- .../applications/misc/sweethome3d/editors.nix | 2 +- pkgs/applications/misc/xmind/default.nix | 6 ++-- .../apache-directory-studio/default.nix | 6 ++-- .../networking/bittorrentsync/generic.nix | 6 ++-- .../browsers/firefox-bin/default.nix | 2 +- .../networking/browsers/firefox/wrapper.nix | 8 ++--- .../mozilla-plugins/flashplayer/default.nix | 6 ++-- .../google-talk-plugin/default.nix | 4 +-- .../mozilla-plugins/trezor/default.nix | 2 +- .../tor-browser-bundle-bin/default.nix | 2 +- .../networking/dropbox/default.nix | 4 +-- .../instant-messengers/franz/default.nix | 2 +- .../mattermost-desktop/default.nix | 6 ++-- .../instant-messengers/rambox/sencha/bare.nix | 2 +- .../skypeforlinux/default.nix | 4 +-- .../instant-messengers/slack/default.nix | 4 +-- .../wire-desktop/default.nix | 4 +-- .../instant-messengers/zoom-us/default.nix | 4 +-- .../networking/insync/default.nix | 4 +-- .../mailreaders/nylas-mail-bin/default.nix | 4 +-- .../mailreaders/thunderbird-bin/default.nix | 2 +- .../networking/p2p/frostwire/default.nix | 2 +- .../networking/p2p/soulseekqt/default.nix | 2 +- .../networking/remote/anydesk/default.nix | 4 +-- .../networking/resilio-sync/default.nix | 4 +-- .../networking/spideroak/default.nix | 18 +++++------ .../networking/super-productivity/default.nix | 4 +-- pkgs/applications/office/jameica/default.nix | 8 ++--- pkgs/applications/office/mendeley/default.nix | 4 +-- .../applications/office/moneyplex/default.nix | 4 +-- .../applications/office/wpsoffice/default.nix | 2 +- .../science/electronics/eagle/eagle7.nix | 6 ++-- .../science/logic/isabelle/default.nix | 2 +- .../science/logic/saw-tools/default.nix | 2 +- .../science/math/mathematica/10.nix | 4 +-- .../science/math/mathematica/9.nix | 4 +-- .../science/math/mathematica/default.nix | 2 +- .../science/math/scilab-bin/default.nix | 8 ++--- pkgs/applications/search/recoll/default.nix | 2 +- .../applications/video/lightworks/default.nix | 4 +-- pkgs/applications/video/mplayer/default.nix | 6 ++-- .../video/webtorrent_desktop/default.nix | 4 +-- .../virtualization/qemu/default.nix | 2 +- .../virtualbox/guest-additions/default.nix | 16 +++++----- .../window-managers/i3/default.nix | 4 +-- pkgs/build-support/build-fhs-userenv/env.nix | 4 +-- pkgs/build-support/release/nix-build.nix | 2 +- .../vm/windows/controller/default.nix | 2 +- .../vm/windows/cygwin-iso/default.nix | 2 +- .../arduino/arduino-core/default.nix | 18 ++++++----- pkgs/development/compilers/ccl/default.nix | 2 +- pkgs/development/compilers/clean/default.nix | 4 +-- pkgs/development/compilers/cmucl/binary.nix | 2 +- .../development/compilers/crystal/default.nix | 4 +-- pkgs/development/compilers/fpc/binary.nix | 6 ++-- pkgs/development/compilers/fpc/default.nix | 2 +- .../compilers/ghcjs-ng/default.nix | 2 +- pkgs/development/compilers/go/1.10.nix | 6 ++-- pkgs/development/compilers/go/1.11.nix | 10 +++---- pkgs/development/compilers/go/1.4.nix | 6 ++-- pkgs/development/compilers/go/1.9.nix | 6 ++-- .../compilers/jetbrains-jdk/default.nix | 4 +-- pkgs/development/compilers/julia/default.nix | 2 +- pkgs/development/compilers/mlton/default.nix | 6 ++-- pkgs/development/compilers/mozart/binary.nix | 2 +- .../compilers/nvidia-cg-toolkit/default.nix | 6 ++-- pkgs/development/compilers/opendylan/bin.nix | 6 ++-- .../compilers/opendylan/default.nix | 6 ++-- pkgs/development/compilers/openjdk/10.nix | 2 +- .../compilers/oraclejdk/jdk-linux-base.nix | 6 ++-- pkgs/development/compilers/orc/default.nix | 2 +- pkgs/development/compilers/picat/default.nix | 4 +-- pkgs/development/compilers/rust/bootstrap.nix | 14 ++++----- pkgs/development/compilers/sbcl/bootstrap.nix | 4 +-- pkgs/development/compilers/sbcl/default.nix | 2 +- .../development/interpreters/dart/default.nix | 2 +- .../interpreters/spidermonkey/1.8.5.nix | 2 +- pkgs/development/libraries/apr/default.nix | 2 +- .../libraries/audio/libbass/default.nix | 4 +-- pkgs/development/libraries/bootil/default.nix | 2 +- .../libraries/crypto++/default.nix | 7 +++-- pkgs/development/libraries/gpgme/default.nix | 5 +++- pkgs/development/libraries/gsl/default.nix | 2 +- .../libraries/java/jzmq/default.nix | 2 +- .../libraries/java/swt/default.nix | 2 +- .../libraries/libspotify/default.nix | 12 ++++---- .../development/libraries/live555/default.nix | 2 +- pkgs/development/libraries/mesa/default.nix | 2 +- pkgs/development/libraries/nettle/generic.nix | 4 +-- pkgs/development/libraries/opencv/3.x.nix | 6 ++-- .../oracle-instantclient/default.nix | 6 ++-- .../libraries/physics/geant4/fetch.nix | 2 +- .../science/math/openblas/default.nix | 6 ++-- .../development/libraries/scmccid/default.nix | 4 +-- .../development/libraries/skalibs/default.nix | 2 +- .../development/libraries/tachyon/default.nix | 18 +++++------ pkgs/development/libraries/v8/3.14.nix | 2 +- pkgs/development/libraries/vigra/default.nix | 2 +- pkgs/development/libraries/vxl/default.nix | 2 +- pkgs/development/libraries/wtk/default.nix | 2 +- pkgs/development/misc/amdapp-sdk/default.nix | 4 +-- .../mobile/androidenv/androidndk.nix | 4 +-- .../mobile/androidenv/androidndk_r8e.nix | 6 ++-- .../mobile/androidenv/androidsdk.nix | 18 +++++------ .../mobile/androidenv/build-tools.nix | 8 ++--- .../development/mobile/androidenv/default.nix | 6 ++-- .../mobile/androidenv/platform-tools.nix | 8 ++--- .../mobile/titaniumenv/build-app.nix | 2 +- .../mobile/titaniumenv/default.nix | 2 +- .../mobile/titaniumenv/titaniumsdk-6.3.nix | 12 ++++---- .../mobile/titaniumenv/titaniumsdk-7.1.nix | 10 +++---- .../development/node-packages/default-v10.nix | 5 ++-- pkgs/development/node-packages/default-v6.nix | 5 ++-- pkgs/development/node-packages/default-v8.nix | 5 ++-- .../ruby-modules/testing/stubs.nix | 2 +- .../tools/analysis/cov-build/default.nix | 2 +- .../tools/analysis/valgrind/default.nix | 2 +- pkgs/development/tools/electron/default.nix | 4 +-- .../tools/github/github-release/default.nix | 6 ++-- .../google-app-engine-go-sdk/default.nix | 2 +- pkgs/development/tools/misc/cflow/default.nix | 2 +- .../development/tools/misc/iozone/default.nix | 10 +++---- pkgs/development/tools/misc/kibana/5.x.nix | 4 +-- .../development/tools/misc/kibana/default.nix | 4 +-- pkgs/development/tools/misc/lsof/default.nix | 2 +- .../tools/misc/saleae-logic/default.nix | 4 +-- pkgs/development/tools/neoload/default.nix | 2 +- pkgs/development/tools/node-webkit/nw12.nix | 2 +- pkgs/development/tools/nwjs/default.nix | 2 +- pkgs/development/tools/phantomjs/default.nix | 4 +-- .../tools/sauce-connect/default.nix | 4 +-- .../tools/selenium/chromedriver/default.nix | 4 +-- pkgs/development/web/remarkjs/default.nix | 2 +- pkgs/games/andyetitmoves/default.nix | 8 ++--- pkgs/games/dwarf-fortress/dfhack/default.nix | 4 +-- pkgs/games/dwarf-fortress/game.nix | 6 ++-- pkgs/games/eduke32/default.nix | 2 +- pkgs/games/ezquake/default.nix | 4 +-- pkgs/games/factorio/default.nix | 2 +- pkgs/games/nethack/default.nix | 2 +- pkgs/games/oilrush/default.nix | 4 +-- pkgs/games/openarena/default.nix | 2 +- pkgs/games/racer/default.nix | 4 +-- pkgs/games/sdlmame/default.nix | 2 +- pkgs/games/steam/default.nix | 6 ++-- pkgs/games/ut2004/demo.nix | 4 +-- pkgs/games/vessel/default.nix | 2 +- pkgs/games/worldofgoo/default.nix | 2 +- pkgs/games/zandronum/fmod.nix | 2 +- pkgs/misc/base16-builder/default.nix | 2 +- .../cups/drivers/cnijfilter_4_00/default.nix | 6 ++-- pkgs/misc/cups/drivers/kyocera/default.nix | 6 ++-- pkgs/misc/cups/drivers/kyodialog3/default.nix | 6 ++-- pkgs/misc/cups/drivers/samsung/4.01.17.nix | 4 +-- pkgs/misc/cups/drivers/samsung/default.nix | 2 +- pkgs/misc/drivers/gutenprint/bin.nix | 2 +- pkgs/misc/drivers/hplip/3.16.11.nix | 6 ++-- pkgs/misc/drivers/hplip/default.nix | 6 ++-- pkgs/misc/emulators/retroarch/cores.nix | 4 +-- pkgs/misc/emulators/wine/default.nix | 4 +-- .../linux/alsa-plugins/wrapper.nix | 2 +- pkgs/os-specific/linux/amdgpu-pro/default.nix | 4 +-- .../os-specific/linux/ati-drivers/default.nix | 4 +-- .../linux/broadcom-sta/default.nix | 4 +-- .../os-specific/linux/displaylink/default.nix | 4 +-- pkgs/os-specific/linux/fusionio/util.nix | 2 +- pkgs/os-specific/linux/fusionio/vsl.nix | 2 +- .../linux/kernel/common-config.nix | 6 ++-- pkgs/os-specific/linux/kernel/linux-rpi.nix | 2 +- pkgs/os-specific/linux/nvidia-x11/generic.nix | 8 ++--- pkgs/os-specific/linux/prl-tools/default.nix | 4 +-- pkgs/stdenv/generic/make-derivation.nix | 2 +- pkgs/tools/X11/xwinwrap/default.nix | 6 ++-- pkgs/tools/admin/bluemix-cli/default.nix | 2 +- pkgs/tools/admin/google-cloud-sdk/default.nix | 2 +- pkgs/tools/archivers/gnutar/default.nix | 2 +- pkgs/tools/bootloaders/refind/default.nix | 2 +- pkgs/tools/compression/bzip2/default.nix | 2 +- pkgs/tools/filesystems/sshfs-fuse/default.nix | 2 +- pkgs/tools/graphics/pngout/default.nix | 10 +++---- pkgs/tools/misc/bandwidth/default.nix | 10 +++---- pkgs/tools/misc/execline/default.nix | 2 +- pkgs/tools/misc/grub/2.0x.nix | 12 ++++---- pkgs/tools/misc/grub/pvgrub_image/default.nix | 8 ++--- pkgs/tools/misc/grub/trusted.nix | 4 +-- pkgs/tools/misc/mongodb-compass/default.nix | 4 +-- pkgs/tools/misc/mprime/default.nix | 14 ++++----- pkgs/tools/misc/ocz-ssd-guru/default.nix | 2 +- pkgs/tools/misc/os-prober/default.nix | 2 +- pkgs/tools/misc/s6-portable-utils/default.nix | 2 +- pkgs/tools/misc/staruml/default.nix | 2 +- pkgs/tools/networking/airfield/default.nix | 2 +- pkgs/tools/networking/filegive/default.nix | 2 +- .../networking/logmein-hamachi/default.nix | 10 +++---- pkgs/tools/networking/ngrok-2/default.nix | 2 +- pkgs/tools/networking/s6-dns/default.nix | 2 +- .../networking/s6-networking/default.nix | 2 +- pkgs/tools/networking/strongswan/default.nix | 2 +- .../checkinstall/default.nix | 2 +- .../package-management/nixui/default.nix | 2 +- pkgs/tools/security/afl/default.nix | 6 ++-- pkgs/tools/security/afl/qemu.nix | 8 ++--- pkgs/tools/security/encryptr/default.nix | 12 ++++---- pkgs/tools/security/enpass/default.nix | 7 +++-- .../security/pcsc-scm-scl011/default.nix | 6 ++-- pkgs/tools/security/sshuttle/default.nix | 2 +- pkgs/tools/system/s6-rc/default.nix | 2 +- pkgs/tools/system/s6/default.nix | 2 +- pkgs/tools/system/storebrowse/default.nix | 2 +- pkgs/tools/text/gawk/default.nix | 2 +- pkgs/tools/text/xidel/default.nix | 6 ++-- pkgs/tools/typesetting/kindlegen/default.nix | 4 +-- pkgs/top-level/all-packages.nix | 30 +++++++++---------- pkgs/top-level/ocaml-packages.nix | 4 ++- pkgs/top-level/python-packages.nix | 6 ++-- 263 files changed, 594 insertions(+), 577 deletions(-) diff --git a/doc/old/cross.txt b/doc/old/cross.txt index c0885c08176..ff9fefb04a8 100644 --- a/doc/old/cross.txt +++ b/doc/old/cross.txt @@ -78,7 +78,7 @@ Step 2: build kernel headers for the target architecture --- {stdenv, fetchurl}: -assert stdenv.system == "i686-linux"; +assert stdenv.buildPlatform.system == "i686-linux"; stdenv.mkDerivation { name = "linux-headers-2.6.13.1-arm"; diff --git a/nixos/lib/make-system-tarball.nix b/nixos/lib/make-system-tarball.nix index 92539235be7..846013b02d1 100644 --- a/nixos/lib/make-system-tarball.nix +++ b/nixos/lib/make-system-tarball.nix @@ -1,7 +1,7 @@ { stdenv, perl, pixz, pathsFromGraph , # The file name of the resulting tarball - fileName ? "nixos-system-${stdenv.system}" + fileName ? "nixos-system-${stdenv.hostPlatform.system}" , # The files and directories to be placed in the tarball. # This is a list of attribute sets {source, target} where `source' diff --git a/nixos/lib/qemu-flags.nix b/nixos/lib/qemu-flags.nix index f115ca5ac00..779f0377a51 100644 --- a/nixos/lib/qemu-flags.nix +++ b/nixos/lib/qemu-flags.nix @@ -14,12 +14,12 @@ in qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0" else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0" - else throw "Unknown QEMU serial device for system '${pkgs.stdenv.system}'"; + else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'"; qemuBinary = qemuPkg: { "x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64"; "armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host"; "aarch64-linux" = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host"; "x86_64-darwin" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64"; - }.${pkgs.stdenv.system} or "${qemuPkg}/bin/qemu-kvm"; + }.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm"; } diff --git a/nixos/modules/installer/cd-dvd/installation-cd-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-base.nix index 1453e8082b0..24070a78694 100644 --- a/nixos/modules/installer/cd-dvd/installation-cd-base.nix +++ b/nixos/modules/installer/cd-dvd/installation-cd-base.nix @@ -16,7 +16,7 @@ with lib; ]; # ISO naming. - isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.iso"; + isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso"; isoImage.volumeID = substring 0 11 "NIXOS_ISO"; diff --git a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix index bd6cf029967..86e19f3da56 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix @@ -16,7 +16,8 @@ in ]; assertions = lib.singleton { - assertion = pkgs.stdenv.system == "aarch64-linux"; + assertion = pkgs.stdenv.hostPlatform.system == "aarch64-linux" + && pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system; message = "sd-image-aarch64.nix can be only built natively on Aarch64 / ARM64; " + "it cannot be cross compiled"; }; diff --git a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix index 0c89eb53335..695c79ca170 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix @@ -16,7 +16,8 @@ in ]; assertions = lib.singleton { - assertion = pkgs.stdenv.system == "armv7l-linux"; + assertion = pkgs.stdenv.hostPlatform.system == "armv7l-linux" + && pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system; message = "sd-image-armv7l-multiplatform.nix can be only built natively on ARMv7; " + "it cannot be cross compiled"; }; diff --git a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix index 78ea3f1a205..e395b265d15 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix @@ -16,7 +16,8 @@ in ]; assertions = lib.singleton { - assertion = pkgs.stdenv.system == "armv6l-linux"; + assertion = pkgs.stdenv.hostPlatform.system == "armv6l-linux" + && pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system; message = "sd-image-raspberrypi.nix can be only built natively on ARMv6; " + "it cannot be cross compiled"; }; diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix index 2371be9d89a..b6e1d11c2b5 100644 --- a/nixos/modules/installer/cd-dvd/sd-image.nix +++ b/nixos/modules/installer/cd-dvd/sd-image.nix @@ -22,7 +22,7 @@ in { options.sdImage = { imageName = mkOption { - default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.img"; + default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.img"; description = '' Name of the generated image file. ''; @@ -102,7 +102,7 @@ in mkdir -p $out/nix-support $out/sd-image export img=$out/sd-image/${config.sdImage.imageName} - echo "${pkgs.stdenv.system}" > $out/nix-support/system + echo "${pkgs.stdenv.buildPlatform.system}" > $out/nix-support/system echo "file sd-image $img" >> $out/nix-support/hydra-build-products # Create the image file sized to fit /boot and /, plus 20M of slack diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix index ea640173c6d..303d9fce3f9 100644 --- a/nixos/modules/installer/netboot/netboot.nix +++ b/nixos/modules/installer/netboot/netboot.nix @@ -25,7 +25,7 @@ with lib; # !!! Hack - attributes expected by other modules. environment.systemPackages = [ pkgs.grub2_efi ] - ++ (if pkgs.stdenv.system == "aarch64-linux" + ++ (if pkgs.stdenv.hostPlatform.system == "aarch64-linux" then [] else [ pkgs.grub2 pkgs.syslinux ]); diff --git a/nixos/modules/services/misc/gitit.nix b/nixos/modules/services/misc/gitit.nix index 0025d96bd37..1ec030549f9 100644 --- a/nixos/modules/services/misc/gitit.nix +++ b/nixos/modules/services/misc/gitit.nix @@ -10,7 +10,7 @@ let toYesNo = b: if b then "yes" else "no"; - gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version; + gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.hostPlatform.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version; gititWithPkgs = hsPkgs: extras: hsPkgs.ghcWithPackages (self: with self; [ gitit ] ++ (extras self)); diff --git a/nixos/modules/services/networking/vsftpd.nix b/nixos/modules/services/networking/vsftpd.nix index 1f9107c3ce9..31e1e65fa9c 100644 --- a/nixos/modules/services/networking/vsftpd.nix +++ b/nixos/modules/services/networking/vsftpd.nix @@ -99,7 +99,7 @@ let nopriv_user=vsftpd secure_chroot_dir=/var/empty syslog_enable=YES - ${optionalString (pkgs.stdenv.system == "x86_64-linux") '' + ${optionalString (pkgs.stdenv.hostPlatform.system == "x86_64-linux") '' seccomp_sandbox=NO ''} anon_umask=${cfg.anonymousUmask} diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index 27c1f891f48..ed8b9f01e27 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -324,7 +324,7 @@ in [ "aes" "aes_generic" "blowfish" "twofish" "serpent" "cbc" "xts" "lrw" "sha1" "sha256" "sha512" - (if pkgs.stdenv.system == "x86_64-linux" then "aes_x86_64" else "aes_i586") + (if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "aes_x86_64" else "aes_i586") ]; description = '' A list of cryptographic kernel modules needed to decrypt the root device(s). diff --git a/nixos/modules/virtualisation/azure-agent.nix b/nixos/modules/virtualisation/azure-agent.nix index b7ab54aab7e..770cefbcd51 100644 --- a/nixos/modules/virtualisation/azure-agent.nix +++ b/nixos/modules/virtualisation/azure-agent.nix @@ -77,7 +77,7 @@ in config = mkIf cfg.enable { assertions = [ { assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; - message = "Azure not currently supported on ${pkgs.stdenv.system}"; + message = "Azure not currently supported on ${pkgs.stdenv.hostPlatform.system}"; } { assertion = config.networking.networkmanager.enable == false; message = "Windows Azure Linux Agent is not compatible with NetworkManager"; diff --git a/nixos/modules/virtualisation/brightbox-image.nix b/nixos/modules/virtualisation/brightbox-image.nix index 39a655b4c10..e716982c510 100644 --- a/nixos/modules/virtualisation/brightbox-image.nix +++ b/nixos/modules/virtualisation/brightbox-image.nix @@ -26,7 +26,7 @@ in rm $diskImageBase popd ''; - diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.system}.raw"; + diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw"; buildInputs = [ pkgs.utillinux pkgs.perl ]; exportReferencesGraph = [ "closure" config.system.build.toplevel ]; diff --git a/nixos/modules/virtualisation/google-compute-image.nix b/nixos/modules/virtualisation/google-compute-image.nix index de2c43b8a40..4c7cffcf455 100644 --- a/nixos/modules/virtualisation/google-compute-image.nix +++ b/nixos/modules/virtualisation/google-compute-image.nix @@ -14,7 +14,7 @@ in PATH=$PATH:${pkgs.stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]} pushd $out mv $diskImage disk.raw - tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.system}.raw.tar.gz disk.raw + tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw.tar.gz disk.raw rm $out/disk.raw popd ''; diff --git a/nixos/modules/virtualisation/virtualbox-guest.nix b/nixos/modules/virtualisation/virtualbox-guest.nix index 78c6f740788..834b994e92d 100644 --- a/nixos/modules/virtualisation/virtualbox-guest.nix +++ b/nixos/modules/virtualisation/virtualbox-guest.nix @@ -34,7 +34,7 @@ in config = mkIf cfg.enable (mkMerge [{ assertions = [{ assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; - message = "Virtualbox not currently supported on ${pkgs.stdenv.system}"; + message = "Virtualbox not currently supported on ${pkgs.stdenv.hostPlatform.system}"; }]; environment.systemPackages = [ kernel.virtualboxGuestAdditions ]; diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index 475852d1546..60048911658 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -26,21 +26,21 @@ in { }; vmDerivationName = mkOption { type = types.str; - default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.system}"; + default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}"; description = '' The name of the derivation for the VirtualBox appliance. ''; }; vmName = mkOption { type = types.str; - default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.system})"; + default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.hostPlatform.system})"; description = '' The name of the VirtualBox appliance. ''; }; vmFileName = mkOption { type = types.str; - default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.system}.ova"; + default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.ova"; description = '' The file name of the VirtualBox appliance. ''; @@ -67,10 +67,10 @@ in { echo "creating VirtualBox VM..." vmName="${cfg.vmName}"; VBoxManage createvm --name "$vmName" --register \ - --ostype ${if pkgs.stdenv.system == "x86_64-linux" then "Linux26_64" else "Linux26"} + --ostype ${if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "Linux26_64" else "Linux26"} VBoxManage modifyvm "$vmName" \ --memory ${toString cfg.memorySize} --acpi on --vram 32 \ - ${optionalString (pkgs.stdenv.system == "i686-linux") "--pae on"} \ + ${optionalString (pkgs.stdenv.hostPlatform.system == "i686-linux") "--pae on"} \ --nictype1 virtio --nic1 nat \ --audiocontroller ac97 --audio alsa \ --rtcuseutc on \ diff --git a/nixos/modules/virtualisation/vmware-guest.nix b/nixos/modules/virtualisation/vmware-guest.nix index 68930a0e325..15c78f14c52 100644 --- a/nixos/modules/virtualisation/vmware-guest.nix +++ b/nixos/modules/virtualisation/vmware-guest.nix @@ -22,7 +22,7 @@ in config = mkIf cfg.enable { assertions = [ { assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; - message = "VMWare guest is not currently supported on ${pkgs.stdenv.system}"; + message = "VMWare guest is not currently supported on ${pkgs.stdenv.hostPlatform.system}"; } ]; environment.systemPackages = [ open-vm-tools ]; diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix index cf57868acef..70e575b6c0d 100644 --- a/nixos/modules/virtualisation/xen-dom0.nix +++ b/nixos/modules/virtualisation/xen-dom0.nix @@ -146,7 +146,7 @@ in config = mkIf cfg.enable { assertions = [ { assertion = pkgs.stdenv.isx86_64; - message = "Xen currently not supported on ${pkgs.stdenv.system}"; + message = "Xen currently not supported on ${pkgs.stdenv.hostPlatform.system}"; } { assertion = config.boot.loader.grub.enable && (config.boot.loader.grub.efiSupport == false); message = "Xen currently does not support EFI boot"; diff --git a/pkgs/applications/altcoins/mist.nix b/pkgs/applications/altcoins/mist.nix index 5f89b0a0c17..194c004f9c7 100644 --- a/pkgs/applications/altcoins/mist.nix +++ b/pkgs/applications/altcoins/mist.nix @@ -4,7 +4,7 @@ let version = "0.11.1"; name = "mist"; - throwSystem = throw "Unsupported system: ${stdenv.system}"; + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; meta = with stdenv.lib; { description = "Browse and use Ðapps on the Ethereum network"; @@ -37,7 +37,7 @@ let url = "https://github.com/ethereum/mist/releases/download/v${version}/Mist-linux64-${urlVersion}.zip"; sha256 = "0yx4x72l8gk68yh9saki48zgqx8k92xnkm79dc651wdpd5c25cz3"; }; - }.${stdenv.system} or throwSystem; + }.${stdenv.hostPlatform.system} or throwSystem; buildInputs = [ unzip makeWrapper ]; diff --git a/pkgs/applications/audio/baudline/default.nix b/pkgs/applications/audio/baudline/default.nix index deaa3f98e52..6827d12b321 100644 --- a/pkgs/applications/audio/baudline/default.nix +++ b/pkgs/applications/audio/baudline/default.nix @@ -11,18 +11,18 @@ stdenv.mkDerivation rec { version = "1.08"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "http://www.baudline.com/baudline_${version}_linux_x86_64.tar.gz"; sha256 = "09fn0046i69in1jpizkzbaq5ggij0mpflcsparyskm3wh71mbzvr"; } - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "http://www.baudline.com/baudline_${version}_linux_i686.tar.gz"; sha256 = "1waip5pmcf5ffcfvn8lf1rvsaq2ab66imrbfqs777scz7k8fhhjb"; } else - throw "baudline isn't supported (yet?) on ${stdenv.system}"; + throw "baudline isn't supported (yet?) on ${stdenv.hostPlatform.system}"; buildInputs = [ makeWrapper ]; diff --git a/pkgs/applications/audio/google-musicmanager/default.nix b/pkgs/applications/audio/google-musicmanager/default.nix index 4cd3010ec3d..b4fe78dcbfc 100644 --- a/pkgs/applications/audio/google-musicmanager/default.nix +++ b/pkgs/applications/audio/google-musicmanager/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl , flac, expat, libidn, qtbase, qtwebkit, libvorbis }: -assert stdenv.system == "x86_64-linux"; +assert stdenv.hostPlatform.system == "x86_64-linux"; stdenv.mkDerivation rec { version = "beta_1.0.467.4929-r0"; # friendly to nix-env version sorting algo diff --git a/pkgs/applications/audio/renoise/default.nix b/pkgs/applications/audio/renoise/default.nix index 24a2f1a8a60..cd06fa80f5a 100644 --- a/pkgs/applications/audio/renoise/default.nix +++ b/pkgs/applications/audio/renoise/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { version = "3.1.0"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then if builtins.isNull releasePath then fetchurl { url = "https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86_64.tar.bz2"; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { } else releasePath - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then if builtins.isNull releasePath then fetchurl { url = "http://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86.tar.bz2"; diff --git a/pkgs/applications/audio/transcribe/default.nix b/pkgs/applications/audio/transcribe/default.nix index 5ec5087b9f2..c6d5ebc1627 100644 --- a/pkgs/applications/audio/transcribe/default.nix +++ b/pkgs/applications/audio/transcribe/default.nix @@ -7,12 +7,12 @@ stdenv.mkDerivation rec { name = "transcribe-${version}"; version = "8.40"; - src = if stdenv.system == "i686-linux" then + src = if stdenv.hostPlatform.system == "i686-linux" then fetchzip { url = "https://www.seventhstring.com/xscribe/downlinux32_old/xscsetup.tar.gz"; sha256 = "1ngidmj9zz8bmv754s5xfsjv7v6xr03vck4kigzq4bpc9b1fdhjq"; } - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip { url = "https://www.seventhstring.com/xscribe/downlinux64_old/xsc64setup.tar.gz"; sha256 = "0svzi8svj6zn06gj0hr8mpnhq4416dvb4g5al0gpb1g3paywdaf9"; diff --git a/pkgs/applications/editors/eclipse/build-eclipse.nix b/pkgs/applications/editors/eclipse/build-eclipse.nix index a26d380ec1d..389608ad824 100644 --- a/pkgs/applications/editors/eclipse/build-eclipse.nix +++ b/pkgs/applications/editors/eclipse/build-eclipse.nix @@ -2,7 +2,7 @@ , zlib, jdk, glib, gtk3, libXtst, gsettings-desktop-schemas, webkitgtk , makeWrapper, ... }: -{ name, src ? builtins.getAttr stdenv.system sources, sources ? null, description }: +{ name, src ? builtins.getAttr stdenv.hostPlatform.system sources, sources ? null, description }: stdenv.mkDerivation rec { inherit name src; diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix index c719c7b2da1..8d47a551c93 100644 --- a/pkgs/applications/editors/eclipse/default.nix +++ b/pkgs/applications/editors/eclipse/default.nix @@ -27,24 +27,24 @@ rec { name = "eclipse-cpp-4.7.0"; description = "Eclipse IDE for C/C++ Developers, Oxygen release"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-cpp-oxygen-R-linux-gtk-x86_64.tar.gz; sha512 = "813c791e739d7d0e2ab242a5bacadca135bbeee20ef97aa830353cd90f63fa6e9c89cfcc6aadf635c742befe035bd6e3f15103013f63c419f6144e86ebde3ed1"; } - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-cpp-oxygen-R-linux-gtk.tar.gz; sha512 = "2b50f4a00306a89cda1aaaa606e62285cacbf93464a9dd3f3319dca3e2c578b802e685de6f78e5e617d269e21271188effe73d41f491a6de946e28795d82db8a"; } - else throw "Unsupported system: ${stdenv.system}"; + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; }; eclipse-cpp-37 = buildEclipse { name = "eclipse-cpp-3.7"; description = "Eclipse IDE for C/C++ Developers"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/indigo/R/eclipse-cpp-indigo-incubation-linux-gtk-x86_64.tar.gz; sha256 = "14ppc9g9igzvj1pq7jl01vwhzb66nmzbl9wsdl1sf3xnwa9wnqk3"; @@ -65,7 +65,7 @@ rec { name = "eclipse-modeling-4.7"; description = "Eclipse Modeling Tools"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-modeling-oxygen-R-linux-gtk-x86_64.tar.gz; sha512 = "3b9a7ad4b5d6b77fbdd64e8d323e0adb6c2904763ad042b374b4d87cef8607408cb407e395870fc755d58c0c800e20818adcf456ebe193d76cede16c5fe12271"; @@ -81,7 +81,7 @@ rec { name = "eclipse-modeling-3.6.2"; description = "Eclipse Modeling Tools (includes Incubating components)"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/helios/SR2/eclipse-modeling-helios-SR2-incubation-linux-gtk-x86_64.tar.gz; sha1 = "e96f5f006298f68476f4a15a2be8589158d5cc61"; @@ -151,7 +151,7 @@ rec { name = "eclipse-scala-sdk-4.4.1"; description = "Eclipse IDE for Scala Developers"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { # tested url = https://downloads.typesafe.com/scalaide-pack/4.4.1-vfinal-luna-211-20160504/scala-SDK-4.4.1-vfinal-2.11-linux.gtk.x86_64.tar.gz; sha256 = "4c2d1ac68384e12a11a851cf0fc7757aea087eba69329b21d539382a65340d27"; diff --git a/pkgs/applications/editors/jetbrains/common.nix b/pkgs/applications/editors/jetbrains/common.nix index 04de4f564c3..2bb84bce0b1 100644 --- a/pkgs/applications/editors/jetbrains/common.nix +++ b/pkgs/applications/editors/jetbrains/common.nix @@ -42,7 +42,7 @@ with stdenv; lib.makeOverridable mkDerivation rec { } interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2) - if [ "${stdenv.system}" == "x86_64-linux" ]; then + if [ "${stdenv.hostPlatform.system}" == "x86_64-linux" ]; then target_size=$(get_file_size bin/fsnotifier64) patchelf --set-interpreter "$interpreter" bin/fsnotifier64 munge_size_hack bin/fsnotifier64 $target_size diff --git a/pkgs/applications/editors/kodestudio/default.nix b/pkgs/applications/editors/kodestudio/default.nix index 4e22e032e35..b212773712c 100644 --- a/pkgs/applications/editors/kodestudio/default.nix +++ b/pkgs/applications/editors/kodestudio/default.nix @@ -8,15 +8,15 @@ let version = "17.1"; - sha256 = if stdenv.system == "x86_64-linux" then "1kddisnvlk48jip6k59mw3wlkrl7rkck2lxpaghn0gfx02cvms5f" - else if stdenv.system == "i686-cygwin" then "1izp42afrlh4yd322ax9w85ki388gnkqfqbw8dwnn4k3j7r5487z" - else throw "Unsupported system: ${stdenv.system}"; + sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1kddisnvlk48jip6k59mw3wlkrl7rkck2lxpaghn0gfx02cvms5f" + else if stdenv.hostPlatform.system == "i686-cygwin" then "1izp42afrlh4yd322ax9w85ki388gnkqfqbw8dwnn4k3j7r5487z" + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; urlBase = "https://github.com/Kode/KodeStudio/releases/download/v${version}/KodeStudio-"; - urlStr = if stdenv.system == "x86_64-linux" then urlBase + "linux64.tar.gz" - else if stdenv.system == "i686-cygwin" then urlBase + "win32.zip" - else throw "Unsupported system: ${stdenv.system}"; + urlStr = if stdenv.hostPlatform.system == "x86_64-linux" then urlBase + "linux64.tar.gz" + else if stdenv.hostPlatform.system == "i686-cygwin" then urlBase + "win32.zip" + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; in @@ -47,7 +47,7 @@ in cp -r ./* $out ''; - postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") '' + postFixup = lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") '' # Patch Binaries patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ diff --git a/pkgs/applications/editors/music/tuxguitar/default.nix b/pkgs/applications/editors/music/tuxguitar/default.nix index f305db1abb8..1b1c6eaf9e5 100644 --- a/pkgs/applications/editors/music/tuxguitar/default.nix +++ b/pkgs/applications/editors/music/tuxguitar/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, swt, jdk, makeWrapper, alsaLib }: -let metadata = assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"; - if stdenv.system == "i686-linux" then +let metadata = assert stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux"; + if stdenv.hostPlatform.system == "i686-linux" then { arch = "x86"; sha256 = "1qmb51k0538pn7gv4nsvhfv33xik4l4af0qmpllkzrikmj8wvzlb"; } else { arch = "x86_64"; sha256 = "12af47jhlrh9aq5b3d13l7cdhlndgnfpy61gz002hajbq7i00ixh"; }; diff --git a/pkgs/applications/editors/sublime/2/default.nix b/pkgs/applications/editors/sublime/2/default.nix index 78c2d9aaa0c..11724d9802a 100644 --- a/pkgs/applications/editors/sublime/2/default.nix +++ b/pkgs/applications/editors/sublime/2/default.nix @@ -6,7 +6,7 @@ in stdenv.mkDerivation rec { name = "sublimetext-2.0.2"; src = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { name = "sublimetext-2.0.2.tar.bz2"; url = http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.tar.bz2; diff --git a/pkgs/applications/editors/sublime/3/common.nix b/pkgs/applications/editors/sublime/3/common.nix index 628993dbf5b..eb282b1be3a 100644 --- a/pkgs/applications/editors/sublime/3/common.nix +++ b/pkgs/applications/editors/sublime/3/common.nix @@ -13,13 +13,13 @@ let ++ stdenv.lib.optional gksuSupport "/usr/bin/gksudo=${gksu}/bin/gksudo"; in let archSha256 = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then x32sha256 else x64sha256; arch = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then "x32" else "x64"; diff --git a/pkgs/applications/editors/typora/default.nix b/pkgs/applications/editors/typora/default.nix index 93ee70e4148..0bff4864c61 100644 --- a/pkgs/applications/editors/typora/default.nix +++ b/pkgs/applications/editors/typora/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { version = "0.9.53"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://www.typora.io/linux/typora_${version}_amd64.deb"; sha256 = "02k6x30l4mbjragqbq5rn663xbw3h4bxzgppfxqf5lwydswldklb"; diff --git a/pkgs/applications/editors/vscode/default.nix b/pkgs/applications/editors/vscode/default.nix index a775fb3bd79..0cf0c7bcbc6 100644 --- a/pkgs/applications/editors/vscode/default.nix +++ b/pkgs/applications/editors/vscode/default.nix @@ -9,15 +9,15 @@ let "i686-linux" = "linux-ia32"; "x86_64-linux" = "linux-x64"; "x86_64-darwin" = "darwin"; - }.${stdenv.system}; + }.${stdenv.hostPlatform.system}; sha256 = { "i686-linux" = "1g7kqbz6mrf8ngx2bnwpi9fifq5rjznxgsgwjb532z3nh92ypa8n"; "x86_64-linux" = "02yldycakn5zxj1ji4nmhdyazqlkjqpzdj3g8j501c3j28pgiwjy"; "x86_64-darwin" = "0pnsfkh20mj7pzqw7wlfd98jqc6a1mnsq1iira15n7fafqgj8zpl"; - }.${stdenv.system}; + }.${stdenv.hostPlatform.system}; - archive_fmt = if stdenv.system == "x86_64-darwin" then "zip" else "tar.gz"; + archive_fmt = if stdenv.hostPlatform.system == "x86_64-darwin" then "zip" else "tar.gz"; rpath = lib.concatStringsSep ":" [ atomEnv.libPath @@ -48,12 +48,12 @@ in categories = "GNOME;GTK;Utility;TextEditor;Development;"; }; - buildInputs = if stdenv.system == "x86_64-darwin" + buildInputs = if stdenv.hostPlatform.system == "x86_64-darwin" then [ unzip libXScrnSaver libsecret ] else [ wrapGAppsHook libXScrnSaver libxkbfile libsecret ]; installPhase = - if stdenv.system == "x86_64-darwin" then '' + if stdenv.hostPlatform.system == "x86_64-darwin" then '' mkdir -p $out/lib/vscode $out/bin cp -r ./* $out/lib/vscode ln -s $out/lib/vscode/Contents/Resources/app/bin/code $out/bin @@ -72,7 +72,7 @@ in cp $out/lib/vscode/resources/app/resources/linux/code.png $out/share/pixmaps/code.png ''; - postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") '' + postFixup = lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "${rpath}" \ diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix index c4afd6b3bed..893f8d1da6d 100644 --- a/pkgs/applications/graphics/ImageMagick/7.0.nix +++ b/pkgs/applications/graphics/ImageMagick/7.0.nix @@ -7,10 +7,10 @@ let arch = - if stdenv.system == "i686-linux" then "i686" - else if stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin" then "x86-64" - else if stdenv.system == "armv7l-linux" then "armv7l" - else if stdenv.system == "aarch64-linux" then "aarch64" + if stdenv.hostPlatform.system == "i686-linux" then "i686" + else if stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin" then "x86-64" + else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l" + else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64" else throw "ImageMagick is not supported on this platform."; cfg = { diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index 94a4aeaa933..22d1341f0dc 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -7,10 +7,10 @@ let arch = - if stdenv.system == "i686-linux" then "i686" - else if stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin" then "x86-64" - else if stdenv.system == "armv7l-linux" then "armv7l" - else if stdenv.system == "aarch64-linux" then "aarch64" + if stdenv.hostPlatform.system == "i686-linux" then "i686" + else if stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin" then "x86-64" + else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l" + else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64" else throw "ImageMagick is not supported on this platform."; cfg = { diff --git a/pkgs/applications/graphics/gcolor2/default.nix b/pkgs/applications/graphics/gcolor2/default.nix index 3747b802e23..27ca6e26e9f 100644 --- a/pkgs/applications/graphics/gcolor2/default.nix +++ b/pkgs/applications/graphics/gcolor2/default.nix @@ -3,7 +3,7 @@ let version = "0.4"; in stdenv.mkDerivation { name = "gcolor2-${version}"; - arch = if stdenv.system == "x86_64-linux" then "amd64" else "386"; + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" else "386"; src = fetchurl { url = "mirror://sourceforge/project/gcolor2/gcolor2/${version}/gcolor2-${version}.tar.bz2"; @@ -16,7 +16,7 @@ stdenv.mkDerivation { ''; # from https://github.com/PhantomX/slackbuilds/tree/master/gcolor2/patches - patches = if stdenv.system == "x86_64-linux" then + patches = if stdenv.hostPlatform.system == "x86_64-linux" then [ ./gcolor2-amd64.patch ] else [ ]; diff --git a/pkgs/applications/graphics/sane/backends/brscan4/default.nix b/pkgs/applications/graphics/sane/backends/brscan4/default.nix index df44c132ed9..b431cf51b01 100644 --- a/pkgs/applications/graphics/sane/backends/brscan4/default.nix +++ b/pkgs/applications/graphics/sane/backends/brscan4/default.nix @@ -12,17 +12,17 @@ let in stdenv.mkDerivation rec { name = "brscan4-0.4.4-4"; src = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "http://download.brother.com/welcome/dlf006646/${name}.i386.deb"; sha256 = "13mhjbzf9nvpdzrc2s98684r7likg76zxs1wlz2h8w59fsqgx4k2"; } - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://download.brother.com/welcome/dlf006645/${name}.amd64.deb"; sha256 = "0xy5px96y1saq9l80vwvfn6anr2q42qlxdhm6ci2a0diwib5q9fd"; } - else throw "${name} is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)"; + else throw "${name} is not supported on ${stdenv.hostPlatform.system} (only i686-linux and x86_64 linux are supported)"; unpackPhase = '' ar x $src diff --git a/pkgs/applications/graphics/unigine-valley/default.nix b/pkgs/applications/graphics/unigine-valley/default.nix index f1adc6bd10e..d29c9cd8259 100644 --- a/pkgs/applications/graphics/unigine-valley/default.nix +++ b/pkgs/applications/graphics/unigine-valley/default.nix @@ -17,12 +17,12 @@ let version = "1.0"; - arch = if stdenv.system == "x86_64-linux" then + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then "x86" else - throw "Unsupported platform ${stdenv.system}"; + throw "Unsupported platform ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation rec { diff --git a/pkgs/applications/misc/1password/default.nix b/pkgs/applications/misc/1password/default.nix index 94dfc68fb59..331f516c88c 100644 --- a/pkgs/applications/misc/1password/default.nix +++ b/pkgs/applications/misc/1password/default.nix @@ -4,19 +4,19 @@ stdenv.mkDerivation rec { name = "1password-${version}"; version = "0.5.3"; src = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then fetchzip { url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_386_v${version}.zip"; sha256 = "05s223h1yps4k9kmignl0r5sbh6w7m1hnlmafnf1kiwv7gacvxjc"; stripRoot = false; } - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip { url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_amd64_v${version}.zip"; sha256 = "0p9x1fx0309v8dxxaf88m8x8q15zzqywfmjn6v5wb9v3scp9396v"; stripRoot = false; } - else if stdenv.system == "x86_64-darwin" then + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchzip { url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_darwin_amd64_v${version}.zip"; sha256 = "1z2xp9bn93gr4ha6zx65va1fb58a2xlnnmpv583y96gq3vbnqdcj"; diff --git a/pkgs/applications/misc/adobe-reader/default.nix b/pkgs/applications/misc/adobe-reader/default.nix index 88bf87b0a84..0ca12a0096e 100644 --- a/pkgs/applications/misc/adobe-reader/default.nix +++ b/pkgs/applications/misc/adobe-reader/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, libX11, cups, zlib, libxml2, pango, atk, gtk2, glib , gdk_pixbuf }: -assert stdenv.system == "i686-linux"; +assert stdenv.hostPlatform.system == "i686-linux"; let version = "9.5.5"; in diff --git a/pkgs/applications/misc/cura/lulzbot.nix b/pkgs/applications/misc/cura/lulzbot.nix index 6a36e42eaa3..f3f1972f6e6 100644 --- a/pkgs/applications/misc/cura/lulzbot.nix +++ b/pkgs/applications/misc/cura/lulzbot.nix @@ -8,17 +8,17 @@ stdenv.mkDerivation rec { version = "15.02.1-1.03-5064"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-amd64/cura_${version}_amd64.deb"; sha256 = "1gsfidg3gim5pjbl82vkh0cw4ya253m4p7nirm8nr6yjrsirkzxg"; } - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "http://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-i386/cura_${version}_i386.deb"; sha256 = "0xd3df6bxq4rijgvsqvps454jkc1nzhxbdzzj6j2w317ppsbhyc1"; } - else throw "${name} is not supported on ${stdenv.system}"; + else throw "${name} is not supported on ${stdenv.hostPlatform.system}"; python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ]; pythonPath = python_deps; diff --git a/pkgs/applications/misc/googleearth/default.nix b/pkgs/applications/misc/googleearth/default.nix index 9c1b457c299..96f8cb11614 100644 --- a/pkgs/applications/misc/googleearth/default.nix +++ b/pkgs/applications/misc/googleearth/default.nix @@ -4,9 +4,9 @@ let arch = - if stdenv.system == "x86_64-linux" then "amd64" - else if stdenv.system == "i686-linux" then "i386" - else throw "Unsupported system ${stdenv.system}"; + if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" + else if stdenv.hostPlatform.system == "i686-linux" then "i386" + else throw "Unsupported system ${stdenv.hostPlatform.system}"; sha256 = if arch == "amd64" then "0dwnppn5snl5bwkdrgj4cyylnhngi0g66fn2k41j3dvis83x24k6" diff --git a/pkgs/applications/misc/icesl/default.nix b/pkgs/applications/misc/icesl/default.nix index 49b1741fd5a..c0c1faef09d 100644 --- a/pkgs/applications/misc/icesl/default.nix +++ b/pkgs/applications/misc/icesl/default.nix @@ -6,10 +6,10 @@ stdenv.mkDerivation rec { name = "iceSL-${version}"; version = "2.1.10"; - src = if stdenv.system == "x86_64-linux" then fetchzip { + src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip { url = "https://gforge.inria.fr/frs/download.php/file/37268/icesl${version}-amd64.zip"; sha256 = "0dv3mq6wy46xk9blzzmgbdxpsjdaxid3zadfrysxlhmgl7zb2cn2"; - } else if stdenv.system == "i686-linux" then fetchzip { + } else if stdenv.hostPlatform.system == "i686-linux" then fetchzip { url = "https://gforge.inria.fr/frs/download.php/file/37267/icesl${version}-i386.zip"; sha256 = "0sl54fsb2gz6dy0bwdscpdq1ab6ph5b7zald3bwzgkqsvna7p1jr"; } else throw "Unsupported architecture"; diff --git a/pkgs/applications/misc/kdbplus/default.nix b/pkgs/applications/misc/kdbplus/default.nix index ba048761367..b518481e29a 100644 --- a/pkgs/applications/misc/kdbplus/default.nix +++ b/pkgs/applications/misc/kdbplus/default.nix @@ -1,6 +1,6 @@ { stdenv, requireFile, unzip, rlwrap, bash }: -assert (stdenv.system == "i686-linux"); +assert (stdenv.hostPlatform.system == "i686-linux"); let libPath = stdenv.lib.makeLibraryPath diff --git a/pkgs/applications/misc/kiwix/default.nix b/pkgs/applications/misc/kiwix/default.nix index c37d26f3dbc..8d095b78cdb 100644 --- a/pkgs/applications/misc/kiwix/default.nix +++ b/pkgs/applications/misc/kiwix/default.nix @@ -25,7 +25,7 @@ let sha256 = "1h9vcbvf8wgds6i2z20y7krpys0mqsqhv1ijyfljanp6vyll9fvi"; }; - xulrunner = if stdenv.system == "x86_64-linux" + xulrunner = if stdenv.hostPlatform.system == "x86_64-linux" then { tar = xulrunner64_tar; sdk = xulrunnersdk64_tar; } else { tar = xulrunner32_tar; sdk = xulrunnersdk32_tar; }; diff --git a/pkgs/applications/misc/playonlinux/default.nix b/pkgs/applications/misc/playonlinux/default.nix index 2ad6321d519..8c9f13ce92c 100644 --- a/pkgs/applications/misc/playonlinux/default.nix +++ b/pkgs/applications/misc/playonlinux/default.nix @@ -44,9 +44,9 @@ let ]; ld32 = - if stdenv.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32" - else if stdenv.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker" - else throw "Unsupported platform for PlayOnLinux: ${stdenv.system}"; + if stdenv.hostPlatform.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32" + else if stdenv.hostPlatform.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker" + else throw "Unsupported platform for PlayOnLinux: ${stdenv.hostPlatform.system}"; ld64 = "${stdenv.cc}/nix-support/dynamic-linker"; libs = pkgs: stdenv.lib.makeLibraryPath [ pkgs.xorg.libX11 ]; @@ -83,7 +83,7 @@ in stdenv.mkDerivation { bunzip2 $out/share/playonlinux/bin/check_dd_x86.bz2 patchelf --set-interpreter $(cat ${ld32}) --set-rpath ${libs pkgsi686Linux} $out/share/playonlinux/bin/check_dd_x86 - ${if stdenv.system == "x86_64-linux" then '' + ${if stdenv.hostPlatform.system == "x86_64-linux" then '' bunzip2 $out/share/playonlinux/bin/check_dd_amd64.bz2 patchelf --set-interpreter $(cat ${ld64}) --set-rpath ${libs pkgs} $out/share/playonlinux/bin/check_dd_amd64 '' else '' diff --git a/pkgs/applications/misc/rescuetime/default.nix b/pkgs/applications/misc/rescuetime/default.nix index 57cdfd08d5b..d9cd85d5098 100644 --- a/pkgs/applications/misc/rescuetime/default.nix +++ b/pkgs/applications/misc/rescuetime/default.nix @@ -2,7 +2,7 @@ let src = - if stdenv.system == "i686-linux" then fetchurl { + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { name = "rescuetime-installer.deb"; url = "https://www.rescuetime.com/installers/rescuetime_current_i386.deb"; sha256 = "06q1jwqsrjvlj820dd4vl80jznwafsqshsg0p6si8qx4721blryz"; diff --git a/pkgs/applications/misc/sweethome3d/default.nix b/pkgs/applications/misc/sweethome3d/default.nix index 68a192d78b8..3c56a6a046f 100644 --- a/pkgs/applications/misc/sweethome3d/default.nix +++ b/pkgs/applications/misc/sweethome3d/default.nix @@ -55,7 +55,7 @@ let makeWrapper ${jre}/bin/java $out/bin/$exec \ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ - --add-flags "-jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar ${if stdenv.system == "x86_64-linux" then "-d64" else "-d32"}" + --add-flags "-jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}" ''; dontStrip = true; diff --git a/pkgs/applications/misc/sweethome3d/editors.nix b/pkgs/applications/misc/sweethome3d/editors.nix index 14285a52e27..eef5185aaee 100644 --- a/pkgs/applications/misc/sweethome3d/editors.nix +++ b/pkgs/applications/misc/sweethome3d/editors.nix @@ -44,7 +44,7 @@ let cp "${editorItem}/share/applications/"* $out/share/applications makeWrapper ${jre}/bin/java $out/bin/$exec \ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ - --add-flags "-jar $out/share/java/${module}-${version}.jar ${if stdenv.system == "x86_64-linux" then "-d64" else "-d32"}" + --add-flags "-jar $out/share/java/${module}-${version}.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}" ''; dontStrip = true; diff --git a/pkgs/applications/misc/xmind/default.nix b/pkgs/applications/misc/xmind/default.nix index a578c53f0e7..a12f3dc304b 100644 --- a/pkgs/applications/misc/xmind/default.nix +++ b/pkgs/applications/misc/xmind/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { name = "xmind-${version}"; version = "7.5-update1"; - src = if stdenv.system == "i686-linux" then fetchurl { + src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_i386.deb"; sha256 = "04kr6pw0kwy715bp9wcnqnw1k5wl65xa87lhljrskm291p402jy1"; - } else if stdenv.system == "x86_64-linux" then fetchurl { + } else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_amd64.deb"; sha256 = "1j2ynhk7p3m3vd6c4mjwpnlzqgfj5c4q3zydab3nfwncwx6gaqj9"; - } else throw "platform ${stdenv.system} not supported!"; + } else throw "platform ${stdenv.hostPlatform.system} not supported!"; nativeBuildInputs = [ dpkg makeWrapper ]; diff --git a/pkgs/applications/networking/apache-directory-studio/default.nix b/pkgs/applications/networking/apache-directory-studio/default.nix index d593947f3e6..05dee5b6154 100644 --- a/pkgs/applications/networking/apache-directory-studio/default.nix +++ b/pkgs/applications/networking/apache-directory-studio/default.nix @@ -21,17 +21,17 @@ stdenv.mkDerivation rec { version = "2.0.0.v20170904-M13"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86_64.tar.gz"; sha256 = "1jfnm6m0ijk31r30hhrxxnizk742dm317iny041p29v897rma7aq"; } - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86.tar.gz"; sha256 = "1bxmgram42qyhrqkgp5k8770f5mjjdd4c6xl4gj09smiycm1qa4n"; } - else throw "Unsupported system: ${stdenv.system}"; + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; buildInputs = [ makeWrapper ]; diff --git a/pkgs/applications/networking/bittorrentsync/generic.nix b/pkgs/applications/networking/bittorrentsync/generic.nix index dae540ba426..1075aea8db3 100644 --- a/pkgs/applications/networking/bittorrentsync/generic.nix +++ b/pkgs/applications/networking/bittorrentsync/generic.nix @@ -4,9 +4,9 @@ let arch = { "x86_64-linux" = "x64"; "i686-linux" = "i386"; - }.${stdenv.system} or throwSystem; + }.${stdenv.hostPlatform.system} or throwSystem; libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ]; - throwSystem = throw "Unsupported system: ${stdenv.system}"; + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation rec { @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { "https://download-cdn.getsync.com/${version}/linux-${arch}/BitTorrent-Sync_${arch}.tar.gz" "http://syncapp.bittorrent.com/${version}/btsync_${arch}-${version}.tar.gz" ]; - sha256 = sha256s.${stdenv.system} or throwSystem; + sha256 = sha256s.${stdenv.hostPlatform.system} or throwSystem; }; dontStrip = true; # Don't strip, otherwise patching the rpaths breaks diff --git a/pkgs/applications/networking/browsers/firefox-bin/default.nix b/pkgs/applications/networking/browsers/firefox-bin/default.nix index 1fbcb3d9714..7e92df163af 100644 --- a/pkgs/applications/networking/browsers/firefox-bin/default.nix +++ b/pkgs/applications/networking/browsers/firefox-bin/default.nix @@ -59,7 +59,7 @@ let "x86_64-linux" = "linux-x86_64"; }; - arch = mozillaPlatforms.${stdenv.system}; + arch = mozillaPlatforms.${stdenv.hostPlatform.system}; isPrefixOf = prefix: string: builtins.substring 0 (builtins.stringLength prefix) string == prefix; diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index b64a6cf7ad9..8b06c35fe00 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -36,10 +36,10 @@ let jre = cfg.jre or false; icedtea = cfg.icedtea or false; supportsJDK = - stdenv.system == "i686-linux" || - stdenv.system == "x86_64-linux" || - stdenv.system == "armv7l-linux" || - stdenv.system == "aarch64-linux"; + stdenv.hostPlatform.system == "i686-linux" || + stdenv.hostPlatform.system == "x86_64-linux" || + stdenv.hostPlatform.system == "armv7l-linux" || + stdenv.hostPlatform.system == "aarch64-linux"; plugins = assert !(jre && icedtea); diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix index 94d0e9e5bad..72e1a08f40b 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix @@ -60,13 +60,13 @@ let arch = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then "i386" else throw "Flash Player is not supported on this platform"; lib_suffix = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then "64" else ""; diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix index a172e0e8d5d..71b5161c1e3 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix @@ -54,12 +54,12 @@ stdenv.mkDerivation rec { version = "5.41.3.0"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "${baseURL}/google-talkplugin_${version}-1_amd64.deb"; sha1 = "0bbc3d6997ba22ce712d93e5bc336c894b54fc81"; } - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "${baseURL}/google-talkplugin_${version}-1_i386.deb"; sha1 = "6eae0544858f85c68b0cc46d7786e990bd94f139"; diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/trezor/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/trezor/default.nix index 3d4e0fc0022..5f7f601b354 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/trezor/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/trezor/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { }; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = https://mytrezor.com/data/plugin/1.0.5/browser-plugin-trezor_1.0.5_amd64.deb; sha256 = "0097h4v88yca4aayzprrh4pk03xvvj7ncz2mi83chm81gsr2v67z"; diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix index de676670913..f5f88cdfc02 100644 --- a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix +++ b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix @@ -125,7 +125,7 @@ stdenv.mkDerivation rec { name = "tor-browser-bundle-bin-${version}"; inherit version; - src = srcs."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}"); + src = srcs."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}"); preferLocalBuild = true; allowSubstitutes = false; diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix index 3450ad72048..047ad734bd4 100644 --- a/pkgs/applications/networking/dropbox/default.nix +++ b/pkgs/applications/networking/dropbox/default.nix @@ -2,7 +2,7 @@ let platforms = [ "i686-linux" "x86_64-linux" ]; in -assert lib.elem stdenv.system platforms; +assert lib.elem stdenv.hostPlatform.system platforms; # Dropbox client to bootstrap installation. # The client is self-updating, so the actual version may be newer. @@ -12,7 +12,7 @@ let arch = { "x86_64-linux" = "x86_64"; "i686-linux" = "x86"; - }.${stdenv.system}; + }.${stdenv.hostPlatform.system}; installer = "https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.${arch}-${version}.tar.gz"; in diff --git a/pkgs/applications/networking/instant-messengers/franz/default.nix b/pkgs/applications/networking/instant-messengers/franz/default.nix index b253e41ae7d..2f3870d7899 100644 --- a/pkgs/applications/networking/instant-messengers/franz/default.nix +++ b/pkgs/applications/networking/instant-messengers/franz/default.nix @@ -3,7 +3,7 @@ , gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }: let - bits = if stdenv.system == "x86_64-linux" then "x64" + bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" else "ia32"; version = "4.0.4"; diff --git a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix index a9ce8a96f97..109893850de 100644 --- a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix @@ -41,18 +41,18 @@ in version = "4.1.2"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-x64.tar.gz"; sha256 = "16dn6870bs1nfl2082ym9gwvmqb3i5sli48qprap80p7riph6k9s"; } - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-ia32.tar.gz"; sha256 = "145zb1l37fa2slfrrlprlwzcc5km3plxs374yhgix25mlg2afkqr"; } else - throw "Mattermost-Desktop is not currently supported on ${stdenv.system}"; + throw "Mattermost-Desktop is not currently supported on ${stdenv.hostPlatform.system}"; phases = [ "unpackPhase" "installPhase" ]; installPhase = '' diff --git a/pkgs/applications/networking/instant-messengers/rambox/sencha/bare.nix b/pkgs/applications/networking/instant-messengers/rambox/sencha/bare.nix index ca82f30e2d1..af92462a2a4 100644 --- a/pkgs/applications/networking/instant-messengers/rambox/sencha/bare.nix +++ b/pkgs/applications/networking/instant-messengers/rambox/sencha/bare.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { inherit version; name = "sencha-bare-${version}"; - src = srcs.${stdenv.system}; + src = srcs.${stdenv.hostPlatform.system}; nativeBuildInputs = [ gzip which unzip ]; buildInputs = [ jdk ]; diff --git a/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix b/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix index d728c8d95cc..eaa9103a7b6 100644 --- a/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix +++ b/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix @@ -53,13 +53,13 @@ let ] + ":${stdenv.cc.cc.lib}/lib64"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"; sha256 = "1kydf71qbz35dx4674h3nxfx8a88k620217906i54ic4qq2mgy2x"; } else - throw "Skype for linux is not supported on ${stdenv.system}"; + throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation { name = "skypeforlinux-${version}"; diff --git a/pkgs/applications/networking/instant-messengers/slack/default.nix b/pkgs/applications/networking/instant-messengers/slack/default.nix index bcf88780875..af2030a20b8 100644 --- a/pkgs/applications/networking/instant-messengers/slack/default.nix +++ b/pkgs/applications/networking/instant-messengers/slack/default.nix @@ -44,13 +44,13 @@ let ] + ":${stdenv.cc.cc.lib}/lib64"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb"; sha256 = "095dpkwvvnwlxsglyg6wi9126wpalzi736b6g6j3bd6d93z9afah"; } else - throw "Slack is not supported on ${stdenv.system}"; + throw "Slack is not supported on ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation { name = "slack-${version}"; diff --git a/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix b/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix index 0745836271a..0985f139238 100644 --- a/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix @@ -44,12 +44,12 @@ let plat = { "i686-linux" = "i386"; "x86_64-linux" = "amd64"; - }.${stdenv.system}; + }.${stdenv.hostPlatform.system}; sha256 = { "i686-linux" = "071ddh2d8wmiybwafwyb97962zj358l0fq7g2r44231653sgybvq"; "x86_64-linux" = "0qp9ms94smnm7k47b0n0jdzvnm1b7gj25hyinsfc6lghrb6jqw3r"; - }.${stdenv.system}; + }.${stdenv.hostPlatform.system}; in stdenv.mkDerivation rec { diff --git a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix index afc6f03edb4..882215c50c5 100644 --- a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix +++ b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook, env +{ stdenv, fetchurl, makeWrapper, makeDesktopItem, autoPatchelfHook, env # Dynamic libraries , dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative , qtimageformats, qtlocation, qtquickcontrols, qtquickcontrols2, qtscript, qtsvg @@ -31,7 +31,7 @@ let in stdenv.mkDerivation { name = "zoom-us-${version}"; - src = srcs.${system}; + src = srcs.${stdenv.hostPlatform.system}; nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; diff --git a/pkgs/applications/networking/insync/default.nix b/pkgs/applications/networking/insync/default.nix index e718dc6562f..fee19de0e8d 100644 --- a/pkgs/applications/networking/insync/default.nix +++ b/pkgs/applications/networking/insync/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { name = "insync-${version}"; version = "1.4.5.37069"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "http://s.insynchq.com/builds/insync-portable_${version}_amd64.tar.bz2"; sha256 = "0mkqgpq4isngkj20c0ygmxf4cj975d446svhwvl3cqdrjkjm1ybd"; } else - throw "${name} is not supported on ${stdenv.system}"; + throw "${name} is not supported on ${stdenv.hostPlatform.system}"; buildInputs = [ makeWrapper ]; diff --git a/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix b/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix index 3376eebe5dc..3d8673a87a1 100644 --- a/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix +++ b/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix @@ -33,13 +33,13 @@ stdenv.mkDerivation rec { subVersion = "fec7941"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://edgehill.s3.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb"; sha256 = "40060aa1dc3b5187b8ed4a07b9de3427e3c5a291df98c2c82395647fa2aa4ada"; } else - throw "NylasMail is not supported on ${stdenv.system}"; + throw "NylasMail is not supported on ${stdenv.hostPlatform.system}"; propagatedBuildInputs = [ alsaLib diff --git a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix index b9b553f9447..cf68a268619 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix @@ -47,7 +47,7 @@ with (import ./release_sources.nix); let - arch = if stdenv.system == "i686-linux" + arch = if stdenv.hostPlatform.system == "i686-linux" then "linux-i686" else "linux-x86_64"; diff --git a/pkgs/applications/networking/p2p/frostwire/default.nix b/pkgs/applications/networking/p2p/frostwire/default.nix index 7b854fce6c5..40ff91e792b 100644 --- a/pkgs/applications/networking/p2p/frostwire/default.nix +++ b/pkgs/applications/networking/p2p/frostwire/default.nix @@ -75,7 +75,7 @@ in stdenv.mkDerivation { cp ${ { x86_64-darwin = "desktop/lib/native/*.dylib"; x86_64-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}.so"; i686-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}X86.so"; - }.${stdenv.system} or (throw "unsupported system ${stdenv.system}") + }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}") } $out/lib cp -dpR ${desktopItem}/share $out diff --git a/pkgs/applications/networking/p2p/soulseekqt/default.nix b/pkgs/applications/networking/p2p/soulseekqt/default.nix index 44e434aa8ee..12ed680482f 100644 --- a/pkgs/applications/networking/p2p/soulseekqt/default.nix +++ b/pkgs/applications/networking/p2p/soulseekqt/default.nix @@ -37,7 +37,7 @@ in stdenv.mkDerivation rec { name = "soulseekqt-${version}"; inherit version; - src = srcs."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}"); + src = srcs."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}"); dontBuild = true; diff --git a/pkgs/applications/networking/remote/anydesk/default.nix b/pkgs/applications/networking/remote/anydesk/default.nix index 0f107936be6..cb3814b55f1 100644 --- a/pkgs/applications/networking/remote/anydesk/default.nix +++ b/pkgs/applications/networking/remote/anydesk/default.nix @@ -6,12 +6,12 @@ let sha256 = { "x86_64-linux" = "0g19sac4j3m1nf400vn6qcww7prqg2p4k4zsj74i109kk1396aa2"; "i686-linux" = "1dd4ai2pclav9g872xil3x67bxy32gvz9pb3w76383pcsdh5zh45"; - }."${stdenv.system}" or (throw "system ${stdenv.system} not supported"); + }."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported"); arch = { "x86_64-linux" = "amd64"; "i686-linux" = "i686"; - }."${stdenv.system}" or (throw "system ${stdenv.system} not supported"); + }."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported"); description = "Desktop sharing application, providing remote support and online meetings"; diff --git a/pkgs/applications/networking/resilio-sync/default.nix b/pkgs/applications/networking/resilio-sync/default.nix index 0db18e77bfa..b59219d9936 100644 --- a/pkgs/applications/networking/resilio-sync/default.nix +++ b/pkgs/applications/networking/resilio-sync/default.nix @@ -4,7 +4,7 @@ let arch = { "x86_64-linux" = "x64"; "i686-linux" = "i386"; - }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); + }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ]; in stdenv.mkDerivation rec { @@ -16,7 +16,7 @@ in stdenv.mkDerivation rec { sha256 = { "x86_64-linux" = "0041axi9carspkfaxvyirfvsa29zz55al01x90nh93nzxvpvywsz"; "i686-linux" = "1ar36lp4f6a1z9i82g3gpak4q4ny09faqxdd59q1pvfzq25ypdhs"; - }.${stdenv.system}; + }.${stdenv.hostPlatform.system}; }; dontStrip = true; # Don't strip, otherwise patching the rpaths breaks diff --git a/pkgs/applications/networking/spideroak/default.nix b/pkgs/applications/networking/spideroak/default.nix index c1f3d62af73..c07ad715afd 100644 --- a/pkgs/applications/networking/spideroak/default.nix +++ b/pkgs/applications/networking/spideroak/default.nix @@ -4,17 +4,17 @@ }: let - arch = if stdenv.system == "x86_64-linux" then "x64" - else if stdenv.system == "i686-linux" then "x86" - else throw "Spideroak client for: ${stdenv.system} not supported!"; + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" + else if stdenv.hostPlatform.system == "i686-linux" then "x86" + else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!"; - interpreter = if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" - else if stdenv.system == "i686-linux" then "ld-linux.so.2" - else throw "Spideroak client for: ${stdenv.system} not supported!"; + interpreter = if stdenv.hostPlatform.system == "x86_64-linux" then "ld-linux-x86-64.so.2" + else if stdenv.hostPlatform.system == "i686-linux" then "ld-linux.so.2" + else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!"; - sha256 = if stdenv.system == "x86_64-linux" then "a88e5a8fe4a565ac500668bd53cf5784752d7c9253304ddce39ee7b01d078533" - else if stdenv.system == "i686-linux" then "668f3b83a974a3877d16c8743c233a427ea0a44ab84b7f9aec19a2995db66c16" - else throw "Spideroak client for: ${stdenv.system} not supported!"; + sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "a88e5a8fe4a565ac500668bd53cf5784752d7c9253304ddce39ee7b01d078533" + else if stdenv.hostPlatform.system == "i686-linux" then "668f3b83a974a3877d16c8743c233a427ea0a44ab84b7f9aec19a2995db66c16" + else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!"; ldpath = stdenv.lib.makeLibraryPath [ fontconfig freetype glib libICE libSM diff --git a/pkgs/applications/networking/super-productivity/default.nix b/pkgs/applications/networking/super-productivity/default.nix index 59872afaad9..9bb4254c64a 100644 --- a/pkgs/applications/networking/super-productivity/default.nix +++ b/pkgs/applications/networking/super-productivity/default.nix @@ -44,13 +44,13 @@ let ] + ":${stdenv.cc.cc.lib}/lib64"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity_${version}_amd64.deb"; sha256 = "0jfi0lfijnhij9jvkhxgyvq8m1jzaym8n1c7707fv3hjh1h0vxn1"; } else - throw "super-productivity is not supported on ${stdenv.system}"; + throw "super-productivity is not supported on ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation { name = "super-productivity-${version}"; diff --git a/pkgs/applications/office/jameica/default.nix b/pkgs/applications/office/jameica/default.nix index fdc6c58213a..8d17ef2acaa 100644 --- a/pkgs/applications/office/jameica/default.nix +++ b/pkgs/applications/office/jameica/default.nix @@ -6,10 +6,10 @@ let version = "${_version}-${_build}"; name = "jameica-${version}"; - swtSystem = if stdenv.system == "i686-linux" then "linux" - else if stdenv.system == "x86_64-linux" then "linux64" - else if stdenv.system == "x86_64-darwin" then "macos64" - else throw "Unsupported system: ${stdenv.system}"; + swtSystem = if stdenv.hostPlatform.system == "i686-linux" then "linux" + else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" + else if stdenv.hostPlatform.system == "x86_64-darwin" then "macos64" + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; desktopItem = makeDesktopItem { name = "jameica"; diff --git a/pkgs/applications/office/mendeley/default.nix b/pkgs/applications/office/mendeley/default.nix index 693fa63661b..5b6271db83b 100644 --- a/pkgs/applications/office/mendeley/default.nix +++ b/pkgs/applications/office/mendeley/default.nix @@ -37,7 +37,7 @@ let arch32 = "i686-linux"; - arch = if stdenv.system == arch32 + arch = if stdenv.hostPlatform.system == arch32 then "i386" else "amd64"; @@ -46,7 +46,7 @@ let version = "${shortVersion}_${arch}"; url = "http://desktop-download.mendeley.com/download/apt/pool/main/m/mendeleydesktop/mendeleydesktop_${version}.deb"; - sha256 = if stdenv.system == arch32 + sha256 = if stdenv.hostPlatform.system == arch32 then "0fcyl5i8xdgb5j0x1643qc0j74d8p11jczvqmgqkqh0wgid1y1ad" else "1dzwa2cnn9xakrhhq159fhh71gw5wlbf017rrikdlia694m8akq6"; diff --git a/pkgs/applications/office/moneyplex/default.nix b/pkgs/applications/office/moneyplex/default.nix index 47d2ecc81ea..9f4ed80e6d8 100644 --- a/pkgs/applications/office/moneyplex/default.nix +++ b/pkgs/applications/office/moneyplex/default.nix @@ -21,8 +21,8 @@ stdenv.mkDerivation rec { name = "moneyplex-${version}"; version = "16.0.22424"; - src = fetchurl (if stdenv.system == "i686-linux" then src_i686 - else if stdenv.system == "x86_64-linux" then src_x86_64 + src = fetchurl (if stdenv.hostPlatform.system == "i686-linux" then src_i686 + else if stdenv.hostPlatform.system == "x86_64-linux" then src_x86_64 else throw "moneyplex requires i686-linux or x86_64-linux"); diff --git a/pkgs/applications/office/wpsoffice/default.nix b/pkgs/applications/office/wpsoffice/default.nix index 46faf9ba651..4c83d67f7cd 100644 --- a/pkgs/applications/office/wpsoffice/default.nix +++ b/pkgs/applications/office/wpsoffice/default.nix @@ -3,7 +3,7 @@ , zlib, libpng12, libICE, libXrender, cups }: let - bits = if stdenv.system == "x86_64-linux" then "x86_64" + bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "x86"; version = "10.1.0.5672"; diff --git a/pkgs/applications/science/electronics/eagle/eagle7.nix b/pkgs/applications/science/electronics/eagle/eagle7.nix index 9b8827187b2..d5720440f7c 100644 --- a/pkgs/applications/science/electronics/eagle/eagle7.nix +++ b/pkgs/applications/science/electronics/eagle/eagle7.nix @@ -17,18 +17,18 @@ stdenv.mkDerivation rec { version = "7.7.0"; src = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "ftp://ftp.cadsoft.de/eagle/program/7.7/eagle-lin32-${version}.run"; sha256 = "16fa66p77xigc7zvzfm7737mllrcs6nrgk2p7wvkjw3p9lvbz7z1"; } - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "ftp://ftp.cadsoft.de/eagle/program/7.7/eagle-lin64-${version}.run"; sha256 = "18dcn6wqph1sqh0ah98qzfi05wip8a8ifbkaq79iskbrsi8iqnrg"; } else - throw "Unsupported system: ${stdenv.system}"; + throw "Unsupported system: ${stdenv.hostPlatform.system}"; desktopItem = makeDesktopItem { name = "eagle"; diff --git a/pkgs/applications/science/logic/isabelle/default.nix b/pkgs/applications/science/logic/isabelle/default.nix index ae04c11d959..ffe50856955 100644 --- a/pkgs/applications/science/logic/isabelle/default.nix +++ b/pkgs/applications/science/logic/isabelle/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation { rm -rf $comp/x86* done '' + (if ! stdenv.isLinux then "" else '' - arch=${if stdenv.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"} + arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"} for f in contrib/*/$arch/{bash_process,epclextract,eprover,nunchaku,SPASS}; do patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" done diff --git a/pkgs/applications/science/logic/saw-tools/default.nix b/pkgs/applications/science/logic/saw-tools/default.nix index 65d2b4d91c3..32ebdad51d9 100644 --- a/pkgs/applications/science/logic/saw-tools/default.nix +++ b/pkgs/applications/science/logic/saw-tools/default.nix @@ -12,7 +12,7 @@ let url = "https://github.com/GaloisInc/saw-script/releases/download"; saw-bin = - if stdenv.system == "i686-linux" + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = url + "/v0.1.1-dev/saw-0.1.1-dev-2015-07-31-CentOS6-32.tar.gz"; sha256 = "126iag5nnvndi78c921z7vjrjfwcspn1hlxwwhzmqm4rvbhhr9v9"; diff --git a/pkgs/applications/science/math/mathematica/10.nix b/pkgs/applications/science/math/mathematica/10.nix index 4884ee1f93a..c6802c3719e 100644 --- a/pkgs/applications/science/math/mathematica/10.nix +++ b/pkgs/applications/science/math/mathematica/10.nix @@ -18,7 +18,7 @@ let platform = - if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then "Linux" else throw "Mathematica requires i686-linux or x86_64 linux"; @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { ]); ldpath = stdenv.lib.makeLibraryPath buildInputs - + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") + + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); phases = "unpackPhase installPhase fixupPhase"; diff --git a/pkgs/applications/science/math/mathematica/9.nix b/pkgs/applications/science/math/mathematica/9.nix index d60feb54695..1023e7ca3d5 100644 --- a/pkgs/applications/science/math/mathematica/9.nix +++ b/pkgs/applications/science/math/mathematica/9.nix @@ -16,7 +16,7 @@ let platform = - if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then "Linux" else throw "Mathematica requires i686-linux or x86_64 linux"; @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { ]); ldpath = stdenv.lib.makeLibraryPath buildInputs - + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") + + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); phases = "unpackPhase installPhase fixupPhase"; diff --git a/pkgs/applications/science/math/mathematica/default.nix b/pkgs/applications/science/math/mathematica/default.nix index fa4ff8b0068..165a5660557 100644 --- a/pkgs/applications/science/math/mathematica/default.nix +++ b/pkgs/applications/science/math/mathematica/default.nix @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { ]); ldpath = stdenv.lib.makeLibraryPath buildInputs - + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") + + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); phases = "unpackPhase installPhase fixupPhase"; diff --git a/pkgs/applications/science/math/scilab-bin/default.nix b/pkgs/applications/science/math/scilab-bin/default.nix index dacd3e73073..54b262fe505 100644 --- a/pkgs/applications/science/math/scilab-bin/default.nix +++ b/pkgs/applications/science/math/scilab-bin/default.nix @@ -10,9 +10,9 @@ let badArch = throw "${name} requires i686-linux or x86_64-linux"; architecture = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then "i686" - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else badArch; @@ -23,9 +23,9 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://www.scilab.org/download/${ver}/scilab-${ver}.bin.linux-${architecture}.tar.gz"; sha256 = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then "0fgjc2ak3b2qi6yin3fy50qwk2bcj0zbz1h4lyyic9n1n1qcliib" - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then "1scswlznc14vyzg0gqa1q9gcpwx05kz1sbn563463mzkdp7nd35d" else badArch; diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix index 01a4f402302..e56284ac5c5 100644 --- a/pkgs/applications/search/recoll/default.nix +++ b/pkgs/applications/search/recoll/default.nix @@ -5,7 +5,7 @@ , ghostscript, gawk, gnugrep, gnused, gnutar, gzip, libiconv, zlib , withGui ? true }: -assert stdenv.system != "powerpc-linux"; +assert stdenv.hostPlatform.system != "powerpc-linux"; stdenv.mkDerivation rec { ver = "1.23.7"; diff --git a/pkgs/applications/video/lightworks/default.nix b/pkgs/applications/video/lightworks/default.nix index 64a967001b5..4bfd9e79007 100644 --- a/pkgs/applications/video/lightworks/default.nix +++ b/pkgs/applications/video/lightworks/default.nix @@ -23,12 +23,12 @@ let name = "lightworks-${version}"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "http://downloads.lwks.com/v14/lwks-14.0.0-amd64.deb"; sha256 = "66eb9f9678d979db76199f1c99a71df0ddc017bb47dfda976b508849ab305033"; } - else throw "${name} is not supported on ${stdenv.system}"; + else throw "${name} is not supported on ${stdenv.hostPlatform.system}"; buildInputs = [ dpkg makeWrapper ]; diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix index 02a0c2c0ec4..e017e7cc001 100644 --- a/pkgs/applications/video/mplayer/default.nix +++ b/pkgs/applications/video/mplayer/default.nix @@ -60,13 +60,13 @@ let let dir = http://www.mplayerhq.hu/MPlayer/releases/codecs/; in - if stdenv.system == "i686-linux" then fetchurl { + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "${dir}/essential-20071007.tar.bz2"; sha256 = "18vls12n12rjw0mzw4pkp9vpcfmd1c21rzha19d7zil4hn7fs2ic"; - } else if stdenv.system == "x86_64-linux" then fetchurl { + } else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "${dir}/essential-amd64-20071007.tar.bz2"; sha256 = "13xf5b92w1ra5hw00ck151lypbmnylrnznq9hhb0sj36z5wz290x"; - } else if stdenv.system == "powerpc-linux" then fetchurl { + } else if stdenv.hostPlatform.system == "powerpc-linux" then fetchurl { url = "${dir}/essential-ppc-20071007.tar.bz2"; sha256 = "18mlj8dp4wnz42xbhdk1jlz2ygra6fbln9wyrcyvynxh96g1871z"; } else null; diff --git a/pkgs/applications/video/webtorrent_desktop/default.nix b/pkgs/applications/video/webtorrent_desktop/default.nix index c99aed0c1af..086190000ab 100644 --- a/pkgs/applications/video/webtorrent_desktop/default.nix +++ b/pkgs/applications/video/webtorrent_desktop/default.nix @@ -42,13 +42,13 @@ version = "0.20.0"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v0.20.0/webtorrent-desktop_${version}-1_amd64.deb"; sha256 = "1kkrnbimiip5pn2nwpln35bbdda9gc3cgrjwphq4fqasbjf2781k"; } else - throw "Webtorrent is not currently supported on ${stdenv.system}"; + throw "Webtorrent is not currently supported on ${stdenv.hostPlatform.system}"; phases = [ "unpackPhase" "installPhase" ]; nativeBuildInputs = [ dpkg ]; unpackPhase = "dpkg-deb -x $src ."; diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index f9058ef89b6..bbb2a099666 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -22,7 +22,7 @@ with stdenv.lib; let - audio = optionalString (hasSuffix "linux" stdenv.system) "alsa," + audio = optionalString (hasSuffix "linux" stdenv.hostPlatform.system) "alsa," + optionalString pulseSupport "pa," + optionalString sdlSupport "sdl,"; diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix index dcc58b04c8e..cb7bcad3592 100644 --- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix +++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix @@ -44,23 +44,23 @@ stdenv.mkDerivation { ''; buildCommand = with xorg; '' - ${if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then '' + ${if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then '' isoinfo -J -i $src -x /VBoxLinuxAdditions.run > ./VBoxLinuxAdditions.run chmod 755 ./VBoxLinuxAdditions.run ./VBoxLinuxAdditions.run --noexec --keep '' - else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") + else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions") } # Unpack files cd install - ${if stdenv.system == "i686-linux" then '' + ${if stdenv.hostPlatform.system == "i686-linux" then '' tar xfvj VBoxGuestAdditions-x86.tar.bz2 '' - else if stdenv.system == "x86_64-linux" then '' + else if stdenv.hostPlatform.system == "x86_64-linux" then '' tar xfvj VBoxGuestAdditions-amd64.tar.bz2 '' - else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") + else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions") } cd ../ @@ -81,13 +81,13 @@ stdenv.mkDerivation { # Change the interpreter for various binaries for i in sbin/VBoxService bin/{VBoxClient,VBoxControl} other/mount.vboxsf do - ${if stdenv.system == "i686-linux" then '' + ${if stdenv.hostPlatform.system == "i686-linux" then '' patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $i '' - else if stdenv.system == "x86_64-linux" then '' + else if stdenv.hostPlatform.system == "x86_64-linux" then '' patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $i '' - else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") + else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions") } patchelf --set-rpath ${lib.makeLibraryPath [ stdenv.cc.cc dbus libX11 libXt libXext libXmu libXfixes libXrandr libXcursor ]} $i done diff --git a/pkgs/applications/window-managers/i3/default.nix b/pkgs/applications/window-managers/i3/default.nix index 513fe06df8f..5c95b9daf25 100644 --- a/pkgs/applications/window-managers/i3/default.nix +++ b/pkgs/applications/window-managers/i3/default.nix @@ -36,9 +36,9 @@ stdenv.mkDerivation rec { # they shouldn't, and then even once that's fixed have some # perl-related errors later on. For more, see # https://github.com/NixOS/nixpkgs/issues/7957 - doCheck = false; # stdenv.system == "x86_64-linux"; + doCheck = false; # stdenv.hostPlatform.system == "x86_64-linux"; - checkPhase = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") + checkPhase = stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") '' (cd testcases && xvfb-run ./complete-run.pl -p 1 --keep-xserver-output) ! grep -q '^not ok' testcases/latest/complete-run.log diff --git a/pkgs/build-support/build-fhs-userenv/env.nix b/pkgs/build-support/build-fhs-userenv/env.nix index d951fb9ab06..23568f51b23 100644 --- a/pkgs/build-support/build-fhs-userenv/env.nix +++ b/pkgs/build-support/build-fhs-userenv/env.nix @@ -1,4 +1,4 @@ -{ stdenv, buildEnv, writeText, pkgs, pkgsi686Linux, system }: +{ stdenv, buildEnv, writeText, pkgs, pkgsi686Linux }: { name, profile ? "" , targetPkgs ? pkgs: [], multiPkgs ? pkgs: [] @@ -22,7 +22,7 @@ # /lib will link to /lib32 let - is64Bit = system == "x86_64-linux"; + is64Bit = stdenv.hostPlatform.parsed.cpu.bits == 64; isMultiBuild = multiPkgs != null && is64Bit; isTargetBuild = !isMultiBuild; diff --git a/pkgs/build-support/release/nix-build.nix b/pkgs/build-support/release/nix-build.nix index d42538c7e5d..feda54de46f 100644 --- a/pkgs/build-support/release/nix-build.nix +++ b/pkgs/build-support/release/nix-build.nix @@ -148,7 +148,7 @@ stdenv.mkDerivation ( postPhases = postPhases ++ ["finalPhase"]; meta = (if args ? meta then args.meta else {}) // { - description = if doCoverageAnalysis then "Coverage analysis" else "Nix package for ${stdenv.system}"; + description = if doCoverageAnalysis then "Coverage analysis" else "Nix package for ${stdenv.hostPlatform.system}"; }; } diff --git a/pkgs/build-support/vm/windows/controller/default.nix b/pkgs/build-support/vm/windows/controller/default.nix index 17803a28330..e000308bed8 100644 --- a/pkgs/build-support/vm/windows/controller/default.nix +++ b/pkgs/build-support/vm/windows/controller/default.nix @@ -157,7 +157,7 @@ let "-net vde,vlan=0,sock=$QEMU_VDE_SOCKET" ]); - maybeKvm64 = optional (stdenv.system == "x86_64-linux") "-cpu kvm64"; + maybeKvm64 = optional (stdenv.hostPlatform.system == "x86_64-linux") "-cpu kvm64"; cygwinQemuArgs = concatStringsSep " " (maybeKvm64 ++ [ "-monitor unix:$MONITOR_SOCKET,server,nowait" diff --git a/pkgs/build-support/vm/windows/cygwin-iso/default.nix b/pkgs/build-support/vm/windows/cygwin-iso/default.nix index 2c46d5fae90..76cd41a75bc 100644 --- a/pkgs/build-support/vm/windows/cygwin-iso/default.nix +++ b/pkgs/build-support/vm/windows/cygwin-iso/default.nix @@ -17,7 +17,7 @@ let }; cygwinCross = (import ../../../../.. { - inherit (stdenv) system; + localSystem = stdenv.hostPlatform; crossSystem = { libc = "msvcrt"; platform = {}; diff --git a/pkgs/development/arduino/arduino-core/default.nix b/pkgs/development/arduino/arduino-core/default.nix index a427023df56..269df6a07cd 100644 --- a/pkgs/development/arduino/arduino-core/default.nix +++ b/pkgs/development/arduino/arduino-core/default.nix @@ -13,15 +13,19 @@ assert withTeensyduino -> withGui; # xdotool script; the cause of this hang is not yet known. # TODO: There is a fair chance that Teensyduino works with arm-linux, but it # has not yet been tested. -if withTeensyduino && (stdenv.system != "x86_64-linux") then throw +if withTeensyduino && (stdenv.hostPlatform.system != "x86_64-linux") then throw "Teensyduino is only supported on x86_64-linux at this time (patches welcome)." else let - externalDownloads = import ./downloads.nix {inherit fetchurl; inherit (lib) optionalAttrs; inherit (stdenv) system;}; + externalDownloads = import ./downloads.nix { + inherit fetchurl; + inherit (lib) optionalAttrs; + inherit (stdenv.hostPlatform) system; + }; # Some .so-files are later copied from .jar-s to $HOME, so patch them beforehand patchelfInJars = - lib.optional (stdenv.system == "x86_64-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86_64.so";} - ++ lib.optional (stdenv.system == "i686-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86.so";} + lib.optional (stdenv.hostPlatform.system == "x86_64-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86_64.so";} + ++ lib.optional (stdenv.hostPlatform.system == "i686-linux") {jar = "share/arduino/lib/jssc-2.8.0-arduino1.jar"; file = "libs/linux/libjSSC-2.8_x86.so";} ; # abiVersion 6 is default, but we need 5 for `avrdude_bin` executable ncurses5 = ncurses.override { abiVersion = "5"; }; @@ -46,9 +50,9 @@ let zlib ]; teensy_architecture = - lib.optionalString (stdenv.system == "x86_64-linux") "linux64" - + lib.optionalString (stdenv.system == "i686-linux") "linux32" - + lib.optionalString (stdenv.system == "arm-linux") "linuxarm"; + lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "linux64" + + lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "linux32" + + lib.optionalString (stdenv.hostPlatform.system == "arm-linux") "linuxarm"; flavor = (if withTeensyduino then "teensyduino" else "arduino") + stdenv.lib.optionalString (!withGui) "-core"; diff --git a/pkgs/development/compilers/ccl/default.nix b/pkgs/development/compilers/ccl/default.nix index 9570b0eead8..ae6af8dd4b4 100644 --- a/pkgs/development/compilers/ccl/default.nix +++ b/pkgs/development/compilers/ccl/default.nix @@ -29,7 +29,7 @@ let }; armv6l-linux = armv7l-linux; }; - cfg = options."${stdenv.system}" or (throw "missing source url for platform ${stdenv.system}"); + cfg = options."${stdenv.hostPlatform.system}" or (throw "missing source url for platform ${stdenv.hostPlatform.system}"); in stdenv.mkDerivation rec { diff --git a/pkgs/development/compilers/clean/default.nix b/pkgs/development/compilers/clean/default.nix index 16ac8b78721..cc6197922fd 100644 --- a/pkgs/development/compilers/clean/default.nix +++ b/pkgs/development/compilers/clean/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { name = "clean-2.4"; src = - if stdenv.system == "i686-linux" then (fetchurl { + if stdenv.hostPlatform.system == "i686-linux" then (fetchurl { url = "http://clean.cs.ru.nl/download/Clean24/linux/clean2.4_boot.tar.gz"; sha256 = "1w8vvmkwzq8g51639r62apcy75sj69nm08082a34xvqm9ymfgkq5"; }) - else if stdenv.system == "x86_64-linux" then (fetchurl { + else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl { url = "https://clean.cs.ru.nl/download/Clean24/linux/clean2.4_64_boot.tar.gz"; sha256 = "08gsa1pjl5wyzh4ah8ccfx8a7mdcn6ycsn1lzkrr9adygv1gmm7r"; }) diff --git a/pkgs/development/compilers/cmucl/binary.nix b/pkgs/development/compilers/cmucl/binary.nix index 2833c5378c1..9e3184c42eb 100644 --- a/pkgs/development/compilers/cmucl/binary.nix +++ b/pkgs/development/compilers/cmucl/binary.nix @@ -1,7 +1,7 @@ {stdenv, fetchurl}: let - inherit (stdenv) system; + inherit (stdenv.hostPlatform) system; version = "21b"; downloadUrl = arch: "http://common-lisp.net/project/cmucl/downloads/release/" + diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index ce487c3c0e2..aa1c85ebcb0 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -15,14 +15,14 @@ stdenv.mkDerivation rec { "x86_64-linux" = "linux-x86_64"; "i686-linux" = "linux-i686"; "x86_64-darwin" = "darwin-x86_64"; - }."${stdenv.system}" or (throw "system ${stdenv.system} not supported"); + }."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported"); in fetchurl { url = "https://github.com/crystal-lang/crystal/releases/download/0.26.0/${prebuiltName}-${arch}.tar.gz"; sha256 = { "x86_64-linux" = "1xban102yiiwmlklxvn3xp3q546bp8hlxxpakayajkhhnpl6yv45"; "i686-linux" = "1igspf1lrv7wpmz0pfrkbx8m1ykvnv4zhic53cav4nicppm2v0ic"; "x86_64-darwin" = "0hzc65ccajr0yhmvi5vbdgbzbp1gbjy56da24ds3zwwkam1ddk0k"; - }."${stdenv.system}"; + }."${stdenv.hostPlatform.system}"; }; unpackPhase = '' diff --git a/pkgs/development/compilers/fpc/binary.nix b/pkgs/development/compilers/fpc/binary.nix index 0ecf4437c9a..cf13ab6f595 100644 --- a/pkgs/development/compilers/fpc/binary.nix +++ b/pkgs/development/compilers/fpc/binary.nix @@ -4,17 +4,17 @@ stdenv.mkDerivation { name = "fpc-2.6.0-binary"; src = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "mirror://sourceforge/project/freepascal/Linux/2.6.0/fpc-2.6.0.i386-linux.tar"; sha256 = "08yklvrfxvk59bxsd4rh1i6s3cjn0q06dzjs94h9fbq3n1qd5zdf"; } - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "mirror://sourceforge/project/freepascal/Linux/2.6.0/fpc-2.6.0.x86_64-linux.tar"; sha256 = "0k9vi75k39y735fng4jc2vppdywp82j4qhzn7x4r6qjkad64d8lx"; } - else throw "Not supported on ${stdenv.system}."; + else throw "Not supported on ${stdenv.hostPlatform.system}."; builder = ./binary-builder.sh; diff --git a/pkgs/development/compilers/fpc/default.nix b/pkgs/development/compilers/fpc/default.nix index 51544783d8c..b516019ffc9 100644 --- a/pkgs/development/compilers/fpc/default.nix +++ b/pkgs/development/compilers/fpc/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ startFPC gawk ]; preConfigure = - if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then '' + if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then '' sed -e "s@'/lib/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas sed -e "s@'/lib64/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas '' else ""; diff --git a/pkgs/development/compilers/ghcjs-ng/default.nix b/pkgs/development/compilers/ghcjs-ng/default.nix index ddabb7ca6bf..5db2777c8bb 100644 --- a/pkgs/development/compilers/ghcjs-ng/default.nix +++ b/pkgs/development/compilers/ghcjs-ng/default.nix @@ -59,7 +59,7 @@ let }; bootGhcjs = haskellLib.justStaticExecutables passthru.bootPkgs.ghcjs; - libexec = "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin" "i686"] ["osx" "i386"] stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}"; + libexec = "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin" "i686"] ["osx" "i386"] stdenv.buildPlatform.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}"; in stdenv.mkDerivation { name = bootGhcjs.name; diff --git a/pkgs/development/compilers/go/1.10.nix b/pkgs/development/compilers/go/1.10.nix index 513d0307f6b..fa4b4abafde 100644 --- a/pkgs/development/compilers/go/1.10.nix +++ b/pkgs/development/compilers/go/1.10.nix @@ -134,12 +134,12 @@ stdenv.mkDerivation rec { GOOS = if stdenv.isDarwin then "darwin" else "linux"; GOARCH = if stdenv.isDarwin then "amd64" - else if stdenv.system == "i686-linux" then "386" - else if stdenv.system == "x86_64-linux" then "amd64" + else if stdenv.hostPlatform.system == "i686-linux" then "386" + else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" else if stdenv.isAarch32 then "arm" else if stdenv.isAarch64 then "arm64" else throw "Unsupported system"; - GOARM = optionalString (stdenv.system == "armv5tel-linux") "5"; + GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5"; GO386 = 387; # from Arch: don't assume sse2 on i686 CGO_ENABLED = 1; GOROOT_BOOTSTRAP = "${goBootstrap}/share/go"; diff --git a/pkgs/development/compilers/go/1.11.nix b/pkgs/development/compilers/go/1.11.nix index eddd16dc199..55cc654b0aa 100644 --- a/pkgs/development/compilers/go/1.11.nix +++ b/pkgs/development/compilers/go/1.11.nix @@ -134,12 +134,12 @@ stdenv.mkDerivation rec { GOOS = if stdenv.isDarwin then "darwin" else "linux"; GOARCH = if stdenv.isDarwin then "amd64" - else if stdenv.system == "i686-linux" then "386" - else if stdenv.system == "x86_64-linux" then "amd64" - else if stdenv.isAarch32 then "arm" - else if stdenv.isAarch64 then "arm64" + else if stdenv.targetPlatform.isi686 then "386" + else if stdenv.targetPlatform.isx86_64 then "amd64" + else if stdenv.targetPlatform.isAarch32 then "arm" + else if stdenv.targetPlatform.isAarch64 then "arm64" else throw "Unsupported system"; - GOARM = optionalString (stdenv.system == "armv5tel-linux") "5"; + GOARM = stdenv.targetPlatform.parsed.cpu.version or ""; GO386 = 387; # from Arch: don't assume sse2 on i686 CGO_ENABLED = 1; GOROOT_BOOTSTRAP = "${goBootstrap}/share/go"; diff --git a/pkgs/development/compilers/go/1.4.nix b/pkgs/development/compilers/go/1.4.nix index 32eb0d98d18..40fd3f15786 100644 --- a/pkgs/development/compilers/go/1.4.nix +++ b/pkgs/development/compilers/go/1.4.nix @@ -128,11 +128,11 @@ stdenv.mkDerivation rec { GOOS = if stdenv.isDarwin then "darwin" else "linux"; GOARCH = if stdenv.isDarwin then "amd64" - else if stdenv.system == "i686-linux" then "386" - else if stdenv.system == "x86_64-linux" then "amd64" + else if stdenv.hostPlatform.system == "i686-linux" then "386" + else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" else if stdenv.isAarch32 then "arm" else throw "Unsupported system"; - GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5"; + GOARM = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5"; GO386 = 387; # from Arch: don't assume sse2 on i686 CGO_ENABLED = 0; diff --git a/pkgs/development/compilers/go/1.9.nix b/pkgs/development/compilers/go/1.9.nix index d46e40f460b..48f16c3ffa5 100644 --- a/pkgs/development/compilers/go/1.9.nix +++ b/pkgs/development/compilers/go/1.9.nix @@ -134,12 +134,12 @@ stdenv.mkDerivation rec { GOOS = if stdenv.isDarwin then "darwin" else "linux"; GOARCH = if stdenv.isDarwin then "amd64" - else if stdenv.system == "i686-linux" then "386" - else if stdenv.system == "x86_64-linux" then "amd64" + else if stdenv.hostPlatform.system == "i686-linux" then "386" + else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" else if stdenv.isAarch32 then "arm" else if stdenv.isAarch64 then "arm64" else throw "Unsupported system"; - GOARM = optionalString (stdenv.system == "armv5tel-linux") "5"; + GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5"; GO386 = 387; # from Arch: don't assume sse2 on i686 CGO_ENABLED = 1; GOROOT_BOOTSTRAP = "${goBootstrap}/share/go"; diff --git a/pkgs/development/compilers/jetbrains-jdk/default.nix b/pkgs/development/compilers/jetbrains-jdk/default.nix index 1c62f79f907..39fab8b25d8 100644 --- a/pkgs/development/compilers/jetbrains-jdk/default.nix +++ b/pkgs/development/compilers/jetbrains-jdk/default.nix @@ -10,13 +10,13 @@ let drv = stdenv.mkDerivation rec { version = "152b1248.6"; name = pname + "-" + version; - src = if stdenv.system == "x86_64-linux" then + src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbsdk8u${version}_linux_x64.tar.gz"; sha256 = "12l81g8zhaymh4rzyfl9nyzmpkgzc7wrphm3j4plxx129yn9i7d7"; } else - throw "unsupported system: ${stdenv.system}"; + throw "unsupported system: ${stdenv.hostPlatform.system}"; nativeBuildInputs = [ file ]; diff --git a/pkgs/development/compilers/julia/default.nix b/pkgs/development/compilers/julia/default.nix index 84fdf8f9786..086570f5ce2 100644 --- a/pkgs/development/compilers/julia/default.nix +++ b/pkgs/development/compilers/julia/default.nix @@ -101,7 +101,7 @@ stdenv.mkDerivation rec { makeFlags = let - arch = head (splitString "-" stdenv.system); + arch = head (splitString "-" stdenv.hostPlatform.system); march = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}" or (throw "unsupported architecture: ${arch}"); # Julia requires Pentium 4 (SSE2) or better diff --git a/pkgs/development/compilers/mlton/default.nix b/pkgs/development/compilers/mlton/default.nix index 583f6f80137..6b6907b0b2e 100644 --- a/pkgs/development/compilers/mlton/default.nix +++ b/pkgs/development/compilers/mlton/default.nix @@ -14,15 +14,15 @@ stdenv.mkDerivation rec { name = "mlton-${version}"; binSrc = - if stdenv.system == "i686-linux" then (fetchurl { + if stdenv.hostPlatform.system == "i686-linux" then (fetchurl { url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.x86-linux.tgz"; sha256 = "1kxjjmnw4xk2d9hpvz43w9dvyhb3025k4zvjx785c33nrwkrdn4j"; }) - else if stdenv.system == "x86_64-linux" then (fetchurl { + else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl { url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.amd64-linux.tgz"; sha256 = "0fyhwxb4nmpirjbjcvk9f6w67gmn2gkz7xcgz0xbfih9kc015ygn"; }) - else if stdenv.system == "x86_64-darwin" then (fetchurl { + else if stdenv.hostPlatform.system == "x86_64-darwin" then (fetchurl { url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.amd64-darwin.gmp-macports.tgz"; sha256 = "044wnh9hhg6if886xy805683k0as347xd37r0r1yi4x7qlxzzgx9"; }) diff --git a/pkgs/development/compilers/mozart/binary.nix b/pkgs/development/compilers/mozart/binary.nix index ebe562fcde3..ef6cd1160b3 100644 --- a/pkgs/development/compilers/mozart/binary.nix +++ b/pkgs/development/compilers/mozart/binary.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { preferLocalBuild = true; - src = binaries."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}"); + src = binaries."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}"); libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc diff --git a/pkgs/development/compilers/nvidia-cg-toolkit/default.nix b/pkgs/development/compilers/nvidia-cg-toolkit/default.nix index 21ccf77e4a2..b6e2aea7eca 100644 --- a/pkgs/development/compilers/nvidia-cg-toolkit/default.nix +++ b/pkgs/development/compilers/nvidia-cg-toolkit/default.nix @@ -10,17 +10,17 @@ stdenv.mkDerivation rec { name = "nvidia-cg-toolkit-${version}"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86_64.tgz"; sha256 = "e8ff01e6cc38d1b3fd56a083f5860737dbd2f319a39037528fb1a74a89ae9878"; } - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "http://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86.tgz"; sha256 = "cef3591e436f528852db0e8c145d3842f920e0c89bcfb219c466797cb7b18879"; } - else throw "nvidia-cg-toolkit does not support platform ${stdenv.system}"; + else throw "nvidia-cg-toolkit does not support platform ${stdenv.hostPlatform.system}"; installPhase = '' for b in cgc cgfxcat cginfo diff --git a/pkgs/development/compilers/opendylan/bin.nix b/pkgs/development/compilers/opendylan/bin.nix index 1abf44f2349..9b721312bb7 100644 --- a/pkgs/development/compilers/opendylan/bin.nix +++ b/pkgs/development/compilers/opendylan/bin.nix @@ -5,15 +5,15 @@ stdenv.mkDerivation { name = "opendylan-2013.2"; - src = if stdenv.system == "x86_64-linux" then fetchurl { + src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86_64-linux.tar.bz2; sha256 = "035brbw3hm7zrs593q4zc42yglj1gmmkw3b1r7zzlw3ks4i2lg7h"; } - else if stdenv.system == "i686-linux" then fetchurl { + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86-linux.tar.bz2; sha256 = "0c61ihvblcsjrw6ncr8x8ylhskcrqs8pajs4mg5di36cvqw12nq5"; } - else throw "platform ${stdenv.system} not supported."; + else throw "platform ${stdenv.hostPlatform.system} not supported."; buildInputs = [ patchelf boehmgc gnused makeWrapper ]; diff --git a/pkgs/development/compilers/opendylan/default.nix b/pkgs/development/compilers/opendylan/default.nix index 17d474359da..8e732d7d8bf 100644 --- a/pkgs/development/compilers/opendylan/default.nix +++ b/pkgs/development/compilers/opendylan/default.nix @@ -11,11 +11,11 @@ stdenv.mkDerivation { fetchSubmodules = true; }; - buildInputs = (if stdenv.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [ + buildInputs = (if stdenv.hostPlatform.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [ opendylan-bootstrap boehmgc gnused autoconf automake perl makeWrapper ]; - preConfigure = if stdenv.system == "i686-linux" then '' + preConfigure = if stdenv.hostPlatform.system == "i686-linux" then '' mkdir -p $TMPDIR/mps tar --strip-components=1 -xf ${mps.src} -C $TMPDIR/mps ./autogen.sh @@ -25,7 +25,7 @@ stdenv.mkDerivation { ''; configureFlags = [ - (if stdenv.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}") + (if stdenv.hostPlatform.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}") ]; buildPhase = "make 3-stage-bootstrap"; diff --git a/pkgs/development/compilers/openjdk/10.nix b/pkgs/development/compilers/openjdk/10.nix index 6e8d9003bf4..750a4efe496 100644 --- a/pkgs/development/compilers/openjdk/10.nix +++ b/pkgs/development/compilers/openjdk/10.nix @@ -13,7 +13,7 @@ let * The JRE libraries are in directories that depend on the CPU. */ architecture = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then "i386" else "amd64"; diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix index baa136b798d..5d55e0554e5 100644 --- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix +++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix @@ -46,7 +46,7 @@ let x86_64-linux = "amd64"; armv7l-linux = "arm"; aarch64-linux = "aarch64"; - }.${stdenv.system}; + }.${stdenv.hostPlatform.system}; jce = if installjce then @@ -77,9 +77,9 @@ let result = stdenv.mkDerivation rec { x86_64-linux = "jdk-${productVersion}u${patchVersion}-linux-x64.tar.gz"; armv7l-linux = "jdk-${productVersion}u${patchVersion}-linux-arm32-vfp-hflt.tar.gz"; aarch64-linux = "jdk-${productVersion}u${patchVersion}-linux-arm64-vfp-hflt.tar.gz"; - }.${stdenv.system}; + }.${stdenv.hostPlatform.system}; url = downloadUrl; - sha256 = sha256.${stdenv.system}; + sha256 = sha256.${stdenv.hostPlatform.system}; }; nativeBuildInputs = [ file ] diff --git a/pkgs/development/compilers/orc/default.nix b/pkgs/development/compilers/orc/default.nix index 9fc9007abb9..3f3db48828d 100644 --- a/pkgs/development/compilers/orc/default.nix +++ b/pkgs/development/compilers/orc/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { ''; # https://bugzilla.gnome.org/show_bug.cgi?id=728129#c15 - doCheck = stdenv.system != "i686-linux"; # not sure about cross-compiling + doCheck = stdenv.hostPlatform.system != "i686-linux"; # not sure about cross-compiling meta = with stdenv.lib; { description = "The Oil Runtime Compiler"; diff --git a/pkgs/development/compilers/picat/default.nix b/pkgs/development/compilers/picat/default.nix index 8ee904a6ed6..b520a5e703c 100644 --- a/pkgs/development/compilers/picat/default.nix +++ b/pkgs/development/compilers/picat/default.nix @@ -8,8 +8,8 @@ stdenv.mkDerivation { sha256 = "0wvl95gf4pjs93632g4wi0mw1glzzhjp9g4xg93ll2zxggbxibli"; }; - ARCH = if stdenv.system == "i686-linux" then "linux32" - else if stdenv.system == "x86_64-linux" then "linux64" + ARCH = if stdenv.hostPlatform.system == "i686-linux" then "linux32" + else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" else throw "Unsupported system"; hardeningDisable = [ "format" ]; diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix index 563250097ae..901675ff31b 100644 --- a/pkgs/development/compilers/rust/bootstrap.nix +++ b/pkgs/development/compilers/rust/bootstrap.nix @@ -16,19 +16,19 @@ let }; platform = - if stdenv.system == "i686-linux" + if stdenv.hostPlatform.system == "i686-linux" then "i686-unknown-linux-gnu" - else if stdenv.system == "x86_64-linux" + else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-unknown-linux-gnu" - else if stdenv.system == "armv7l-linux" + else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7-unknown-linux-gnueabihf" - else if stdenv.system == "aarch64-linux" + else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64-unknown-linux-gnu" - else if stdenv.system == "i686-darwin" + else if stdenv.hostPlatform.system == "i686-darwin" then "i686-apple-darwin" - else if stdenv.system == "x86_64-darwin" + else if stdenv.hostPlatform.system == "x86_64-darwin" then "x86_64-apple-darwin" - else throw "missing bootstrap url for platform ${stdenv.system}"; + else throw "missing bootstrap url for platform ${stdenv.hostPlatform.system}"; src = fetchurl { url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz"; diff --git a/pkgs/development/compilers/sbcl/bootstrap.nix b/pkgs/development/compilers/sbcl/bootstrap.nix index 529123398a5..ee662d39e45 100644 --- a/pkgs/development/compilers/sbcl/bootstrap.nix +++ b/pkgs/development/compilers/sbcl/bootstrap.nix @@ -39,9 +39,9 @@ let sha256 = "05c12fmac4ha72k1ckl6i780rckd7jh4g5s5hiic7fjxnf1kx8d0"; }; }; - cfg = options.${stdenv.system}; + cfg = options.${stdenv.hostPlatform.system}; in -assert builtins.hasAttr stdenv.system options; +assert builtins.hasAttr stdenv.hostPlatform.system options; stdenv.mkDerivation rec { name = "sbcl-bootstrap-${version}"; version = cfg.version; diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix index 261a2fb6432..a860aa7dc73 100644 --- a/pkgs/development/compilers/sbcl/default.nix +++ b/pkgs/development/compilers/sbcl/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, writeText, sbclBootstrap , sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit" -, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.system) +, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system) # Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die. # Note that the created binaries still need `patchelf --set-interpreter ...` # to get rid of ${glibc} dependency. diff --git a/pkgs/development/interpreters/dart/default.nix b/pkgs/development/interpreters/dart/default.nix index ae7f8686b78..4c697ec4e80 100644 --- a/pkgs/development/interpreters/dart/default.nix +++ b/pkgs/development/interpreters/dart/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation { unzip ]; - src = sources."${version}-${stdenv.system}" or (throw "unsupported version/system: ${version}/${stdenv.system}"); + src = sources."${version}-${stdenv.hostPlatform.system}" or (throw "unsupported version/system: ${version}/${stdenv.hostPlatform.system}"); installPhase = '' mkdir -p $out diff --git a/pkgs/development/interpreters/spidermonkey/1.8.5.nix b/pkgs/development/interpreters/spidermonkey/1.8.5.nix index bd53450de4e..46637195586 100644 --- a/pkgs/development/interpreters/spidermonkey/1.8.5.nix +++ b/pkgs/development/interpreters/spidermonkey/1.8.5.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { # of polkit, which is what matters most, it does not override the allocator # so the failure of that test does not matter much. configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ] ++ - stdenv.lib.optionals (stdenv.system == "armv5tel-linux") [ + stdenv.lib.optionals (stdenv.hostPlatform.system == "armv5tel-linux") [ "--with-cpu-arch=armv5t" "--disable-tracejit" ]; diff --git a/pkgs/development/libraries/apr/default.nix b/pkgs/development/libraries/apr/default.nix index 7d7acf90a95..705f61445b5 100644 --- a/pkgs/development/libraries/apr/default.nix +++ b/pkgs/development/libraries/apr/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { configureFlags = # Including the Windows headers breaks unistd.h. # Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2 - stdenv.lib.optional (stdenv.system == "i686-cygwin") "ac_cv_header_windows_h=no"; + stdenv.lib.optional (stdenv.hostPlatform.system == "i686-cygwin") "ac_cv_header_windows_h=no"; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/audio/libbass/default.nix b/pkgs/development/libraries/audio/libbass/default.nix index ec93e2f6467..390ca6bb04b 100644 --- a/pkgs/development/libraries/audio/libbass/default.nix +++ b/pkgs/development/libraries/audio/libbass/default.nix @@ -41,8 +41,8 @@ let dontBuild = true; installPhase = let so = - if bass.so ? ${stdenv.system} then bass.so.${stdenv.system} - else throw "${name} not packaged for ${stdenv.system} (yet)."; + if bass.so ? ${stdenv.hostPlatform.system} then bass.so.${stdenv.hostPlatform.system} + else throw "${name} not packaged for ${stdenv.hostPlatform.system} (yet)."; in '' mkdir -p $out/{lib,include} install -m644 -t $out/lib/ ${so} diff --git a/pkgs/development/libraries/bootil/default.nix b/pkgs/development/libraries/bootil/default.nix index 160f6230594..b64cdd5245f 100644 --- a/pkgs/development/libraries/bootil/default.nix +++ b/pkgs/development/libraries/bootil/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { platform = if stdenv.isLinux then "linux" else if stdenv.isDarwin then "macosx" - else throw "unrecognized system ${stdenv.system}"; + else throw "unrecognized system ${stdenv.hostPlatform.system}"; buildInputs = [ premake4 ]; diff --git a/pkgs/development/libraries/crypto++/default.nix b/pkgs/development/libraries/crypto++/default.nix index ba5b2aa4371..cbd3e405415 100644 --- a/pkgs/development/libraries/crypto++/default.nix +++ b/pkgs/development/libraries/crypto++/default.nix @@ -12,9 +12,10 @@ stdenv.mkDerivation rec { sha256 = "1yk7jyf4va9425cg05llskpls2jm7n3jwy2hj5jm74zkr4mwpvl7"; }; - patches = with stdenv; - lib.optional (system != "i686-cygwin") ./dll.patch - ++ lib.optional isDarwin ./GNUmakefile-darwin.patch; + patches = stdenv.lib.concatLists [ + (stdenv.lib.optional (stdenv.hostPlatform.system != "i686-cygwin") ./dll.patch) + (stdenv.lib.optional stdenv.hostPlatform.isDarwin ./GNUmakefile-darwin.patch) + ]; configurePhase = let diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index b3b00a1c722..71fe23ea6b0 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -7,7 +7,10 @@ , withPython ? false, swig2 ? null, python ? null }: -let inherit (stdenv) lib system; in +let + inherit (stdenv) lib; + inherit (stdenv.hostPlatform) system; +in stdenv.mkDerivation rec { name = "gpgme-${version}"; diff --git a/pkgs/development/libraries/gsl/default.nix b/pkgs/development/libraries/gsl/default.nix index 37d4843db8d..8a419d67865 100644 --- a/pkgs/development/libraries/gsl/default.nix +++ b/pkgs/development/libraries/gsl/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { ]; # https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html - doCheck = stdenv.system != "i686-linux" && stdenv.system != "aarch64-linux"; + doCheck = stdenv.hostPlatform.system != "i686-linux" && stdenv.hostPlatform.system != "aarch64-linux"; meta = { description = "The GNU Scientific Library, a large numerical library"; diff --git a/pkgs/development/libraries/java/jzmq/default.nix b/pkgs/development/libraries/java/jzmq/default.nix index 7d229d2577a..402f893034b 100644 --- a/pkgs/development/libraries/java/jzmq/default.nix +++ b/pkgs/development/libraries/java/jzmq/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ zeromq3 jdk ]; preConfigure = '' - ${if stdenv.system == "x86_64-darwin" then + ${if stdenv.hostPlatform.system == "x86_64-darwin" then '' sed -i -e 's~/Headers~/include~' -e 's~_JNI_INC_SUBDIRS=\".*\"~_JNI_INC_SUBDIRS=\"darwin\"~' configure '' else ""} ''; diff --git a/pkgs/development/libraries/java/swt/default.nix b/pkgs/development/libraries/java/swt/default.nix index 1a7153f99e6..0aa20f8b014 100644 --- a/pkgs/development/libraries/java/swt/default.nix +++ b/pkgs/development/libraries/java/swt/default.nix @@ -16,7 +16,7 @@ let sha256 = "00k1mfbncvyh8klgmk0891w8jwnd5niqb16j1j8yacrm2smmlb05"; }; }; - metadata = assert platformMap ? ${stdenv.system}; platformMap.${stdenv.system}; + metadata = assert platformMap ? ${stdenv.hostPlatform.system}; platformMap.${stdenv.hostPlatform.system}; in stdenv.mkDerivation rec { version = "4.5"; diff --git a/pkgs/development/libraries/libspotify/default.nix b/pkgs/development/libraries/libspotify/default.nix index 3a01ff2944d..e472fe014ee 100644 --- a/pkgs/development/libraries/libspotify/default.nix +++ b/pkgs/development/libraries/libspotify/default.nix @@ -2,26 +2,26 @@ let version = "12.1.51"; - isLinux = (stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux"); + isLinux = (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "i686-linux"); in -if (stdenv.system != "x86_64-linux" && stdenv.system != "x86_64-darwin" && stdenv.system != "i686-linux") +if (stdenv.hostPlatform.system != "x86_64-linux" && stdenv.hostPlatform.system != "x86_64-darwin" && stdenv.hostPlatform.system != "i686-linux") then throw "Check https://developer.spotify.com/technologies/libspotify/ for a tarball for your system and add it here" else stdenv.mkDerivation { name = "libspotify-${version}"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-x86_64-release.tar.gz"; sha256 = "0n0h94i4xg46hfba95n3ypah93crwb80bhgsg00f6sms683lx8a3"; } - else if stdenv.system == "x86_64-darwin" then + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Darwin-universal.zip"; sha256 = "1gcgrc8arim3hnszcc886lmcdb4iigc08abkaa02l6gng43ky1c0"; } - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-i686-release.tar.gz"; sha256 = "1bjmn64gbr4p9irq426yap4ipq9rb84zsyhjjr7frmmw22xb86ll"; @@ -46,7 +46,7 @@ else stdenv.mkDerivation { # darwin-specific - buildInputs = stdenv.lib.optional (stdenv.system == "x86_64-darwin") unzip; + buildInputs = stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") unzip; # linux-specific installFlags = stdenv.lib.optionalString (isLinux) diff --git a/pkgs/development/libraries/live555/default.nix b/pkgs/development/libraries/live555/default.nix index e0cf3328bac..4dd5d8bcd26 100644 --- a/pkgs/development/libraries/live555/default.nix +++ b/pkgs/development/libraries/live555/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation { i686-linux = "linux"; x86_64-linux = "linux-64bit"; aarch64-linux = "linux-64bit"; - }.${stdenv.system}} + }.${stdenv.hostPlatform.system}} ''; installPhase = '' diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index e1a9477dcd6..063ed381e01 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -23,7 +23,7 @@ with stdenv.lib; -if ! lists.elem stdenv.system platforms.mesaPlatforms then +if ! lists.elem stdenv.hostPlatform.system platforms.mesaPlatforms then throw "unsupported platform for Mesa" else diff --git a/pkgs/development/libraries/nettle/generic.nix b/pkgs/development/libraries/nettle/generic.nix index 3af93469cf1..2ef367b6c53 100644 --- a/pkgs/development/libraries/nettle/generic.nix +++ b/pkgs/development/libraries/nettle/generic.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation (rec { nativeBuildInputs = [ gnum4 ]; propagatedBuildInputs = [ gmp ]; - doCheck = (stdenv.system != "i686-cygwin" && !stdenv.isDarwin); + doCheck = (stdenv.hostPlatform.system != "i686-cygwin" && !stdenv.isDarwin); enableParallelBuilding = true; - patches = stdenv.lib.optional (stdenv.system == "i686-cygwin") + patches = stdenv.lib.optional (stdenv.hostPlatform.system == "i686-cygwin") ./cygwin.patch; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index e97aa0d391e..81d106a2a40 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -63,11 +63,11 @@ let sha256 = "1ys9mshfpm8iy8h4ml792gnqrq959dsrcv26axx14niivxyjbji8"; } + "/ippicv"; files = let name = platform : "ippicv_2017u3_${platform}_general_20180518.tgz"; in - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then { ${name "lnx_intel64"} = "b7cc351267db2d34b9efa1cd22ff0572"; } - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then { ${name "lnx_ia32"} = "ea72de74dae3c604eb6348395366e78e"; } - else if stdenv.system == "x86_64-darwin" then + else if stdenv.hostPlatform.system == "x86_64-darwin" then { ${name "mac_intel64"} = "3ae52b9be0fe73dd45bc5e9429cd3732"; } else throw "ICV is not available for this platform (or not yet supported by this package)"; diff --git a/pkgs/development/libraries/oracle-instantclient/default.nix b/pkgs/development/libraries/oracle-instantclient/default.nix index 0c05e2ec5f6..fe260e0c2ad 100644 --- a/pkgs/development/libraries/oracle-instantclient/default.nix +++ b/pkgs/development/libraries/oracle-instantclient/default.nix @@ -14,12 +14,12 @@ let sha256 = hash; }); - throwSystem = throw "Unsupported system: ${stdenv.system}"; + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; arch = { "x86_64-linux" = "linux.x64"; "x86_64-darwin" = "macos.x64"; - }."${stdenv.system}" or throwSystem; + }."${stdenv.hostPlatform.system}" or throwSystem; srcs = { "x86_64-linux" = [ @@ -32,7 +32,7 @@ let (requireSource "sdk" arch version "2" "e0befca9c4e71ebc9f444957ffa70f01aeeec5976ea27c40406471b04c34848b") (requireSource "sqlplus" arch version "2" "d147cbb5b2a954fdcb4b642df4f0bd1153fd56e0f56e7fa301601b4f7e2abe0e") ] ++ optional odbcSupport (requireSource "odbc" arch version "2" "1805c1ab6c8c5e8df7bdcc35d7f2b94c329ecf4dff9bde55d5f9b159ecd8b64e"); - }."${stdenv.system}" or throwSystem; + }."${stdenv.hostPlatform.system}" or throwSystem; extLib = stdenv.hostPlatform.extensions.sharedLibrary; in stdenv.mkDerivation rec { diff --git a/pkgs/development/libraries/physics/geant4/fetch.nix b/pkgs/development/libraries/physics/geant4/fetch.nix index 7dc4c865627..5d539b480d7 100644 --- a/pkgs/development/libraries/physics/geant4/fetch.nix +++ b/pkgs/development/libraries/physics/geant4/fetch.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl }: let - fetch = { version, src ? builtins.getAttr stdenv.system sources, sources ? null }: + fetch = { version, src ? builtins.getAttr stdenv.hostPlatform.system sources, sources ? null }: { inherit version src; }; diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index 18483f9e327..b5efdc58584 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -67,15 +67,15 @@ in let config = - configs.${stdenv.system} - or (throw "unsupported system: ${stdenv.system}"); + configs.${stdenv.hostPlatform.system} + or (throw "unsupported system: ${stdenv.hostPlatform.system}"); in let blas64 = if blas64_ != null then blas64_ - else hasPrefix "x86_64" stdenv.system; + else hasPrefix "x86_64" stdenv.hostPlatform.system; in stdenv.mkDerivation rec { name = "openblas-${version}"; diff --git a/pkgs/development/libraries/scmccid/default.nix b/pkgs/development/libraries/scmccid/default.nix index f88bd64f597..b305fecc393 100644 --- a/pkgs/development/libraries/scmccid/default.nix +++ b/pkgs/development/libraries/scmccid/default.nix @@ -5,11 +5,11 @@ assert stdenv ? cc && stdenv.cc.libc != null; stdenv.mkDerivation rec { name = "scmccid-5.0.11"; - src = if stdenv.system == "i686-linux" then (fetchurl { + src = if stdenv.hostPlatform.system == "i686-linux" then (fetchurl { url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux.tar.gz"; sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm"; }) - else if stdenv.system == "x86_64-linux" then (fetchurl { + else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl { url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux_x64.tar.gz"; sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i"; }) diff --git a/pkgs/development/libraries/skalibs/default.nix b/pkgs/development/libraries/skalibs/default.nix index b3f5e12b0ec..9d5bd170e20 100644 --- a/pkgs/development/libraries/skalibs/default.nix +++ b/pkgs/development/libraries/skalibs/default.nix @@ -33,7 +33,7 @@ in stdenv.mkDerivation rec { # Explicitly setting target ensures code can be compiled against a skalibs # binary built on a different version of darwin. # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/skalibs diff --git a/pkgs/development/libraries/tachyon/default.nix b/pkgs/development/libraries/tachyon/default.nix index d5d12e44df0..27ac0fdd5ff 100644 --- a/pkgs/development/libraries/tachyon/default.nix +++ b/pkgs/development/libraries/tachyon/default.nix @@ -34,15 +34,15 @@ stdenv.mkDerivation rec { export USEPNG=" -DUSEPNG" export PNGLIB=" -lpng -lz" ''; - arch = if stdenv.system == "x86_64-linux" then "linux-64-thr" else - if stdenv.system == "i686-linux" then "linux-thr" else - if stdenv.system == "aarch64-linux" then "linux-arm-thr" else - if stdenv.system == "armv7l-linux" then "linux-arm-thr" else - if stdenv.system == "x86_64-darwin" then "macosx-thr" else - if stdenv.system == "i686-darwin" then "macosx-64-thr" else - if stdenv.system == "i686-cygwin" then "win32" else - if stdenv.system == "x86_64-freebsd" then "bsd" else - if stdenv.system == "x686-freebsd" then "bsd" else + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "linux-64-thr" else + if stdenv.hostPlatform.system == "i686-linux" then "linux-thr" else + if stdenv.hostPlatform.system == "aarch64-linux" then "linux-arm-thr" else + if stdenv.hostPlatform.system == "armv7l-linux" then "linux-arm-thr" else + if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx-thr" else + if stdenv.hostPlatform.system == "i686-darwin" then "macosx-64-thr" else + if stdenv.hostPlatform.system == "i686-cygwin" then "win32" else + if stdenv.hostPlatform.system == "x86_64-freebsd" then "bsd" else + if stdenv.hostPlatform.system == "x686-freebsd" then "bsd" else throw "Don't know what arch to select for tachyon build"; makeFlags = "${arch}"; patches = [ diff --git a/pkgs/development/libraries/v8/3.14.nix b/pkgs/development/libraries/v8/3.14.nix index ce666becc85..827274251ed 100644 --- a/pkgs/development/libraries/v8/3.14.nix +++ b/pkgs/development/libraries/v8/3.14.nix @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { installPhase = '' install -vD out/Release/d8 "$out/bin/d8" - ${if stdenv.system == "x86_64-darwin" then '' + ${if stdenv.hostPlatform.system == "x86_64-darwin" then '' install -vD out/Release/lib.target/libv8.dylib "$out/lib/libv8.dylib" '' else '' install -vD out/Release/lib.target/libv8.so "$out/lib/libv8.so" diff --git a/pkgs/development/libraries/vigra/default.nix b/pkgs/development/libraries/vigra/default.nix index 4a002becdb3..12c166beacb 100644 --- a/pkgs/development/libraries/vigra/default.nix +++ b/pkgs/development/libraries/vigra/default.nix @@ -21,7 +21,7 @@ in stdenv.mkDerivation rec { preConfigure = "cmakeFlags+=\" -DVIGRANUMPY_INSTALL_DIR=$out/lib/${python.libPrefix}/site-packages\""; cmakeFlags = [ "-DWITH_OPENEXR=1" ] - ++ stdenv.lib.optionals (stdenv.system == "x86_64-linux") + ++ stdenv.lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") [ "-DCMAKE_CXX_FLAGS=-fPIC" "-DCMAKE_C_FLAGS=-fPIC" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/vxl/default.nix b/pkgs/development/libraries/vxl/default.nix index b9f3c0e64d6..777b8bb1f40 100644 --- a/pkgs/development/libraries/vxl/default.nix +++ b/pkgs/development/libraries/vxl/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { # in stdenv linux headers # BUILD_BRL fails to find open() cmakeFlags = "-DBUILD_TESTING=OFF -DBUILD_OUL=OFF -DBUILD_BRL=OFF -DBUILD_CONTRIB=OFF " - + (if stdenv.system == "x86_64-linux" then + + (if stdenv.hostPlatform.system == "x86_64-linux" then "-DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC" else ""); diff --git a/pkgs/development/libraries/wtk/default.nix b/pkgs/development/libraries/wtk/default.nix index 0ed4f24ef86..2791c97f5ae 100644 --- a/pkgs/development/libraries/wtk/default.nix +++ b/pkgs/development/libraries/wtk/default.nix @@ -1,6 +1,6 @@ { stdenv, requireFile, unzip, xorg }: -assert stdenv.system == "i686-linux"; +assert stdenv.hostPlatform.system == "i686-linux"; stdenv.mkDerivation rec { name = "sun-java-wtk-2.5.2_01"; diff --git a/pkgs/development/misc/amdapp-sdk/default.nix b/pkgs/development/misc/amdapp-sdk/default.nix index 7da0fc148d4..79651db23ea 100644 --- a/pkgs/development/misc/amdapp-sdk/default.nix +++ b/pkgs/development/misc/amdapp-sdk/default.nix @@ -5,10 +5,10 @@ let - bits = if stdenv.system == "x86_64-linux" then "64" + bits = if stdenv.hostPlatform.system == "x86_64-linux" then "64" else "32"; - arch = if stdenv.system == "x86_64-linux" then "x86_64" + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "x86"; src_info = { diff --git a/pkgs/development/mobile/androidenv/androidndk.nix b/pkgs/development/mobile/androidenv/androidndk.nix index 972c8a5dfbc..3ccdb237f89 100644 --- a/pkgs/development/mobile/androidenv/androidndk.nix +++ b/pkgs/development/mobile/androidenv/androidndk.nix @@ -10,10 +10,10 @@ stdenv.mkDerivation rec { name = "android-ndk-r${version}"; inherit version; - src = if stdenv.system == "x86_64-linux" then fetchurl { + src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://dl.google.com/android/repository/${name}-linux-x86_64.zip"; inherit sha256; - } else throw "platform ${stdenv.system} not supported!"; + } else throw "platform ${stdenv.hostPlatform.system} not supported!"; phases = "buildPhase"; diff --git a/pkgs/development/mobile/androidenv/androidndk_r8e.nix b/pkgs/development/mobile/androidenv/androidndk_r8e.nix index 3c12e16277d..68d2150f972 100644 --- a/pkgs/development/mobile/androidenv/androidndk_r8e.nix +++ b/pkgs/development/mobile/androidenv/androidndk_r8e.nix @@ -9,16 +9,16 @@ stdenv.mkDerivation rec { name = "android-ndk-r8e"; - src = if stdenv.system == "i686-linux" + src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "http://dl.google.com/android/ndk/${name}-linux-x86.tar.bz2"; sha256 = "c2c4e0c8b3037149a0f5dbb08d72f814a52af4da9fff9d80328c675457e95a98"; } - else if stdenv.system == "x86_64-linux" then fetchurl { + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "http://dl.google.com/android/ndk/${name}-linux-x86_64.tar.bz2"; sha256 = "093gf55zbh38p2gk5bdykj1vg9p5l774wjdzw5mhk4144jm1wdq7"; } - else throw "platform ${stdenv.system} not supported!"; + else throw "platform ${stdenv.hostPlatform.system} not supported!"; phases = "buildPhase"; diff --git a/pkgs/development/mobile/androidenv/androidsdk.nix b/pkgs/development/mobile/androidenv/androidsdk.nix index 503e4f5c889..5f61f25d54e 100644 --- a/pkgs/development/mobile/androidenv/androidsdk.nix +++ b/pkgs/development/mobile/androidenv/androidsdk.nix @@ -22,16 +22,16 @@ stdenv.mkDerivation rec { name = "android-sdk-${version}"; version = "25.2.5"; - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") + src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl { url = "https://dl.google.com/android/repository/tools_r${version}-linux.zip"; sha256 = "0gnk49pkwy4m0nqwm1xnf3w4mfpi9w0kk7841xlawpwbkj0icxap"; } - else if stdenv.system == "x86_64-darwin" then fetchurl { + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { url = "http://dl.google.com/android/repository/tools_r${version}-macosx.zip"; sha256 = "0yg7wjmyw70xsh8k4hgbqb5rilam2a94yc8dwbh7fjwqcmpxgwqb"; } - else throw "platform not ${stdenv.system} supported!"; + else throw "platform not ${stdenv.hostPlatform.system} supported!"; buildCommand = '' mkdir -p $out/libexec @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" "$f" done - ${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") '' # There are a number of native binaries. We must patch them to let them find the interpreter and libstdc++ @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { patchelf --set-rpath ${stdenv_32bit.cc.cc.lib}/lib $i done - ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") '' + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") '' for i in bin64/{mkfs.ext4,fsck.ext4,e2fsck,tune2fs,resize2fs} do patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { done ''} - ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") '' + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") '' # We must also patch the 64-bit emulator instances, if needed for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service emulator-check qemu/linux-x86_64/qemu-system-* @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { # The emulators need additional libraries, which are dynamically loaded => let's wrap them - ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") '' + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") '' for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service do wrapProgram `pwd`/$i \ @@ -102,7 +102,7 @@ stdenv.mkDerivation rec { patchShebangs . - ${if stdenv.system == "i686-linux" then + ${if stdenv.hostPlatform.system == "i686-linux" then '' # The monitor requires some more patching @@ -115,7 +115,7 @@ stdenv.mkDerivation rec { cd ../.. '' - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then '' # The monitor requires some more patching diff --git a/pkgs/development/mobile/androidenv/build-tools.nix b/pkgs/development/mobile/androidenv/build-tools.nix index 457a9b6720a..85e604bd3f4 100644 --- a/pkgs/development/mobile/androidenv/build-tools.nix +++ b/pkgs/development/mobile/androidenv/build-tools.nix @@ -3,16 +3,16 @@ stdenv.mkDerivation rec { version = "26.0.2"; name = "android-build-tools-r${version}"; - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") + src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl { url = "https://dl.google.com/android/repository/build-tools_r${version}-linux.zip"; sha256 = "1kii880bwhjkc343zwx1ysxyisxhczrwhphnxbwsgi45mjgq8lm7"; } - else if stdenv.system == "x86_64-darwin" then fetchurl { + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { url = "https://dl.google.com/android/repository/build-tools_r${version}-macosx.zip"; sha256 = "1x0ycprl6hgsm23kck5ind7x00hzydc5k3h3ch4a13407xbpvzvx"; } - else throw "System ${stdenv.system} not supported!"; + else throw "System ${stdenv.hostPlatform.system} not supported!"; buildCommand = '' mkdir -p $out/build-tools @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { unzip $src mv android-* ${version} - ${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") '' cd ${version} diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix index 7d7c92cd0f5..4e9f139b95e 100644 --- a/pkgs/development/mobile/androidenv/default.nix +++ b/pkgs/development/mobile/androidenv/default.nix @@ -25,15 +25,15 @@ rec { inherit (pkgs) stdenv fetchurl unzip; }; - platforms = if (pkgs.stdenv.system == "i686-linux" || pkgs.stdenv.system == "x86_64-linux") + platforms = if (pkgs.stdenv.hostPlatform.system == "i686-linux" || pkgs.stdenv.hostPlatform.system == "x86_64-linux") then import ./platforms-linux.nix { inherit (pkgs) stdenv fetchurl unzip; } - else if pkgs.stdenv.system == "x86_64-darwin" + else if pkgs.stdenv.hostPlatform.system == "x86_64-darwin" then import ./platforms-macosx.nix { inherit (pkgs) stdenv fetchurl unzip; } - else throw "Platform: ${pkgs.stdenv.system} not supported!"; + else throw "Platform: ${pkgs.stdenv.hostPlatform.system} not supported!"; sysimages = import ./sysimages.nix { inherit (pkgs) stdenv fetchurl unzip; diff --git a/pkgs/development/mobile/androidenv/platform-tools.nix b/pkgs/development/mobile/androidenv/platform-tools.nix index f5e57994284..22b5cd81f87 100644 --- a/pkgs/development/mobile/androidenv/platform-tools.nix +++ b/pkgs/development/mobile/androidenv/platform-tools.nix @@ -8,16 +8,16 @@ in stdenv.mkDerivation rec { version = "26.0.2"; name = "android-platform-tools-r${version}"; - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") + src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl { url = "https://dl.google.com/android/repository/platform-tools_r${version}-linux.zip"; sha256 = "0695npvxljbbh8xwfm65k34fcpyfkzvfkssgnp46wkmnq8w5mcb3"; } - else if stdenv.system == "x86_64-darwin" then fetchurl { + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { url = "https://dl.google.com/android/repository/platform-tools_r${version}-darwin.zip"; sha256 = "0gy7apw9pmnnm41z6ywglw5va4ghmny4j57778may4q7ar751l56"; } - else throw "System ${stdenv.system} not supported!"; + else throw "System ${stdenv.hostPlatform.system} not supported!"; buildCommand = '' mkdir -p $out @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { unzip $src cd platform-tools - ${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") '' for i in adb dmtracedump fastboot hprof-conv sqlite3 do diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix index 83bd941e5ff..0250e5bf2e2 100644 --- a/pkgs/development/mobile/titaniumenv/build-app.nix +++ b/pkgs/development/mobile/titaniumenv/build-app.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation { name = stdenv.lib.replaceChars [" "] [""] name; inherit src; - buildInputs = [ nodejs titanium alloy jdk python which file ] ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") xcodewrapper; + buildInputs = [ nodejs titanium alloy jdk python which file ] ++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") xcodewrapper; buildPhase = '' ${preBuild} diff --git a/pkgs/development/mobile/titaniumenv/default.nix b/pkgs/development/mobile/titaniumenv/default.nix index b09a483290f..f411a8d61fd 100644 --- a/pkgs/development/mobile/titaniumenv/default.nix +++ b/pkgs/development/mobile/titaniumenv/default.nix @@ -3,7 +3,7 @@ rec { androidenv = pkgs.androidenv; - xcodeenv = if pkgs.stdenv.system == "x86_64-darwin" then pkgs.xcodeenv.override { + xcodeenv = if pkgs.stdenv.hostPlatform.system == "x86_64-darwin" then pkgs.xcodeenv.override { version = xcodeVersion; inherit xcodeBaseDir; } else null; diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix index 26adf373826..b8c2688708b 100644 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix +++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix @@ -2,15 +2,15 @@ stdenv.mkDerivation { name = "mobilesdk-6.3.1.GA"; - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl { + src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl { url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-linux.zip; sha256 = "0g8dqqf5ffa7ll3rqm5naywipnv2vvfxcj9fmqg1wnvvxf0rflqj"; } - else if stdenv.system == "x86_64-darwin" then fetchurl { + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-osx.zip; sha256 = "00bm8vv70mg4kd7jvmxd1bfqafv6zdpdx816i0hvf801zwnak4nj"; } - else throw "Platform: ${stdenv.system} not supported!"; + else throw "Platform: ${stdenv.hostPlatform.system} not supported!"; buildInputs = [ unzip makeWrapper ]; @@ -23,18 +23,18 @@ stdenv.mkDerivation { cd mobilesdk/* mv * 6.3.1.GA cd * - ${stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") '' + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") '' # Fixes a bad archive copying error when generating an IPA file sed -i -e "s|cp -rf|/bin/cp -rf|" iphone/cli/commands/_build.js ''} # Patch some executables - ${if stdenv.system == "i686-linux" then + ${if stdenv.hostPlatform.system == "i686-linux" then '' patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32 '' - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then '' patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64 '' diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix index a6de1f0ae8c..4d3bd420969 100644 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix +++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix @@ -54,15 +54,15 @@ let in stdenv.mkDerivation { name = "mobilesdk-7.1.0.GA"; - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl { + src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl { url = http://builds.appcelerator.com/mobile/7_1_X/mobilesdk-7.1.0.v20180314133955-linux.zip; sha256 = "18b3jnr65sdn5wj191bcl48gvhyklxmighxakv4vrz1fb59kyvqn"; } - else if stdenv.system == "x86_64-darwin" then fetchurl { + else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { url = http://builds.appcelerator.com/mobile/7_1_X/mobilesdk-7.1.0.v20180314133955-osx.zip; sha256 = "1f62616biwsw1fqxz2sq7lpa6bsfjazffliplyf5dpnh298cnc1m"; } - else throw "Platform: ${stdenv.system} not supported!"; + else throw "Platform: ${stdenv.hostPlatform.system} not supported!"; buildInputs = [ unzip makeWrapper ]; @@ -89,11 +89,11 @@ stdenv.mkDerivation { # Patch some executables - ${if stdenv.system == "i686-linux" then + ${if stdenv.hostPlatform.system == "i686-linux" then '' patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32 '' - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then '' patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64 '' diff --git a/pkgs/development/node-packages/default-v10.nix b/pkgs/development/node-packages/default-v10.nix index d7df19066bb..a438c961513 100644 --- a/pkgs/development/node-packages/default-v10.nix +++ b/pkgs/development/node-packages/default-v10.nix @@ -1,8 +1,9 @@ -{pkgs, system, nodejs, stdenv}: +{ pkgs, nodejs, stdenv }: let nodePackages = import ./composition-v10.nix { - inherit pkgs system nodejs; + inherit pkgs nodejs; + inherit (stdenv.hostPlatform) system; }; in nodePackages // { diff --git a/pkgs/development/node-packages/default-v6.nix b/pkgs/development/node-packages/default-v6.nix index 6b508b6f0cc..f4e28d0fd34 100644 --- a/pkgs/development/node-packages/default-v6.nix +++ b/pkgs/development/node-packages/default-v6.nix @@ -1,8 +1,9 @@ -{pkgs, system, nodejs, stdenv}: +{ pkgs, nodejs, stdenv }: let nodePackages = import ./composition-v6.nix { - inherit pkgs system nodejs; + inherit pkgs nodejs; + inherit (stdenv.hostPlatform) system; }; in nodePackages // { diff --git a/pkgs/development/node-packages/default-v8.nix b/pkgs/development/node-packages/default-v8.nix index 561f43271ff..7e3691dcecb 100644 --- a/pkgs/development/node-packages/default-v8.nix +++ b/pkgs/development/node-packages/default-v8.nix @@ -1,8 +1,9 @@ -{pkgs, system, nodejs, stdenv}: +{ pkgs, nodejs, stdenv }: let nodePackages = import ./composition-v8.nix { - inherit pkgs system nodejs; + inherit pkgs nodejs; + inherit (stdenv.hostPlatform) system; }; in nodePackages // { diff --git a/pkgs/development/ruby-modules/testing/stubs.nix b/pkgs/development/ruby-modules/testing/stubs.nix index 7e6d1102f66..aaab2f68960 100644 --- a/pkgs/development/ruby-modules/testing/stubs.nix +++ b/pkgs/development/ruby-modules/testing/stubs.nix @@ -6,7 +6,7 @@ let text = (builtins.toJSON (lib.filterAttrs ( n: v: builtins.any (x: x == n) ["name" "system"]) argSet)); builder = stdenv.shell; args = [ "-c" "echo $(<$textPath) > $out"]; - system = stdenv.system; + system = stdenv.hostPlatform.system; passAsFile = ["text"]; }; fetchurl = {url?"", urls ? [],...}: "fetchurl:${if urls == [] then url else builtins.head urls}"; diff --git a/pkgs/development/tools/analysis/cov-build/default.nix b/pkgs/development/tools/analysis/cov-build/default.nix index fef98f1e04a..bd0a4ee5e40 100644 --- a/pkgs/development/tools/analysis/cov-build/default.nix +++ b/pkgs/development/tools/analysis/cov-build/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { version = "7.0.2"; src = - if stdenv.system == "i686-linux" + if stdenv.hostPlatform.system == "i686-linux" then requireFile { name = "cov-analysis-linux32-${version}.tar.gz"; sha256 = "0i06wbd7blgx9adh9w09by4i18vwmldfp9ix97a5dph2cjymsviy"; diff --git a/pkgs/development/tools/analysis/valgrind/default.nix b/pkgs/development/tools/analysis/valgrind/default.nix index cbcfa981b6b..5734a0f2795 100644 --- a/pkgs/development/tools/analysis/valgrind/default.nix +++ b/pkgs/development/tools/analysis/valgrind/default.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { ''; configureFlags = - stdenv.lib.optional (stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin") "--enable-only64bit"; + stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin") "--enable-only64bit"; doCheck = false; # fails diff --git a/pkgs/development/tools/electron/default.nix b/pkgs/development/tools/electron/default.nix index 695a532305a..942748a3810 100644 --- a/pkgs/development/tools/electron/default.nix +++ b/pkgs/development/tools/electron/default.nix @@ -4,7 +4,7 @@ let version = "1.8.2"; name = "electron-${version}"; - throwSystem = throw "Unsupported system: ${stdenv.system}"; + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; meta = with stdenv.lib; { description = "Cross platform desktop application shell"; @@ -34,7 +34,7 @@ let url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip"; sha256 = "0k4np2d4y15x1qfay8y9m8v9y223vdpbq5fdxa3ywbbyf8j361zd"; }; - }.${stdenv.system} or throwSystem; + }.${stdenv.hostPlatform.system} or throwSystem; buildInputs = [ unzip makeWrapper ]; diff --git a/pkgs/development/tools/github/github-release/default.nix b/pkgs/development/tools/github/github-release/default.nix index 1ccd1061a13..b80ddff054a 100644 --- a/pkgs/development/tools/github/github-release/default.nix +++ b/pkgs/development/tools/github/github-release/default.nix @@ -1,9 +1,9 @@ { stdenv, fetchurl }: let - linuxPredicate = stdenv.system == "x86_64-linux"; - bsdPredicate = stdenv.system == "x86_64-freebsd"; - darwinPredicate = stdenv.system == "x86_64-darwin"; + linuxPredicate = stdenv.hostPlatform.system == "x86_64-linux"; + bsdPredicate = stdenv.hostPlatform.system == "x86_64-freebsd"; + darwinPredicate = stdenv.hostPlatform.system == "x86_64-darwin"; metadata = assert linuxPredicate || bsdPredicate || darwinPredicate; if linuxPredicate then { arch = "linux-amd64"; diff --git a/pkgs/development/tools/google-app-engine-go-sdk/default.nix b/pkgs/development/tools/google-app-engine-go-sdk/default.nix index c85186e1c0b..ba4f4bb3f51 100644 --- a/pkgs/development/tools/google-app-engine-go-sdk/default.nix +++ b/pkgs/development/tools/google-app-engine-go-sdk/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { name = "google-app-engine-go-sdk-${version}"; version = "1.9.61"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip { url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-${version}.zip"; sha256 = "1i2j9ympl1218akwsmm7yb31v0gibgpzlb657bcravi1irfv1hhs"; diff --git a/pkgs/development/tools/misc/cflow/default.nix b/pkgs/development/tools/misc/cflow/default.nix index 8ec0ecd5785..16098bda3ee 100644 --- a/pkgs/development/tools/misc/cflow/default.nix +++ b/pkgs/development/tools/misc/cflow/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ gettext ] ++ # We don't have Emacs/GTK/etc. on {Dar,Cyg}win. stdenv.lib.optional - (! (stdenv.lib.lists.any (x: stdenv.system == x) + (! (stdenv.lib.lists.any (x: stdenv.hostPlatform.system == x) [ "i686-cygwin" ])) emacs; diff --git a/pkgs/development/tools/misc/iozone/default.nix b/pkgs/development/tools/misc/iozone/default.nix index 31d70d280e3..1d5da65df7e 100644 --- a/pkgs/development/tools/misc/iozone/default.nix +++ b/pkgs/development/tools/misc/iozone/default.nix @@ -1,15 +1,15 @@ { stdenv, fetchurl, gnuplot }: let - target = if stdenv.system == "i686-linux" then + target = if stdenv.hostPlatform.system == "i686-linux" then "linux" - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then "linux-AMD64" - else if stdenv.system == "x86_64-darwin" then + else if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx" - else if stdenv.system == "aarch64-linux" then + else if stdenv.hostPlatform.system == "aarch64-linux" then "linux-arm" - else throw "Platform ${stdenv.system} not yet supported."; + else throw "Platform ${stdenv.hostPlatform.system} not yet supported."; in stdenv.mkDerivation rec { diff --git a/pkgs/development/tools/misc/kibana/5.x.nix b/pkgs/development/tools/misc/kibana/5.x.nix index 4aa9dc8b89a..0529a276492 100644 --- a/pkgs/development/tools/misc/kibana/5.x.nix +++ b/pkgs/development/tools/misc/kibana/5.x.nix @@ -6,7 +6,7 @@ let archOverrides = { "i686" = "x86"; }; - info = splitString "-" stdenv.system; + info = splitString "-" stdenv.hostPlatform.system; arch = (elemAt info 0); elasticArch = archOverrides."${arch}" or arch; plat = elemAt info 1; @@ -21,7 +21,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${elasticArch}.tar.gz"; - sha256 = shas."${stdenv.system}" or (throw "Unknown architecture"); + sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture"); }; buildInputs = [ makeWrapper ]; diff --git a/pkgs/development/tools/misc/kibana/default.nix b/pkgs/development/tools/misc/kibana/default.nix index 1fd52f43557..72321f560c7 100644 --- a/pkgs/development/tools/misc/kibana/default.nix +++ b/pkgs/development/tools/misc/kibana/default.nix @@ -12,7 +12,7 @@ with stdenv.lib; let inherit (builtins) elemAt; - info = splitString "-" stdenv.system; + info = splitString "-" stdenv.hostPlatform.system; arch = elemAt info 0; plat = elemAt info 1; shas = @@ -44,7 +44,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${arch}.tar.gz"; - sha256 = shas."${stdenv.system}" or (throw "Unknown architecture"); + sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture"); }; buildInputs = [ makeWrapper ]; diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix index 005fb09fba0..28c2660ac3d 100644 --- a/pkgs/development/tools/misc/lsof/default.nix +++ b/pkgs/development/tools/misc/lsof/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, buildPackages, ncurses }: -let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in +let dialect = with stdenv.lib; last (splitString "-" stdenv.hostPlatform.system); in stdenv.mkDerivation rec { name = "lsof-${version}"; diff --git a/pkgs/development/tools/misc/saleae-logic/default.nix b/pkgs/development/tools/misc/saleae-logic/default.nix index a8183aa4ba0..c89492287db 100644 --- a/pkgs/development/tools/misc/saleae-logic/default.nix +++ b/pkgs/development/tools/misc/saleae-logic/default.nix @@ -27,13 +27,13 @@ stdenv.mkDerivation rec { name = "${pname}-${version}"; src = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { name = "saleae-logic-${version}-32bit.zip"; url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(32-bit).zip"; sha256 = "1dyrj07cgj2fvwi1sk97vady9ri8f8n7mxy9zyzmw9isngs7bmll"; } - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { name = "saleae-logic-${version}-64bit.zip"; url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(64-bit).zip"; diff --git a/pkgs/development/tools/neoload/default.nix b/pkgs/development/tools/neoload/default.nix index c68c29f86de..06945f10eb2 100644 --- a/pkgs/development/tools/neoload/default.nix +++ b/pkgs/development/tools/neoload/default.nix @@ -34,7 +34,7 @@ in stdenv.mkDerivation rec { name = "neoload-4.1.4"; src = fetchurl ( - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then { url = http://neoload.installers.neotys.com/documents/download/neoload/v4.1/neoload_4_1_4_linux_x64.sh; sha256 = "199jcf5a0nwfm8wfld2rcjgq64g91vvz2bkmki8dxfzf1yasifcd"; } else diff --git a/pkgs/development/tools/node-webkit/nw12.nix b/pkgs/development/tools/node-webkit/nw12.nix index df7630e2d16..099e31b8d62 100644 --- a/pkgs/development/tools/node-webkit/nw12.nix +++ b/pkgs/development/tools/node-webkit/nw12.nix @@ -3,7 +3,7 @@ , gdk_pixbuf, cairo, nss, nspr, gconf, expat, systemd, libcap , libnotify}: let - bits = if stdenv.system == "x86_64-linux" then "x64" + bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" else "ia32"; nwEnv = buildEnv { diff --git a/pkgs/development/tools/nwjs/default.nix b/pkgs/development/tools/nwjs/default.nix index 90c377c4472..bd0c7f5002c 100644 --- a/pkgs/development/tools/nwjs/default.nix +++ b/pkgs/development/tools/nwjs/default.nix @@ -7,7 +7,7 @@ , sqlite, udev }: let - bits = if stdenv.system == "x86_64-linux" then "x64" + bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" else "ia32"; nwEnv = buildEnv { diff --git a/pkgs/development/tools/phantomjs/default.nix b/pkgs/development/tools/phantomjs/default.nix index 51a83760be3..43fdeff9090 100644 --- a/pkgs/development/tools/phantomjs/default.nix +++ b/pkgs/development/tools/phantomjs/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { # because it has bundled a lot of external libraries (like QT and Webkit) # and no easy/nice way to use the system versions of these - src = if stdenv.system == "i686-linux" then + src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-i686.tar.bz2"; sha256 = "11fzmssz9pqf3arh4f36w06sl2nyz8l9h8iyxyd7w5aqnq5la0j1"; } else - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-x86_64.tar.bz2"; sha256 = "0fhnqxxsxhy125fmif1lwgnlhfx908spy7fx9mng4w72320n5nd1"; diff --git a/pkgs/development/tools/sauce-connect/default.nix b/pkgs/development/tools/sauce-connect/default.nix index fe32f7c2450..d5f7c8e6e89 100644 --- a/pkgs/development/tools/sauce-connect/default.nix +++ b/pkgs/development/tools/sauce-connect/default.nix @@ -7,10 +7,10 @@ stdenv.mkDerivation rec { version = "4.4.12"; src = fetchurl ( - if stdenv.system == "x86_64-linux" then { + if stdenv.hostPlatform.system == "x86_64-linux" then { url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz"; sha256 = "1yqvx64bgiq27hdhwkzgmzyib8pbjn1idpq6783srxq64asf6iyw"; - } else if stdenv.system == "i686-linux" then { + } else if stdenv.hostPlatform.system == "i686-linux" then { url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz"; sha256 = "02kib56lv4lhwkj5r15484lvvbyjvf9ydi5vccsmxgsxrzmddnl6"; } else { diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix index 238c3bc704d..abbd2a9116c 100644 --- a/pkgs/development/tools/selenium/chromedriver/default.nix +++ b/pkgs/development/tools/selenium/chromedriver/default.nix @@ -15,8 +15,8 @@ let }; }; - spec = allSpecs."${stdenv.system}" - or (throw "missing chromedriver binary for ${stdenv.system}"); + spec = allSpecs."${stdenv.hostPlatform.system}" + or (throw "missing chromedriver binary for ${stdenv.hostPlatform.system}"); libs = stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib diff --git a/pkgs/development/web/remarkjs/default.nix b/pkgs/development/web/remarkjs/default.nix index 03cbf74cbad..22404481f35 100644 --- a/pkgs/development/web/remarkjs/default.nix +++ b/pkgs/development/web/remarkjs/default.nix @@ -13,7 +13,7 @@ let nodePackages = import ./nodepkgs.nix { inherit pkgs; - inherit (stdenv) system; + inherit (stdenv.hostPlatform) system; }; in stdenv.mkDerivation rec { diff --git a/pkgs/games/andyetitmoves/default.nix b/pkgs/games/andyetitmoves/default.nix index 092f0773708..97cbe616c57 100644 --- a/pkgs/games/andyetitmoves/default.nix +++ b/pkgs/games/andyetitmoves/default.nix @@ -7,9 +7,9 @@ in stdenv.mkDerivation rec { name = "${plainName}-${version}"; - src = if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" + src = if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then - let postfix = if stdenv.system == "i686-linux" then "i386" else "x86_64"; + let postfix = if stdenv.hostPlatform.system == "i686-linux" then "i386" else "x86_64"; commercialName = "${plainName}-${version}_${postfix}.tar.gz"; demoUrl = "http://www.andyetitmoves.net/demo/${plainName}Demo-${version}_${postfix}.tar.gz"; in @@ -22,13 +22,13 @@ stdenv.mkDerivation rec { directory where yousaved it. ''; name = commercialName; - sha256 = if stdenv.system == "i686-linux" + sha256 = if stdenv.hostPlatform.system == "i686-linux" then "15wvzmmidvykwjrbnq70h5jrvnjx1hcrm0357qj85q4aqbzavh01" else "1v8z16qa9ka8sf7qq45knsxj87s6sipvv3a7xq11pb5xk08fb2ql"; } else fetchurl { url = demoUrl; - sha256 = if stdenv.system == "i686-linux" + sha256 = if stdenv.hostPlatform.system == "i686-linux" then "0f14vrrbq05hsbdajrb5y9za65fpng1lc8f0adb4aaz27x7sh525" else "0mg41ya0b27blq3b5498kwl4rj46dj21rcd7qd0rw1kyvr7sx4v4"; } diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix index a7b059bb689..4a8c84cf92d 100644 --- a/pkgs/games/dwarf-fortress/dfhack/default.nix +++ b/pkgs/games/dwarf-fortress/dfhack/default.nix @@ -13,8 +13,8 @@ let xmlRev = "23500e4e9bd1885365d0a2ef1746c321c1dd5094"; arch = - if stdenv.system == "x86_64-linux" then "64" - else if stdenv.system == "i686-linux" then "32" + if stdenv.hostPlatform.system == "x86_64-linux" then "64" + else if stdenv.hostPlatform.system == "i686-linux" then "32" else throw "Unsupported architecture"; fakegit = writeScriptBin "git" '' diff --git a/pkgs/games/dwarf-fortress/game.nix b/pkgs/games/dwarf-fortress/game.nix index f57e9703fab..2547bb83f3f 100644 --- a/pkgs/games/dwarf-fortress/game.nix +++ b/pkgs/games/dwarf-fortress/game.nix @@ -33,9 +33,9 @@ let game = if hasAttr dfVersion df-hashes then getAttr dfVersion df-hashes else throw "Unknown Dwarf Fortress version: ${dfVersion}"; - dfPlatform = if hasAttr stdenv.system platforms - then getAttr stdenv.system platforms - else throw "Unsupported system: ${stdenv.system}"; + dfPlatform = if hasAttr stdenv.hostPlatform.system platforms + then getAttr stdenv.hostPlatform.system platforms + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; sha256 = if hasAttr dfPlatform game then getAttr dfPlatform game else throw "Unsupported dfPlatform: ${dfPlatform}"; diff --git a/pkgs/games/eduke32/default.nix b/pkgs/games/eduke32/default.nix index 733b6070b1f..502a554bae2 100644 --- a/pkgs/games/eduke32/default.nix +++ b/pkgs/games/eduke32/default.nix @@ -15,7 +15,7 @@ in stdenv.mkDerivation rec { }; buildInputs = [ flac gtk2 libvorbis libvpx libGLU_combined SDL2 SDL2_mixer ] - ++ stdenv.lib.optional (stdenv.system == "i686-linux") nasm; + ++ stdenv.lib.optional (stdenv.hostPlatform.system == "i686-linux") nasm; nativeBuildInputs = [ pkgconfig ]; postPatch = '' diff --git a/pkgs/games/ezquake/default.nix b/pkgs/games/ezquake/default.nix index 14885e7a3b2..85433e116fb 100644 --- a/pkgs/games/ezquake/default.nix +++ b/pkgs/games/ezquake/default.nix @@ -20,8 +20,8 @@ stdenv.mkDerivation rec { ]; installPhase = with stdenv.lib; let - sys = last (splitString "-" stdenv.system); - arch = head (splitString "-" stdenv.system); + sys = last (splitString "-" stdenv.hostPlatform.system); + arch = head (splitString "-" stdenv.hostPlatform.system); in '' mkdir -p $out/bin find . diff --git a/pkgs/games/factorio/default.nix b/pkgs/games/factorio/default.nix index d0ffa10baec..bb019e57026 100644 --- a/pkgs/games/factorio/default.nix +++ b/pkgs/games/factorio/default.nix @@ -46,7 +46,7 @@ let }; }; }; - actual = binDists.${stdenv.system}.${releaseType}.${branch} or (throw "Factorio: unsupported platform"); + actual = binDists.${stdenv.hostPlatform.system}.${releaseType}.${branch} or (throw "Factorio: unsupported platform"); bdistForArch = arch: { sha256 ? null , version ? "0.16.51" diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix index 3f9ec93f861..2a39e3499ed 100644 --- a/pkgs/games/nethack/default.nix +++ b/pkgs/games/nethack/default.nix @@ -6,7 +6,7 @@ let platform = if stdenv.hostPlatform.isUnix then "unix" - else throw "Unknown platform for NetHack: ${stdenv.system}"; + else throw "Unknown platform for NetHack: ${stdenv.hostPlatform.system}"; unixHint = if x11Mode then "linux-x11" else if qtMode then "linux-qt4" diff --git a/pkgs/games/oilrush/default.nix b/pkgs/games/oilrush/default.nix index d637c159595..319cdb610ca 100644 --- a/pkgs/games/oilrush/default.nix +++ b/pkgs/games/oilrush/default.nix @@ -13,8 +13,8 @@ stdenv.mkDerivation { assert url != null && sha256 != null; fetchurl { inherit url sha256; }; shell = stdenv.shell; - arch = if stdenv.system == "x86_64-linux" then "x64" - else if stdenv.system == "i686-linux" then "x86" + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" + else if stdenv.hostPlatform.system == "i686-linux" then "x86" else ""; unpackPhase = '' mkdir oilrush diff --git a/pkgs/games/openarena/default.nix b/pkgs/games/openarena/default.nix index 22ce05cb38a..19e608f393a 100644 --- a/pkgs/games/openarena/default.nix +++ b/pkgs/games/openarena/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { cd $out unzip $src - ${if stdenv.system == "x86_64-linux" then '' + ${if stdenv.hostPlatform.system == "x86_64-linux" then '' patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.x86_64" makeWrapper "${gameDir}/openarena.x86_64" "$out/bin/openarena" \ --prefix LD_LIBRARY_PATH : "${libPath}" diff --git a/pkgs/games/racer/default.nix b/pkgs/games/racer/default.nix index 4cbc5397bb3..d11315cd6df 100644 --- a/pkgs/games/racer/default.nix +++ b/pkgs/games/racer/default.nix @@ -3,10 +3,10 @@ stdenv.mkDerivation rec { name = "racer-1.1"; - src = if stdenv.system == "i686-linux" then fetchurl { + src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = http://hippo.nipax.cz/src/racer-1.1.tar.gz; sha256 = "0fll1qkqfcjq87k0jzsilcw701z92lfxn2y5ga1n038772lymxl9"; - } else if stdenv.system == "x86_64-linux" then fetchurl { + } else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = https://hippo.nipax.cz/src/racer-1.1.64.tar.gz; sha256 = "0rjy3gmlhwfkb9zs58j0mc0dar0livwpbc19r6zw5r2k6r7xdan0"; } else diff --git a/pkgs/games/sdlmame/default.nix b/pkgs/games/sdlmame/default.nix index fa498b8e041..9f90c9f14aa 100644 --- a/pkgs/games/sdlmame/default.nix +++ b/pkgs/games/sdlmame/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { version = "0.151.u0-1"; name = "sdlmame-${version}"; - src = if stdenv.system == "x86_64-linux" + src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "http://seblu.net/a/archive/packages/s/sdlmame/${name}-x86_64.pkg.tar.xz"; sha256 = "1j9vjxhrhsskrlk5wr7al4wk2hh3983kcva42mqal09bmc8qg3m9"; diff --git a/pkgs/games/steam/default.nix b/pkgs/games/steam/default.nix index b7dbba55269..e8a911bebd5 100644 --- a/pkgs/games/steam/default.nix +++ b/pkgs/games/steam/default.nix @@ -4,9 +4,9 @@ let callPackage = newScope self; self = rec { - steamArch = if pkgs.stdenv.system == "x86_64-linux" then "amd64" - else if pkgs.stdenv.system == "i686-linux" then "i386" - else throw "Unsupported platform: ${pkgs.stdenv.system}"; + steamArch = if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "amd64" + else if pkgs.stdenv.hostPlatform.system == "i686-linux" then "i386" + else throw "Unsupported platform: ${pkgs.stdenv.hostPlatform.system}"; steam-runtime = callPackage ./runtime.nix { }; steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { }; diff --git a/pkgs/games/ut2004/demo.nix b/pkgs/games/ut2004/demo.nix index 1a7ea2da75b..9aea992ac75 100644 --- a/pkgs/games/ut2004/demo.nix +++ b/pkgs/games/ut2004/demo.nix @@ -2,8 +2,8 @@ let arch = - if stdenv.system == "x86_64-linux" then "amd64" - else if stdenv.system == "i686-linux" then "x86" + if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" + else if stdenv.hostPlatform.system == "i686-linux" then "x86" else throw "Unsupported architecture"; in stdenv.mkDerivation rec { diff --git a/pkgs/games/vessel/default.nix b/pkgs/games/vessel/default.nix index 62feeb97d52..ab6f1ca765c 100644 --- a/pkgs/games/vessel/default.nix +++ b/pkgs/games/vessel/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { message = goBuyItNow; name = "${name}-bin"; sha256 = "1vpwcrjiln2mx43h7ib3jnccyr3chk7a5x2bw9kb4lw8ycygvg96"; - } else throw "unsupported platform ${stdenv.system} only i686-linux supported for now."; + } else throw "unsupported platform ${stdenv.hostPlatform.system} only i686-linux supported for now."; phases = "installPhase"; ld_preload = ./isatty.c; diff --git a/pkgs/games/worldofgoo/default.nix b/pkgs/games/worldofgoo/default.nix index 9684f3b876a..ad86072dd1c 100644 --- a/pkgs/games/worldofgoo/default.nix +++ b/pkgs/games/worldofgoo/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { then "WorldOfGooDemo-1.41" else "WorldofGoo-1.41"; - arch = if stdenv.system == "x86_64-linux" then "supported" + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "supported" else throw "Sorry. World of Goo only is only supported on x86_64 now."; goBuyItNow = '' diff --git a/pkgs/games/zandronum/fmod.nix b/pkgs/games/zandronum/fmod.nix index 2c53d93e401..a5d9098242b 100644 --- a/pkgs/games/zandronum/fmod.nix +++ b/pkgs/games/zandronum/fmod.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchurl, alsaLib, libpulseaudio, undmg }: let - bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64"; + bits = stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "64"; libPath = lib.makeLibraryPath [ stdenv.cc.cc alsaLib libpulseaudio ]; in diff --git a/pkgs/misc/base16-builder/default.nix b/pkgs/misc/base16-builder/default.nix index be8d42a4292..3d713848223 100644 --- a/pkgs/misc/base16-builder/default.nix +++ b/pkgs/misc/base16-builder/default.nix @@ -11,6 +11,6 @@ let # nodePackages = import ./node-packages.nix { inherit pkgs; - inherit (stdenv) system; + inherit (stdenv.hostPlatform) system; }; in nodePackages.base16-builder diff --git a/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix b/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix index b83e84154bb..c8e5ddd09b1 100644 --- a/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix +++ b/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix @@ -7,9 +7,9 @@ file included in the tarball */ let arch = - if stdenv.system == "x86_64-linux" then "64" - else if stdenv.system == "i686-linux" then "32" - else throw "Unsupported system ${stdenv.system}"; + if stdenv.hostPlatform.system == "x86_64-linux" then "64" + else if stdenv.hostPlatform.system == "i686-linux" then "32" + else throw "Unsupported system ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation rec { name = "cnijfilter-${version}"; diff --git a/pkgs/misc/cups/drivers/kyocera/default.nix b/pkgs/misc/cups/drivers/kyocera/default.nix index 0711bad86a1..9b40e4ff50e 100644 --- a/pkgs/misc/cups/drivers/kyocera/default.nix +++ b/pkgs/misc/cups/drivers/kyocera/default.nix @@ -2,9 +2,9 @@ let platform = - if stdenv.system == "x86_64-linux" then "64bit" - else if stdenv.system == "i686-linux" then "32bit" - else throw "Unsupported system: ${stdenv.system}"; + if stdenv.hostPlatform.system == "x86_64-linux" then "64bit" + else if stdenv.hostPlatform.system == "i686-linux" then "32bit" + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; libPath = lib.makeLibraryPath [ cups ]; in diff --git a/pkgs/misc/cups/drivers/kyodialog3/default.nix b/pkgs/misc/cups/drivers/kyodialog3/default.nix index 073bd4ccbbf..bcd2914da0c 100644 --- a/pkgs/misc/cups/drivers/kyodialog3/default.nix +++ b/pkgs/misc/cups/drivers/kyodialog3/default.nix @@ -6,9 +6,9 @@ let platform = - if stdenv.system == "x86_64-linux" then "64bit" - else if stdenv.system == "i686-linux" then "32bit" - else throw "Unsupported system: ${stdenv.system}"; + if stdenv.hostPlatform.system == "x86_64-linux" then "64bit" + else if stdenv.hostPlatform.system == "i686-linux" then "32bit" + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; debPlatform = if platform == "64bit" then "amd64" else "i386"; diff --git a/pkgs/misc/cups/drivers/samsung/4.01.17.nix b/pkgs/misc/cups/drivers/samsung/4.01.17.nix index b30b4c4a2c1..547e25b6514 100644 --- a/pkgs/misc/cups/drivers/samsung/4.01.17.nix +++ b/pkgs/misc/cups/drivers/samsung/4.01.17.nix @@ -16,8 +16,8 @@ # Do not bump lightly! Visit # to see what will break when upgrading. Consider a new versioned attribute. let - installationPath = if stdenv.system == "x86_64-linux" then "x86_64" else "i386"; - appendPath = if stdenv.system == "x86_64-linux" then "64" else ""; + installationPath = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "i386"; + appendPath = if stdenv.hostPlatform.system == "x86_64-linux" then "64" else ""; libPath = stdenv.lib.makeLibraryPath [ cups libusb ] + ":$out/lib:${stdenv.cc.cc.lib}/lib${appendPath}"; in stdenv.mkDerivation rec { name = "samsung-UnifiedLinuxDriver-${version}"; diff --git a/pkgs/misc/cups/drivers/samsung/default.nix b/pkgs/misc/cups/drivers/samsung/default.nix index 48636e1f76a..b2c4bbb0f20 100644 --- a/pkgs/misc/cups/drivers/samsung/default.nix +++ b/pkgs/misc/cups/drivers/samsung/default.nix @@ -2,7 +2,7 @@ let - arch = if stdenv.system == "x86_64-linux" + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "i386"; diff --git a/pkgs/misc/drivers/gutenprint/bin.nix b/pkgs/misc/drivers/gutenprint/bin.nix index 3832c4de2dc..6cf754192f8 100644 --- a/pkgs/misc/drivers/gutenprint/bin.nix +++ b/pkgs/misc/drivers/gutenprint/bin.nix @@ -27,7 +27,7 @@ TODO tidy this all up. Find source instead of binary. Fix paths ... Find out how stdenv.mkDerivation { name = "cups-gutenprint-binary-5.0.1"; - src = if stdenv.system == "x86_64-linux" then fetchurl { + src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = https://www.openprinting.org/download/printdriver/debian/dists/lsb3.1/main/binary-amd64/gutenprint_5.0.1-1lsb3.1_amd64.deb; sha256 = "0an5gba6r6v54r53s2gj2fjk8fzpl4lrksjas2333528b0k8gbbc"; } else throw "TODO"; # get from openprint.com -> drivers -> gutenprint diff --git a/pkgs/misc/drivers/hplip/3.16.11.nix b/pkgs/misc/drivers/hplip/3.16.11.nix index 91dce834a4b..8982834d9a9 100644 --- a/pkgs/misc/drivers/hplip/3.16.11.nix +++ b/pkgs/misc/drivers/hplip/3.16.11.nix @@ -34,15 +34,15 @@ let "armv7l-linux" = "arm32"; }; - hplipArch = hplipPlatforms."${stdenv.system}" - or (throw "HPLIP not supported on ${stdenv.system}"); + hplipArch = hplipPlatforms."${stdenv.hostPlatform.system}" + or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}"); pluginArches = [ "x86_32" "x86_64" "arm32" ]; in assert withPlugin -> builtins.elem hplipArch pluginArches - || throw "HPLIP plugin not supported on ${stdenv.system}"; + || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}"; pythonPackages.buildPythonApplication { inherit name src; diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix index 59a75dab883..f03d75dfa02 100644 --- a/pkgs/misc/drivers/hplip/default.nix +++ b/pkgs/misc/drivers/hplip/default.nix @@ -36,15 +36,15 @@ let "armv7l-linux" = "arm32"; }; - hplipArch = hplipPlatforms."${stdenv.system}" - or (throw "HPLIP not supported on ${stdenv.system}"); + hplipArch = hplipPlatforms."${stdenv.hostPlatform.system}" + or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}"); pluginArches = [ "x86_32" "x86_64" "arm32" ]; in assert withPlugin -> builtins.elem hplipArch pluginArches - || throw "HPLIP plugin not supported on ${stdenv.system}"; + || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}"; pythonPackages.buildPythonApplication { inherit name src; diff --git a/pkgs/misc/emulators/retroarch/cores.nix b/pkgs/misc/emulators/retroarch/cores.nix index 8f6e66c18c3..371ace848fb 100644 --- a/pkgs/misc/emulators/retroarch/cores.nix +++ b/pkgs/misc/emulators/retroarch/cores.nix @@ -272,7 +272,7 @@ in with stdenv.lib.licenses; extraBuildInputs = [ libGLU_combined libpng ]; }).override { - buildPhase = "make WITH_DYNAREC=${if stdenv.system == "x86_64-linux" then "x86_64" else "x86"}"; + buildPhase = "make WITH_DYNAREC=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "x86"}"; }; nestopia = (mkLibRetroCore rec { @@ -300,7 +300,7 @@ in with stdenv.lib.licenses; extraBuildInputs = [ libGLU_combined libpng ]; }).override { - buildPhase = "make WITH_DYNAREC=${if stdenv.system == "x86_64-linux" then "x86_64" else "x86"}"; + buildPhase = "make WITH_DYNAREC=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "x86"}"; }; picodrive = (mkLibRetroCore rec { diff --git a/pkgs/misc/emulators/wine/default.nix b/pkgs/misc/emulators/wine/default.nix index a8eacbe234c..91323ab6de7 100644 --- a/pkgs/misc/emulators/wine/default.nix +++ b/pkgs/misc/emulators/wine/default.nix @@ -6,9 +6,9 @@ # }; # Make additional configurations on demand: # wine.override { wineBuild = "wine32"; wineRelease = "staging"; }; -{ lib, system, callPackage, +{ lib, stdenv, callPackage, wineRelease ? "stable", - wineBuild ? (if system == "x86_64-linux" then "wineWow" else "wine32"), + wineBuild ? if stdenv.hostPlatform.system == "x86_64-linux" then "wineWow" else "wine32", libtxc_dxtn_Name ? "libtxc_dxtn_s2tc", pngSupport ? false, jpegSupport ? false, diff --git a/pkgs/os-specific/linux/alsa-plugins/wrapper.nix b/pkgs/os-specific/linux/alsa-plugins/wrapper.nix index 7dbd01bf058..60262a14c9b 100644 --- a/pkgs/os-specific/linux/alsa-plugins/wrapper.nix +++ b/pkgs/os-specific/linux/alsa-plugins/wrapper.nix @@ -1,5 +1,5 @@ { writeScriptBin, stdenv, alsaPlugins }: -writeScriptBin "ap${if stdenv.system == "i686-linux" then "32" else "64"}" '' +writeScriptBin "ap${if stdenv.hostPlatform.system == "i686-linux" then "32" else "64"}" '' #/bin/sh ALSA_PLUGIN_DIRS=${alsaPlugins}/lib/alsa-lib "$@" '' diff --git a/pkgs/os-specific/linux/amdgpu-pro/default.nix b/pkgs/os-specific/linux/amdgpu-pro/default.nix index 97658c831eb..b72944a49eb 100644 --- a/pkgs/os-specific/linux/amdgpu-pro/default.nix +++ b/pkgs/os-specific/linux/amdgpu-pro/default.nix @@ -16,9 +16,9 @@ let bitness = if stdenv.is64bit then "64" else "32"; libArch = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-gnu" - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-gnu" else throw "amdgpu-pro is Linux only. Sorry. The build was stopped."; diff --git a/pkgs/os-specific/linux/ati-drivers/default.nix b/pkgs/os-specific/linux/ati-drivers/default.nix index df6fa3555fe..d5d42faa913 100644 --- a/pkgs/os-specific/linux/ati-drivers/default.nix +++ b/pkgs/os-specific/linux/ati-drivers/default.nix @@ -37,9 +37,9 @@ stdenv.mkDerivation rec { build = "15.302"; linuxonly = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then true - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then true else throw "ati-drivers are Linux only. Sorry. The build was stopped."; diff --git a/pkgs/os-specific/linux/broadcom-sta/default.nix b/pkgs/os-specific/linux/broadcom-sta/default.nix index 9848882f3b8..541539522f8 100644 --- a/pkgs/os-specific/linux/broadcom-sta/default.nix +++ b/pkgs/os-specific/linux/broadcom-sta/default.nix @@ -7,7 +7,7 @@ let x86_64-linux = "1gj485qqr190idilacpxwgqyw21il03zph2rddizgj7fbd6pfyaz"; }; - arch = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "_64"; + arch = stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "_64"; tarballVersion = stdenv.lib.replaceStrings ["."] ["_"] version; tarball = "hybrid-v35${arch}-nodebug-pcoem-${tarballVersion}.tar.gz"; in @@ -16,7 +16,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/${tarball}"; - sha256 = hashes.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); + sha256 = hashes.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); }; hardeningDisable = [ "pic" ]; diff --git a/pkgs/os-specific/linux/displaylink/default.nix b/pkgs/os-specific/linux/displaylink/default.nix index ad42590ad19..af8c790e325 100644 --- a/pkgs/os-specific/linux/displaylink/default.nix +++ b/pkgs/os-specific/linux/displaylink/default.nix @@ -3,8 +3,8 @@ let arch = - if stdenv.system == "x86_64-linux" then "x64" - else if stdenv.system == "i686-linux" then "x86" + if stdenv.hostPlatform.system == "x86_64-linux" then "x64" + else if stdenv.hostPlatform.system == "i686-linux" then "x86" else throw "Unsupported architecture"; bins = "${arch}-ubuntu-1604"; libPath = lib.makeLibraryPath [ stdenv.cc.cc utillinux libusb1 evdi ]; diff --git a/pkgs/os-specific/linux/fusionio/util.nix b/pkgs/os-specific/linux/fusionio/util.nix index 0f1e2748c88..6327a95f39d 100644 --- a/pkgs/os-specific/linux/fusionio/util.nix +++ b/pkgs/os-specific/linux/fusionio/util.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation { description = "Fusionio command line utilities"; license = licenses.unfree; platforms = [ "x86_64-linux" ]; - broken = stdenv.system != "x86_64-linux"; + broken = stdenv.hostPlatform.system != "x86_64-linux"; maintainers = with maintainers; [ wkennington ]; }; } diff --git a/pkgs/os-specific/linux/fusionio/vsl.nix b/pkgs/os-specific/linux/fusionio/vsl.nix index 665c4b4d081..6ebe2e0cdaf 100644 --- a/pkgs/os-specific/linux/fusionio/vsl.nix +++ b/pkgs/os-specific/linux/fusionio/vsl.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { description = "Kernel driver for accessing fusion-io cards"; license = licenses.unfree; platforms = [ "x86_64-linux" ]; - broken = stdenv.system != "x86_64-linux"; + broken = stdenv.hostPlatform.system != "x86_64-linux"; maintainers = with maintainers; [ wkennington ]; }; } diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index bf99729b33e..27a615d7bb9 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -114,7 +114,7 @@ let IP_DCCP_CCID3 = no; # experimental CLS_U32_PERF = yes; CLS_U32_MARK = yes; - BPF_JIT = when (stdenv.system == "x86_64-linux") yes; + BPF_JIT = when (stdenv.hostPlatform.system == "x86_64-linux") yes; WAN = yes; # Required by systemd per-cgroup firewalling CGROUP_BPF = option yes; @@ -184,7 +184,7 @@ let FB_VESA = yes; FRAMEBUFFER_CONSOLE = yes; FRAMEBUFFER_CONSOLE_ROTATION = yes; - FB_GEODE = when (stdenv.system == "i686-linux") yes; + FB_GEODE = when (stdenv.hostPlatform.system == "i686-linux") yes; }; video = { @@ -497,7 +497,7 @@ let }; # Support x2APIC (which requires IRQ remapping) - x2apic = optionalAttrs (stdenv.system == "x86_64-linux") { + x2apic = optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux") { X86_X2APIC = yes; IRQ_REMAP = yes; }; diff --git a/pkgs/os-specific/linux/kernel/linux-rpi.nix b/pkgs/os-specific/linux/kernel/linux-rpi.nix index e68a0ed2671..203faed0544 100644 --- a/pkgs/os-specific/linux/kernel/linux-rpi.nix +++ b/pkgs/os-specific/linux/kernel/linux-rpi.nix @@ -18,7 +18,7 @@ stdenv.lib.overrideDerivation (buildLinux (args // rec { defconfig = { "armv6l-linux" = "bcmrpi_defconfig"; "armv7l-linux" = "bcm2709_defconfig"; - }.${stdenv.system} or (throw "linux_rpi not supported on '${stdenv.system}'"); + }.${stdenv.hostPlatform.system} or (throw "linux_rpi not supported on '${stdenv.hostPlatform.system}'"); features = { efiBootStub = false; diff --git a/pkgs/os-specific/linux/nvidia-x11/generic.nix b/pkgs/os-specific/linux/nvidia-x11/generic.nix index 0ededc08050..06125787a58 100644 --- a/pkgs/os-specific/linux/nvidia-x11/generic.nix +++ b/pkgs/os-specific/linux/nvidia-x11/generic.nix @@ -34,22 +34,22 @@ let builder = ./builder.sh; src = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "https://download.nvidia.com/XFree86/Linux-x86/${version}/NVIDIA-Linux-x86-${version}${pkgSuffix}.run"; sha256 = sha256_32bit; } - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}${pkgSuffix}.run"; sha256 = sha256_64bit; } - else throw "nvidia-x11 does not support platform ${stdenv.system}"; + else throw "nvidia-x11 does not support platform ${stdenv.hostPlatform.system}"; patches = if libsOnly then null else patches; inherit prePatch; inherit version useGLVND useProfiles; - inherit (stdenv) system; + inherit (stdenv.hostPlatform) system; outputs = [ "out" ] ++ optional (!libsOnly) "bin"; outputDev = if libsOnly then null else "bin"; diff --git a/pkgs/os-specific/linux/prl-tools/default.nix b/pkgs/os-specific/linux/prl-tools/default.nix index be93ff6f2eb..1a4919a5d9d 100644 --- a/pkgs/os-specific/linux/prl-tools/default.nix +++ b/pkgs/os-specific/linux/prl-tools/default.nix @@ -10,8 +10,8 @@ assert kernel != null -> stdenv.lib.versionOlder kernel.version "4.15"; let xorgFullVer = (builtins.parseDrvName xorg.xorgserver.name).version; xorgVer = lib.concatStringsSep "." (lib.take 2 (lib.splitString "." xorgFullVer)); - x64 = if stdenv.system == "x86_64-linux" then true - else if stdenv.system == "i686-linux" then false + x64 = if stdenv.hostPlatform.system == "x86_64-linux" then true + else if stdenv.hostPlatform.system == "i686-linux" then false else throw "Parallels Tools for Linux only support {x86-64,i686}-linux targets"; in stdenv.mkDerivation rec { diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 560aa72eb39..8af6d0e0400 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -187,7 +187,7 @@ rec { builder = attrs.realBuilder or stdenv.shell; args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)]; inherit stdenv; - inherit (stdenv) system; + inherit (stdenv.hostPlatform) system; userHook = config.stdenv.userHook or null; __ignoreNulls = true; diff --git a/pkgs/tools/X11/xwinwrap/default.nix b/pkgs/tools/X11/xwinwrap/default.nix index cc2eb50ce1f..dbbdb0c04e9 100644 --- a/pkgs/tools/X11/xwinwrap/default.nix +++ b/pkgs/tools/X11/xwinwrap/default.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation { xlibsWrapper ]; - buildPhase = if stdenv.system == "x86_64-linux" then '' + buildPhase = if stdenv.hostPlatform.system == "x86_64-linux" then '' make all64 - '' else if stdenv.system == "i686-linux" then '' + '' else if stdenv.hostPlatform.system == "i686-linux" then '' make all32 - '' else throw "xwinwrap is not supported on ${stdenv.system}"; + '' else throw "xwinwrap is not supported on ${stdenv.hostPlatform.system}"; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/admin/bluemix-cli/default.nix b/pkgs/tools/admin/bluemix-cli/default.nix index 7ae54aab4b9..8b6395d85d0 100644 --- a/pkgs/tools/admin/bluemix-cli/default.nix +++ b/pkgs/tools/admin/bluemix-cli/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "0.8.0"; src = - if stdenv.system == "i686-linux" then + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { name = "linux32-${version}.tar.gz"; url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux32"; diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index c2f73cea955..8b98636b347 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -32,7 +32,7 @@ in stdenv.mkDerivation rec { name = "google-cloud-sdk-${version}"; version = "206.0.0"; - src = fetchurl (sources name stdenv.system); + src = fetchurl (sources name stdenv.hostPlatform.system); buildInputs = [ python makeWrapper ]; diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index 7532cd899cc..0cde7206984 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { # May have some issues with root compilation because the bootstrap tool # cannot be used as a login shell for now. - FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux" || stdenv.isSunOS) "1"; + FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv7l-linux" || stdenv.isSunOS) "1"; preConfigure = if stdenv.isCygwin then '' sed -i gnu/fpending.h -e 's,include ,,' diff --git a/pkgs/tools/bootloaders/refind/default.nix b/pkgs/tools/bootloaders/refind/default.nix index 73463bbef89..5f4d77e34b6 100644 --- a/pkgs/tools/bootloaders/refind/default.nix +++ b/pkgs/tools/bootloaders/refind/default.nix @@ -7,7 +7,7 @@ let }; inherit - (archids.${stdenv.system} or (throw "unsupported system: ${stdenv.system}")) + (archids.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}")) hostarch efiPlatform; in diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix index 4b127417ca8..4a2ba2fcb94 100644 --- a/pkgs/tools/compression/bzip2/default.nix +++ b/pkgs/tools/compression/bzip2/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl -, linkStatic ? (stdenv.system == "i686-cygwin") +, linkStatic ? (stdenv.hostPlatform.system == "i686-cygwin") }: stdenv.mkDerivation rec { diff --git a/pkgs/tools/filesystems/sshfs-fuse/default.nix b/pkgs/tools/filesystems/sshfs-fuse/default.nix index 183cfb2ddbe..ddec6b7eff8 100644 --- a/pkgs/tools/filesystems/sshfs-fuse/default.nix +++ b/pkgs/tools/filesystems/sshfs-fuse/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { checkInputs = [ which python3Packages.pytest ]; NIX_CFLAGS_COMPILE = stdenv.lib.optional - (stdenv.system == "i686-linux") + (stdenv.hostPlatform.system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; postInstall = '' diff --git a/pkgs/tools/graphics/pngout/default.nix b/pkgs/tools/graphics/pngout/default.nix index afc1a2519fe..333e5f60076 100644 --- a/pkgs/tools/graphics/pngout/default.nix +++ b/pkgs/tools/graphics/pngout/default.nix @@ -1,9 +1,9 @@ {stdenv, fetchurl}: let - folder = if stdenv.system == "i686-linux" then "i686" - else if stdenv.system == "x86_64-linux" then "x86_64" - else throw "Unsupported system: ${stdenv.system}"; + folder = if stdenv.hostPlatform.system == "i686-linux" then "i686" + else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation { name = "pngout-20130221"; @@ -17,9 +17,9 @@ stdenv.mkDerivation { mkdir -p $out/bin cp ${folder}/pngout $out/bin - ${if stdenv.system == "i686-linux" then '' + ${if stdenv.hostPlatform.system == "i686-linux" then '' patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/pngout - '' else if stdenv.system == "x86_64-linux" then '' + '' else if stdenv.hostPlatform.system == "x86_64-linux" then '' patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/pngout '' else ""} ''; diff --git a/pkgs/tools/misc/bandwidth/default.nix b/pkgs/tools/misc/bandwidth/default.nix index e8ea9117bc5..e50faaca899 100644 --- a/pkgs/tools/misc/bandwidth/default.nix +++ b/pkgs/tools/misc/bandwidth/default.nix @@ -2,11 +2,11 @@ let arch = - if stdenv.system == "x86_64-linux" then "bandwidth64" - else if stdenv.system == "i686-linux" then "bandwidth32" - else if stdenv.system == "x86_64-darwin" then "bandwidth-mac64" - else if stdenv.system == "i686-darwin" then "bandwidth-mac32" - else if stdenv.system == "i686-cygwin" then "bandwidth-win32" + if stdenv.hostPlatform.system == "x86_64-linux" then "bandwidth64" + else if stdenv.hostPlatform.system == "i686-linux" then "bandwidth32" + else if stdenv.hostPlatform.system == "x86_64-darwin" then "bandwidth-mac64" + else if stdenv.hostPlatform.system == "i686-darwin" then "bandwidth-mac32" + else if stdenv.hostPlatform.system == "i686-cygwin" then "bandwidth-win32" else throw "Unknown architecture"; in stdenv.mkDerivation rec { diff --git a/pkgs/tools/misc/execline/default.nix b/pkgs/tools/misc/execline/default.nix index 0b606882a5c..360808f4280 100644 --- a/pkgs/tools/misc/execline/default.nix +++ b/pkgs/tools/misc/execline/default.nix @@ -32,7 +32,7 @@ in stdenv.mkDerivation rec { "--with-dynlib=${skalibs.lib}/lib" ] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/execline diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix index 63511782f00..481a07ef491 100644 --- a/pkgs/tools/misc/grub/2.0x.nix +++ b/pkgs/tools/misc/grub/2.0x.nix @@ -28,8 +28,8 @@ let "aarch64-linux".target = "arm64"; }; - canEfi = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild); - inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems); + canEfi = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild); + inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems); version = "2.02"; @@ -86,14 +86,14 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-grub-mount" ] # dep of os-prober ++ optional zfsSupport "--enable-libzfs" - ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ] - ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.system}.target}"]; + ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}" "--program-prefix=" ] + ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}"]; # save target that grub is compiled for grubTarget = if efiSupport - then "${efiSystemsInstall.${stdenv.system}.target}-efi" + then "${efiSystemsInstall.${stdenv.hostPlatform.system}.target}-efi" else if inPCSystems - then "${pcSystems.${stdenv.system}.target}-pc" + then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc" else ""; doCheck = false; diff --git a/pkgs/tools/misc/grub/pvgrub_image/default.nix b/pkgs/tools/misc/grub/pvgrub_image/default.nix index df5e3f15e95..19d8afb1857 100644 --- a/pkgs/tools/misc/grub/pvgrub_image/default.nix +++ b/pkgs/tools/misc/grub/pvgrub_image/default.nix @@ -22,11 +22,11 @@ stdenv.mkDerivation rec { tar -cf memdisk.tar grub.cfg # We include all modules except all_video.mod as otherwise grub will fail printing "no symbol table" # if we include it. - grub-mkimage -O "${efiSystemsBuild.${stdenv.system}.target}-xen" -c grub-bootstrap.cfg \ - -m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" \ - $(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$') + grub-mkimage -O "${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen" -c grub-bootstrap.cfg \ + -m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" \ + $(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$') mkdir -p "$out/lib/grub-xen" - cp "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" $out/lib/grub-xen/ + cp "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" $out/lib/grub-xen/ ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/misc/grub/trusted.nix b/pkgs/tools/misc/grub/trusted.nix index 63a73658e0a..0e867d7cffd 100644 --- a/pkgs/tools/misc/grub/trusted.nix +++ b/pkgs/tools/misc/grub/trusted.nix @@ -10,7 +10,7 @@ let "x86_64-linux".target = "i386"; }; - inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems); + inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems); version = if for_HP_laptop then "1.2.1" else "1.2.0"; @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { # save target that grub is compiled for grubTarget = if inPCSystems - then "${pcSystems.${stdenv.system}.target}-pc" + then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc" else ""; doCheck = false; diff --git a/pkgs/tools/misc/mongodb-compass/default.nix b/pkgs/tools/misc/mongodb-compass/default.nix index f8475ee2e0e..840d4eacd37 100644 --- a/pkgs/tools/misc/mongodb-compass/default.nix +++ b/pkgs/tools/misc/mongodb-compass/default.nix @@ -43,13 +43,13 @@ let ] + ":${stdenv.cc.cc.lib}/lib64"; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb"; sha256 = "0x23jshnr0rafm5sn2vhq2y2gryg8mksahzyv5fszblgaxay234p"; } else - throw "MongoDB compass is not supported on ${stdenv.system}"; + throw "MongoDB compass is not supported on ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation { name = "mongodb-compass-${version}"; diff --git a/pkgs/tools/misc/mprime/default.nix b/pkgs/tools/misc/mprime/default.nix index 850ed32998b..e18e9020e1d 100644 --- a/pkgs/tools/misc/mprime/default.nix +++ b/pkgs/tools/misc/mprime/default.nix @@ -2,15 +2,15 @@ let srcDir = - if stdenv.system == "x86_64-linux" then "linux64" - else if stdenv.system == "i686-linux" then "linux" - else if stdenv.system == "x86_64-darwin" then "macosx64" + if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" + else if stdenv.hostPlatform.system == "i686-linux" then "linux" + else if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx64" else throwSystem; - throwSystem = throw "Unsupported system: ${stdenv.system}"; + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; gwnum = - if stdenv.system == "x86_64-linux" then "make64" - else if stdenv.system == "i686-linux" then "makefile" - else if stdenv.system == "x86_64-darwin" then "makemac" + if stdenv.hostPlatform.system == "x86_64-linux" then "make64" + else if stdenv.hostPlatform.system == "i686-linux" then "makefile" + else if stdenv.hostPlatform.system == "x86_64-darwin" then "makemac" else throwSystem; in diff --git a/pkgs/tools/misc/ocz-ssd-guru/default.nix b/pkgs/tools/misc/ocz-ssd-guru/default.nix index afe7a81ebac..9ffb89aca6b 100644 --- a/pkgs/tools/misc/ocz-ssd-guru/default.nix +++ b/pkgs/tools/misc/ocz-ssd-guru/default.nix @@ -1,7 +1,7 @@ { fetchurl, stdenv, xorg, freetype, fontconfig, libGLU_combined, glibc, makeWrapper }: let - system = if stdenv.system == "x86_64-linux" then "linux64" else "linux32"; + system = if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" else "linux32"; in stdenv.mkDerivation rec { name = "ocz-ssd-guru-${version}"; diff --git a/pkgs/tools/misc/os-prober/default.nix b/pkgs/tools/misc/os-prober/default.nix index 6211c863bd4..59a60e356b8 100644 --- a/pkgs/tools/misc/os-prober/default.nix +++ b/pkgs/tools/misc/os-prober/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { install -Dt $out/share common.sh # probes - case "${stdenv.system}" in + case "${stdenv.hostPlatform.system}" in i686*|x86_64*) ARCH=x86;; powerpc*) ARCH=powerpc;; arm*) ARCH=arm;; diff --git a/pkgs/tools/misc/s6-portable-utils/default.nix b/pkgs/tools/misc/s6-portable-utils/default.nix index 014e000eabd..5f56daf3a48 100644 --- a/pkgs/tools/misc/s6-portable-utils/default.nix +++ b/pkgs/tools/misc/s6-portable-utils/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { # Explicitly setting target ensures code can be compiled against a skalibs # binary built on a different version of darwin. # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/s6-portable-utils/ diff --git a/pkgs/tools/misc/staruml/default.nix b/pkgs/tools/misc/staruml/default.nix index 2a06400b411..486634452ae 100644 --- a/pkgs/tools/misc/staruml/default.nix +++ b/pkgs/tools/misc/staruml/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { name = "staruml-${version}"; src = - if stdenv.system == "i686-linux" then fetchurl { + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "http://staruml.io/download/release/v${version}/StarUML-v${version}-32-bit.deb"; sha256 = "0vb3k9m3l6pmsid4shlk0xdjsriq3gxzm8q7l04didsppg0vvq1n"; } else fetchurl { diff --git a/pkgs/tools/networking/airfield/default.nix b/pkgs/tools/networking/airfield/default.nix index 6f6009c107b..70005038f99 100644 --- a/pkgs/tools/networking/airfield/default.nix +++ b/pkgs/tools/networking/airfield/default.nix @@ -6,7 +6,7 @@ let nodePackages = import ./node.nix { inherit pkgs; - system = stdenv.system; + system = stdenv.hostPlatform.system; }; runtimeEnv = buildEnv { diff --git a/pkgs/tools/networking/filegive/default.nix b/pkgs/tools/networking/filegive/default.nix index 6fef6a9e7fa..a76519b36b5 100644 --- a/pkgs/tools/networking/filegive/default.nix +++ b/pkgs/tools/networking/filegive/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ go ]; buildPhase = '' - ${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"} + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"} mkdir $TMPDIR/go export GOPATH=$TMPDIR/go diff --git a/pkgs/tools/networking/logmein-hamachi/default.nix b/pkgs/tools/networking/logmein-hamachi/default.nix index 2e045ad8de9..c5c7e18ba6d 100644 --- a/pkgs/tools/networking/logmein-hamachi/default.nix +++ b/pkgs/tools/networking/logmein-hamachi/default.nix @@ -4,13 +4,13 @@ with stdenv.lib; let arch = - if stdenv.system == "x86_64-linux" then "x64" - else if stdenv.system == "i686-linux" then "x86" + if stdenv.hostPlatform.system == "x86_64-linux" then "x64" + else if stdenv.hostPlatform.system == "i686-linux" then "x86" else throwSystem; - throwSystem = throw "Unsupported system: ${stdenv.system}"; + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; sha256 = - if stdenv.system == "x86_64-linux" then "11mxa4kls5xjj3462ycrfvfxb1xkk23p5m9iirvwsi0zdmhpnwm8" - else if stdenv.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62" + if stdenv.hostPlatform.system == "x86_64-linux" then "11mxa4kls5xjj3462ycrfvfxb1xkk23p5m9iirvwsi0zdmhpnwm8" + else if stdenv.hostPlatform.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62" else throwSystem; libraries = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]; diff --git a/pkgs/tools/networking/ngrok-2/default.nix b/pkgs/tools/networking/ngrok-2/default.nix index 23725fb2d87..fdf9067dfee 100644 --- a/pkgs/tools/networking/ngrok-2/default.nix +++ b/pkgs/tools/networking/ngrok-2/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { } else if stdenv.isDarwin then fetchurl { url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-386.zip"; sha256 = "0yfd250b55wcpgqd00rqfaa7a82f35fmybb31q5xwdbgc2i47pbh"; - } else throw "platform ${stdenv.system} not supported!"; + } else throw "platform ${stdenv.hostPlatform.system} not supported!"; sourceRoot = "."; diff --git a/pkgs/tools/networking/s6-dns/default.nix b/pkgs/tools/networking/s6-dns/default.nix index db2071ab17d..29d66e4be2c 100644 --- a/pkgs/tools/networking/s6-dns/default.nix +++ b/pkgs/tools/networking/s6-dns/default.nix @@ -33,7 +33,7 @@ in stdenv.mkDerivation rec { "--with-dynlib=${skalibs.lib}/lib" ] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/s6-dns/ diff --git a/pkgs/tools/networking/s6-networking/default.nix b/pkgs/tools/networking/s6-networking/default.nix index 1971bbffa40..f7278d5c6a2 100644 --- a/pkgs/tools/networking/s6-networking/default.nix +++ b/pkgs/tools/networking/s6-networking/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { "--with-include=${lib.getDev sslLibs.${sslSupport}}/include" "--with-lib=${lib.getLib sslLibs.${sslSupport}}/lib" ]) - ++ (lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/s6-networking/ diff --git a/pkgs/tools/networking/strongswan/default.nix b/pkgs/tools/networking/strongswan/default.nix index 74405a472f8..2f19294784e 100644 --- a/pkgs/tools/networking/strongswan/default.nix +++ b/pkgs/tools/networking/strongswan/default.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { "--enable-af-alg" "--enable-xauth-pam" "--enable-chapoly" "--enable-curl" ] ++ optionals stdenv.isx86_64 [ "--enable-aesni" "--enable-rdrand" ] - ++ optional (stdenv.system == "i686-linux") "--enable-padlock" + ++ optional (stdenv.hostPlatform.system == "i686-linux") "--enable-padlock" ++ optionals enableTNC [ "--disable-gmp" "--disable-aes" "--disable-md5" "--disable-sha1" "--disable-sha2" "--disable-fips-prf" "--enable-eap-tnc" "--enable-eap-ttls" "--enable-eap-dynamic" "--enable-tnccs-20" diff --git a/pkgs/tools/package-management/checkinstall/default.nix b/pkgs/tools/package-management/checkinstall/default.nix index fea6ccedd34..df1bf794062 100644 --- a/pkgs/tools/package-management/checkinstall/default.nix +++ b/pkgs/tools/package-management/checkinstall/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation { ./set-buildroot.patch ] - ++ stdenv.lib.optional (stdenv.system == "x86_64-linux") + ++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux") # Force use of old memcpy so that installwatch works on Glibc < # 2.14. ./use-old-memcpy.patch; diff --git a/pkgs/tools/package-management/nixui/default.nix b/pkgs/tools/package-management/nixui/default.nix index 6f46b39e65b..804bbbdf8d7 100644 --- a/pkgs/tools/package-management/nixui/default.nix +++ b/pkgs/tools/package-management/nixui/default.nix @@ -9,7 +9,7 @@ let }; nixui = (import ./nixui.nix { inherit pkgs; - inherit (stdenv) system; + inherit (stdenv.hostPlatform) system; })."nixui-git://github.com/matejc/nixui.git#0.2.1"; script = writeScript "nixui" '' #! ${stdenv.shell} diff --git a/pkgs/tools/security/afl/default.nix b/pkgs/tools/security/afl/default.nix index c61cbeb3268..3476606049d 100644 --- a/pkgs/tools/security/afl/default.nix +++ b/pkgs/tools/security/afl/default.nix @@ -4,9 +4,9 @@ let afl-qemu = callPackage ./qemu.nix {}; - qemu-exe-name = if stdenv.system == "x86_64-linux" then "qemu-x86_64" - else if stdenv.system == "i686-linux" then "qemu-i386" - else throw "afl: no support for ${stdenv.system}!"; + qemu-exe-name = if stdenv.hostPlatform.system == "x86_64-linux" then "qemu-x86_64" + else if stdenv.hostPlatform.system == "i686-linux" then "qemu-i386" + else throw "afl: no support for ${stdenv.hostPlatform.system}!"; in stdenv.mkDerivation rec { diff --git a/pkgs/tools/security/afl/qemu.nix b/pkgs/tools/security/afl/qemu.nix index 7637dcf246a..82de6474e59 100644 --- a/pkgs/tools/security/afl/qemu.nix +++ b/pkgs/tools/security/afl/qemu.nix @@ -16,9 +16,9 @@ let aflTypesFile = writeText "afl-types.h" (builtins.readFile ./qemu-patches/afl-types.h); - cpuTarget = if stdenv.system == "x86_64-linux" then "x86_64-linux-user" - else if stdenv.system == "i686-linux" then "i386-linux-user" - else throw "afl: no support for ${stdenv.system}!"; + cpuTarget = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-user" + else if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-user" + else throw "afl: no support for ${stdenv.hostPlatform.system}!"; in stdenv.mkDerivation rec { name = "afl-${n}"; @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { vde2 texinfo libuuid flex bison lzo snappy autoconf libcap_ng gnutls ] - ++ optionals (hasSuffix "linux" stdenv.system) [ libaio ]; + ++ optionals (hasSuffix "linux" stdenv.hostPlatform.system) [ libaio ]; enableParallelBuilding = true; diff --git a/pkgs/tools/security/encryptr/default.nix b/pkgs/tools/security/encryptr/default.nix index 2cf07c63a84..8d0c7876431 100644 --- a/pkgs/tools/security/encryptr/default.nix +++ b/pkgs/tools/security/encryptr/default.nix @@ -5,13 +5,13 @@ }: let - arch = if stdenv.system == "x86_64-linux" then "amd" - else if stdenv.system == "i686-linux" then "i386" - else throw "Encryptr for ${stdenv.system} not supported!"; + arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd" + else if stdenv.hostPlatform.system == "i686-linux" then "i386" + else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!"; - sha256 = if stdenv.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2" - else if stdenv.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm" - else throw "Encryptr for ${stdenv.system} not supported!"; + sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2" + else if stdenv.hostPlatform.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm" + else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!"; in stdenv.mkDerivation rec { name = "encryptr-${version}"; diff --git a/pkgs/tools/security/enpass/default.nix b/pkgs/tools/security/enpass/default.nix index b99087e475d..0f0c4233ca9 100644 --- a/pkgs/tools/security/enpass/default.nix +++ b/pkgs/tools/security/enpass/default.nix @@ -1,8 +1,9 @@ -{stdenv, system, fetchurl, dpkg, openssl, xorg +{ stdenv, fetchurl, dpkg, openssl, xorg , glib, libGLU_combined, libpulseaudio, zlib, dbus, fontconfig, freetype , gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig , makeWrapper , python, pythonPackages, lib -, libredirect, lsof}: +, libredirect, lsof +}: let all_data = builtins.fromJSON (builtins.readFile ./data.json); @@ -11,7 +12,7 @@ let x86_64-linux = "amd64"; }; - data = all_data.${system_map.${system} or (throw "Unsupported platform")}; + data = all_data.${system_map.${stdenv.hostPlatform.system} or (throw "Unsupported platform")}; baseUrl = http://repo.sinew.in; diff --git a/pkgs/tools/security/pcsc-scm-scl011/default.nix b/pkgs/tools/security/pcsc-scm-scl011/default.nix index 1418a4ead58..88ca8a3d1b1 100644 --- a/pkgs/tools/security/pcsc-scm-scl011/default.nix +++ b/pkgs/tools/security/pcsc-scm-scl011/default.nix @@ -1,9 +1,9 @@ { stdenv, fetchurl, unzip, libusb }: let - arch = if stdenv.system == "i686-linux" then "32" - else if stdenv.system == "x86_64-linux" then "64" - else throw "Unsupported system: ${stdenv.system}"; + arch = if stdenv.hostPlatform.system == "i686-linux" then "32" + else if stdenv.hostPlatform.system == "x86_64-linux" then "64" + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; in stdenv.mkDerivation rec { name = "pcsc-scm-scl-${version}"; diff --git a/pkgs/tools/security/sshuttle/default.nix b/pkgs/tools/security/sshuttle/default.nix index f7878df228f..c701b9dba73 100644 --- a/pkgs/tools/security/sshuttle/default.nix +++ b/pkgs/tools/security/sshuttle/default.nix @@ -12,7 +12,7 @@ python3Packages.buildPythonApplication rec { patches = [ ./sudo.patch ]; - nativeBuildInputs = [ makeWrapper python3Packages.setuptools_scm ] ++ stdenv.lib.optional (stdenv.system != "i686-linux") pandoc; + nativeBuildInputs = [ makeWrapper python3Packages.setuptools_scm ] ++ stdenv.lib.optional (stdenv.hostPlatform.system != "i686-linux") pandoc; buildInputs = [ coreutils openssh procps nettools ] ++ stdenv.lib.optionals stdenv.isLinux [ iptables ]; diff --git a/pkgs/tools/system/s6-rc/default.nix b/pkgs/tools/system/s6-rc/default.nix index f6eed5671ce..40c999d80f1 100644 --- a/pkgs/tools/system/s6-rc/default.nix +++ b/pkgs/tools/system/s6-rc/default.nix @@ -39,7 +39,7 @@ in stdenv.mkDerivation rec { "--with-dynlib=${s6.out}/lib" ] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/s6-rc/ diff --git a/pkgs/tools/system/s6/default.nix b/pkgs/tools/system/s6/default.nix index 035d4280494..d7ade3cdb29 100644 --- a/pkgs/tools/system/s6/default.nix +++ b/pkgs/tools/system/s6/default.nix @@ -40,7 +40,7 @@ in stdenv.mkDerivation rec { "--with-dynlib=${execline.lib}/lib" ] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]) - ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}"); + ++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}"); postInstall = '' mkdir -p $doc/share/doc/s6/ diff --git a/pkgs/tools/system/storebrowse/default.nix b/pkgs/tools/system/storebrowse/default.nix index e56919acc5d..e3b58a50c92 100644 --- a/pkgs/tools/system/storebrowse/default.nix +++ b/pkgs/tools/system/storebrowse/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { mkdir $TMPDIR/go export GOPATH=$TMPDIR/go - ${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"} + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"} GOSQLITE=$GOPATH/src/code.google.com/p/gosqlite mkdir -p $GOSQLITE diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index c0c06813dc9..15d54f4a2a4 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl # TODO: links -lsigsegv but loses the reference for some reason -, withSigsegv ? (false && stdenv.system != "x86_64-cygwin"), libsigsegv +, withSigsegv ? (false && stdenv.hostPlatform.system != "x86_64-cygwin"), libsigsegv , interactive ? false, readline /* Test suite broke on: diff --git a/pkgs/tools/text/xidel/default.nix b/pkgs/tools/text/xidel/default.nix index e1a0a5abf96..66dfa1c6b34 100644 --- a/pkgs/tools/text/xidel/default.nix +++ b/pkgs/tools/text/xidel/default.nix @@ -11,17 +11,17 @@ stdenv.mkDerivation rec { #}; src = - if stdenv.system == "x86_64-linux" then + if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_amd64.deb"; sha256 = "0hskc74y7p4j1x33yx0w4fvr610p2yimas8pxhr6bs7mb9b300h7"; } - else if stdenv.system == "i686-linux" then + else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_i386.deb"; sha256 = "07yk5sk1p4jm0jmgjwdm2wq8d2wybi1wkn1qq5j5y03z1pdc3fi6"; } - else throw "xidel is not supported on ${stdenv.system}"; + else throw "xidel is not supported on ${stdenv.hostPlatform.system}"; buildInputs = [ dpkg ]; diff --git a/pkgs/tools/typesetting/kindlegen/default.nix b/pkgs/tools/typesetting/kindlegen/default.nix index 4e9a40239bf..fc43ed0abe2 100644 --- a/pkgs/tools/typesetting/kindlegen/default.nix +++ b/pkgs/tools/typesetting/kindlegen/default.nix @@ -11,7 +11,7 @@ let "i686-darwin" = "0zniyn0s41fxqrajbgwxbcsj5vzf9m7a6yvdz2b11mphr00kpbbs"; "x86_64-cygwin" = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h"; "i686-cygwin" = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h"; - }."${stdenv.system}" or (throw "system #{stdenv.system.} is not supported"); + }."${stdenv.hostPlatform.system}" or (throw "system #{stdenv.hostPlatform.system.} is not supported"); url = { "x86_64-linux" = "http://kindlegen.s3.amazonaws.com/kindlegen_linux_2.6_i386_v${fileVersion}.tar.gz"; @@ -20,7 +20,7 @@ let "i686-darwin" = "http://kindlegen.s3.amazonaws.com/KindleGen_Mac_i386_v${fileVersion}.zip"; "x86_64-cygwin" = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip"; "i686-cygwin" = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip"; - }."${stdenv.system}" or (throw "system #{stdenv.system.} is not supported"); + }."${stdenv.hostPlatform.system}" or (throw "system #{stdenv.hostPlatform.system.} is not supported"); in stdenv.mkDerivation rec { name = "kindlegen-${version}"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 318b1941e9a..d6bb0f3cc4e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1744,7 +1744,7 @@ with pkgs; chunksync = callPackage ../tools/backup/chunksync { }; cipherscan = callPackage ../tools/security/cipherscan { - openssl = if stdenv.system == "x86_64-linux" + openssl = if stdenv.hostPlatform.system == "x86_64-linux" then openssl-chacha else openssl; }; @@ -6428,7 +6428,7 @@ with pkgs; gcc8Stdenv = overrideCC gccStdenv gcc8; wrapCCMulti = cc: - if system == "x86_64-linux" then let + if stdenv.targetPlatform.system == "x86_64-linux" then let # Binutils with glibc multi bintools = cc.bintools.override { libc = glibc_multi; @@ -6448,16 +6448,16 @@ with pkgs; extraBuildCommands = '' echo "dontMoveLib64=1" >> $out/nix-support/setup-hook ''; - }) else throw "Multilib ${cc.name} not supported on ‘${system}’"; + }) else throw "Multilib ${cc.name} not supported for ‘${stdenv.targetPlatform.system}’"; wrapClangMulti = clang: - if system == "x86_64-linux" then + if stdenv.targetPlatform.system == "x86_64-linux" then callPackage ../development/compilers/llvm/multi.nix { inherit clang; gcc32 = pkgsi686Linux.gcc; gcc64 = pkgs.gcc; } - else throw "Multilib ${clang.cc.name} not supported on '${system}'"; + else throw "Multilib ${clang.cc.name} not supported for '${stdenv.targetPlatform.system}'"; gcc_multi = wrapCCMulti gcc; clang_multi = wrapClangMulti clang; @@ -11137,7 +11137,7 @@ with pkgs; # Default derivation with libGL.so.1 to link into /run/opengl-drivers (if need) libGL_driver = libGLDarwinOr mesa_drivers; - libGLSupported = lib.elem system lib.platforms.mesaPlatforms; + libGLSupported = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms; libGLDarwin = callPackage ../development/libraries/mesa-darwin { inherit (darwin.apple_sdk.frameworks) OpenGL; @@ -12410,21 +12410,21 @@ with pkgs; wxGTK28 = callPackage ../development/libraries/wxwidgets/2.8 { inherit (gnome2) GConf; - withMesa = lib.elem system lib.platforms.mesaPlatforms; + withMesa = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms; }; wxGTK29 = callPackage ../development/libraries/wxwidgets/2.9 { inherit (gnome2) GConf; inherit (darwin.stubs) setfile; inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QuickTime; - withMesa = lib.elem system lib.platforms.mesaPlatforms; + withMesa = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms; }; wxGTK30 = callPackage ../development/libraries/wxwidgets/3.0 { inherit (gnome2) GConf; inherit (darwin.stubs) setfile; inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit; - withMesa = lib.elem system lib.platforms.mesaPlatforms; + withMesa = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms; }; wxGTK31 = callPackage ../development/libraries/wxwidgets/3.1 {}; @@ -17648,7 +17648,7 @@ with pkgs; }) murmur_git; mumble_overlay = callPackage ../applications/networking/mumble/overlay.nix { - mumble_i686 = if system == "x86_64-linux" + mumble_i686 = if stdenv.hostPlatform.system == "x86_64-linux" then pkgsi686Linux.mumble else null; }; @@ -19049,7 +19049,7 @@ with pkgs; }; virtualgl = callPackage ../tools/X11/virtualgl { - virtualglLib_i686 = if system == "x86_64-linux" + virtualglLib_i686 = if stdenv.hostPlatform.system == "x86_64-linux" then pkgsi686Linux.virtualglLib else null; }; @@ -19062,17 +19062,17 @@ with pkgs; primus = callPackage ../tools/X11/primus { stdenv_i686 = pkgsi686Linux.stdenv; - primusLib_i686 = if system == "x86_64-linux" + primusLib_i686 = if stdenv.hostPlatform.system == "x86_64-linux" then pkgsi686Linux.primusLib else null; }; bumblebee = callPackage ../tools/X11/bumblebee { nvidia_x11 = linuxPackages.nvidia_x11; - nvidia_x11_i686 = if system == "x86_64-linux" + nvidia_x11_i686 = if stdenv.hostPlatform.system == "x86_64-linux" then pkgsi686Linux.linuxPackages.nvidia_x11.override { libsOnly = true; } else null; - libglvnd_i686 = if system == "x86_64-linux" + libglvnd_i686 = if stdenv.hostPlatform.system == "x86_64-linux" then pkgsi686Linux.libglvnd else null; }; @@ -21629,7 +21629,7 @@ with pkgs; */ nixos = configuration: (import (self.path + "/nixos/lib/eval-config.nix") { - inherit (pkgs) system; + inherit (pkgs.stdenv.hostPlatform) system; modules = [( { lib, ... }: { config.nixpkgs.pkgs = lib.mkDefault pkgs; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 5787f84335b..f371e9aa872 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1,6 +1,8 @@ -{ lib, callPackage, newScope, pkgs, config, system }: +{ lib, callPackage, newScope, pkgs, config }: let + inherit (pkgs.stdenv.hostPlatform) system; + mkOcamlPackages = ocaml: overrides: let packageSet = self: diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 96c44cd2a1e..15ec15732f2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2792,13 +2792,13 @@ in { }; }; - gurobipy = if stdenv.system == "x86_64-darwin" + gurobipy = if stdenv.hostPlatform.system == "x86_64-darwin" then callPackage ../development/python-modules/gurobipy/darwin.nix { inherit (pkgs.darwin) cctools insert_dylib; } - else if stdenv.system == "x86_64-linux" + else if stdenv.hostPlatform.system == "x86_64-linux" then callPackage ../development/python-modules/gurobipy/linux.nix {} - else throw "gurobipy not yet supported on ${stdenv.system}"; + else throw "gurobipy not yet supported on ${stdenv.hostPlatform.system}"; hbmqtt = callPackage ../development/python-modules/hbmqtt { }; From 0828e2d8c369604c56219bd7085256b984087280 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 20 Aug 2018 14:43:41 -0400 Subject: [PATCH 092/123] treewide: Remove usage of remaining redundant platform compatability stuff Want to get this out of here for 18.09, so it can be deprecated thereafter. --- doc/languages-frameworks/rust.section.md | 8 +-- pkgs/applications/audio/mpg123/default.nix | 6 +- pkgs/applications/editors/ed/default.nix | 3 +- pkgs/applications/editors/vim/default.nix | 5 +- .../applications/graphics/ImageMagick/7.0.nix | 7 +- .../graphics/ImageMagick/default.nix | 9 ++- .../networking/cluster/minikube/default.nix | 8 +-- .../networking/remote/putty/default.nix | 17 ++--- pkgs/applications/video/omxplayer/default.nix | 7 +- .../virtualization/vpcs/default.nix | 4 +- .../window-managers/way-cooler/way-cooler.nix | 4 +- .../window-managers/way-cooler/wc-bg.nix | 4 +- .../window-managers/way-cooler/wc-grab.nix | 4 +- .../window-managers/way-cooler/wc-lock.nix | 4 +- pkgs/build-support/kernel/make-initrd.nix | 3 +- pkgs/build-support/rust/build-rust-crate.nix | 24 +++---- .../rust/cargo-vendor/cargo-vendor.nix | 6 +- pkgs/build-support/rust/carnix.nix | 6 +- .../development/compilers/gcc/4.8/default.nix | 14 ++-- .../development/compilers/gcc/4.9/default.nix | 14 ++-- pkgs/development/compilers/gcc/5/default.nix | 14 ++-- pkgs/development/compilers/gcc/6/default.nix | 14 ++-- pkgs/development/compilers/gcc/7/default.nix | 14 ++-- pkgs/development/compilers/gcc/8/default.nix | 14 ++-- .../compilers/gcc/snapshot/default.nix | 14 ++-- pkgs/development/compilers/ghc/7.10.3.nix | 9 +-- pkgs/development/compilers/ghc/8.0.2.nix | 9 +-- pkgs/development/compilers/ghc/8.2.2.nix | 9 +-- pkgs/development/compilers/ghc/8.4.3.nix | 13 ++-- pkgs/development/compilers/ghc/8.6.1.nix | 13 ++-- pkgs/development/compilers/ghc/head.nix | 13 ++-- pkgs/development/compilers/llvm/3.9/llvm.nix | 8 +-- pkgs/development/compilers/rust/rustc.nix | 1 - .../haskell-modules/generic-builder.nix | 17 +++-- .../haskell-modules/with-packages-wrapper.nix | 6 +- pkgs/development/interpreters/guile/1.8.nix | 3 +- pkgs/development/interpreters/guile/2.0.nix | 3 +- .../interpreters/guile/default.nix | 3 +- .../python/cpython/2.7/default.nix | 22 +++---- pkgs/development/libraries/SDL/default.nix | 5 +- pkgs/development/libraries/attr/default.nix | 4 +- .../libraries/boehm-gc/default.nix | 5 +- pkgs/development/libraries/boost/1.66.nix | 2 +- pkgs/development/libraries/boost/1.67.nix | 2 +- pkgs/development/libraries/boost/1.68.nix | 2 +- pkgs/development/libraries/boost/generic.nix | 38 +++++------ pkgs/development/libraries/c-ares/default.nix | 6 +- .../libraries/ffmpeg-full/default.nix | 5 +- pkgs/development/libraries/ffmpeg/generic.nix | 5 +- .../development/libraries/fontconfig/2.10.nix | 5 +- .../libraries/fontconfig/default.nix | 5 +- .../libraries/gcc/libgcc/default.nix | 24 +++---- pkgs/development/libraries/gdbm/default.nix | 4 +- .../development/libraries/gettext/default.nix | 8 +-- pkgs/development/libraries/glew/1.10.nix | 5 +- pkgs/development/libraries/glew/default.nix | 5 +- pkgs/development/libraries/glibc/common.nix | 11 ++-- pkgs/development/libraries/gmp/6.x.nix | 4 +- pkgs/development/libraries/icu/base.nix | 4 +- pkgs/development/libraries/libav/default.nix | 5 +- pkgs/development/libraries/libb2/default.nix | 4 +- pkgs/development/libraries/libelf/default.nix | 7 +- pkgs/development/libraries/libffi/default.nix | 10 +-- .../libraries/libiconv/default.nix | 5 +- .../libraries/libjpeg-turbo/default.nix | 3 +- pkgs/development/libraries/libpng/12.nix | 6 +- .../development/libraries/libssh2/default.nix | 6 +- pkgs/development/libraries/libvpx/default.nix | 19 +++--- pkgs/development/libraries/libvpx/git.nix | 19 +++--- .../development/libraries/libxml2/default.nix | 7 +- .../development/libraries/libxslt/default.nix | 5 +- .../libraries/microsoft_gsl/default.nix | 3 +- pkgs/development/libraries/mpfr/default.nix | 8 +-- .../development/libraries/msgpack/generic.nix | 3 +- .../development/libraries/ncurses/default.nix | 7 +- .../libraries/nlohmann_json/default.nix | 3 +- .../development/libraries/openssl/default.nix | 29 ++++----- pkgs/development/libraries/pcre/default.nix | 7 +- pkgs/development/libraries/readline/6.2.nix | 3 +- pkgs/development/libraries/readline/6.3.nix | 6 +- pkgs/development/libraries/readline/7.0.nix | 3 +- pkgs/development/libraries/zlib/default.nix | 17 +++-- .../mobile/androidenv/androidndk-pkgs.nix | 28 ++++---- .../python-modules/numpy/default.nix | 4 +- .../python-modules/pyserial/default.nix | 4 +- .../tools/build-managers/cmake/2.8.nix | 3 +- .../tools/build-managers/meson/default.nix | 10 +-- .../tools/misc/binutils/default.nix | 13 ++-- pkgs/development/tools/misc/gdb/default.nix | 10 ++- pkgs/development/tools/misc/gnum4/default.nix | 4 +- .../tools/misc/help2man/default.nix | 6 +- .../tools/misc/libtool/libtool2.nix | 3 +- pkgs/development/tools/xcbuild/wrapper.nix | 7 +- pkgs/games/scummvm/default.nix | 1 - pkgs/games/xjump/default.nix | 4 +- pkgs/misc/emulators/retroarch/default.nix | 4 +- pkgs/os-specific/bsd/netbsd/default.nix | 8 +-- .../libiconv/default.nix | 6 +- pkgs/os-specific/darwin/cctools/port.nix | 13 ++-- pkgs/os-specific/darwin/xcode/default.nix | 4 +- .../linux/busybox/sandbox-shell.nix | 4 +- .../linux/kernel-headers/default.nix | 7 +- pkgs/os-specific/linux/kernel/generic.nix | 23 ++++--- pkgs/os-specific/linux/kernel/linux-4.14.nix | 2 +- pkgs/os-specific/linux/kernel/linux-4.17.nix | 2 +- pkgs/os-specific/linux/kernel/linux-4.18.nix | 2 +- pkgs/os-specific/linux/kernel/linux-4.4.nix | 2 +- pkgs/os-specific/linux/kernel/linux-4.9.nix | 2 +- .../linux/kernel/linux-beagleboard.nix | 2 +- .../linux/kernel/linux-copperhead-lts.nix | 2 +- .../linux/kernel/linux-hardkernel-4.14.nix | 2 +- .../linux/kernel/linux-mptcp-93.nix | 2 +- pkgs/os-specific/linux/kernel/linux-mptcp.nix | 2 +- pkgs/os-specific/linux/kernel/linux-riscv.nix | 2 +- pkgs/os-specific/linux/kernel/linux-rpi.nix | 2 +- .../linux/kernel/linux-samus-4.12.nix | 2 +- .../linux/kernel/linux-testing-bcachefs.nix | 2 +- .../linux/kernel/linux-testing.nix | 2 +- .../linux/kernel/manual-config.nix | 10 ++- pkgs/os-specific/linux/klibc/default.nix | 12 ++-- pkgs/os-specific/linux/mdadm/default.nix | 3 +- pkgs/os-specific/linux/musl/default.nix | 4 +- pkgs/os-specific/linux/pam/default.nix | 6 +- pkgs/os-specific/linux/shadow/default.nix | 9 ++- pkgs/os-specific/linux/systemd/default.nix | 3 +- pkgs/os-specific/linux/uclibc/default.nix | 7 +- .../windows/pthread-w32/default.nix | 4 +- .../os-specific/windows/wxMSW-2.8/default.nix | 4 +- pkgs/shells/bash/4.4.nix | 19 +++--- pkgs/stdenv/cross/default.nix | 5 +- pkgs/stdenv/darwin/default.nix | 4 +- pkgs/stdenv/linux/default.nix | 2 +- pkgs/tools/archivers/zpaq/zpaqd.nix | 12 ++-- pkgs/tools/graphics/optipng/default.nix | 5 +- pkgs/tools/misc/coreutils/default.nix | 25 ++++--- pkgs/tools/misc/findutils/default.nix | 9 ++- pkgs/tools/misc/otfcc/default.nix | 4 +- pkgs/tools/misc/ttyrec/default.nix | 4 +- .../cargo-edit/cargo-edit.nix | 2 +- .../cargo-update/cargo-update.nix | 6 +- pkgs/tools/package-management/nix/default.nix | 5 +- pkgs/tools/text/gnupatch/default.nix | 5 +- pkgs/tools/text/html-tidy/default.nix | 6 +- pkgs/top-level/aliases.nix | 2 +- pkgs/top-level/all-packages.nix | 65 +++++++++---------- pkgs/top-level/darwin-packages.nix | 2 +- pkgs/top-level/haskell-packages.nix | 2 - pkgs/top-level/splice.nix | 8 +-- pkgs/top-level/unix-tools.nix | 8 +-- 149 files changed, 545 insertions(+), 603 deletions(-) diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md index eec982d4c90..6588281878a 100644 --- a/doc/languages-frameworks/rust.section.md +++ b/doc/languages-frameworks/rust.section.md @@ -93,8 +93,8 @@ Now, the file produced by the call to `carnix`, called `hello.nix`, looks like: ``` # Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone -{ lib, buildPlatform, buildRustCrate, fetchgit }: -let kernel = buildPlatform.parsed.kernel.name; +{ lib, stdenv, buildRustCrate, fetchgit }: +let kernel = stdenv.buildPlatform.parsed.kernel.name; # ... (content skipped) in rec { @@ -122,8 +122,8 @@ following nix file: ``` # Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone -{ lib, buildPlatform, buildRustCrate, fetchgit }: -let kernel = buildPlatform.parsed.kernel.name; +{ lib, stdenv, buildRustCrate, fetchgit }: +let kernel = stdenv.buildPlatform.parsed.kernel.name; # ... (content skipped) in rec { diff --git a/pkgs/applications/audio/mpg123/default.nix b/pkgs/applications/audio/mpg123/default.nix index 3aef2e35943..44f1c681ec1 100644 --- a/pkgs/applications/audio/mpg123/default.nix +++ b/pkgs/applications/audio/mpg123/default.nix @@ -1,6 +1,5 @@ { stdenv , fetchurl, alsaLib -, hostPlatform }: stdenv.mkDerivation rec { @@ -13,8 +12,9 @@ stdenv.mkDerivation rec { buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib; - configureFlags = - stdenv.lib.optional (hostPlatform ? mpg123) "--with-cpu=${hostPlatform.mpg123.cpu}"; + configureFlags = stdenv.lib.optional + (stdenv.hostPlatform ? mpg123) + "--with-cpu=${stdenv.hostPlatform.mpg123.cpu}"; meta = { description = "Fast console MPEG Audio Player and decoder library"; diff --git a/pkgs/applications/editors/ed/default.nix b/pkgs/applications/editors/ed/default.nix index 832dc3c0e79..536b319cab0 100644 --- a/pkgs/applications/editors/ed/default.nix +++ b/pkgs/applications/editors/ed/default.nix @@ -1,5 +1,4 @@ { stdenv, fetchurl, lzip -, buildPlatform, hostPlatform }: stdenv.mkDerivation (rec { @@ -36,7 +35,7 @@ stdenv.mkDerivation (rec { maintainers = [ ]; platforms = stdenv.lib.platforms.unix; }; -} // stdenv.lib.optionalAttrs (hostPlatform != buildPlatform) { +} // stdenv.lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) { # This may be moved above during a stdenv rebuild. preConfigure = '' configureFlagsArray+=("CC=$CC") diff --git a/pkgs/applications/editors/vim/default.nix b/pkgs/applications/editors/vim/default.nix index 067179974b1..26cd61d182b 100644 --- a/pkgs/applications/editors/vim/default.nix +++ b/pkgs/applications/editors/vim/default.nix @@ -7,7 +7,6 @@ } # apple frameworks , Carbon, Cocoa -, buildPlatform, hostPlatform }: let @@ -20,12 +19,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gettext pkgconfig ]; buildInputs = [ ncurses ] - ++ stdenv.lib.optionals hostPlatform.isDarwin [ Carbon Cocoa ]; + ++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ]; configureFlags = [ "--enable-multibyte" "--enable-nls" - ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "vim_cv_toupper_broken=no" "--with-tlib=ncurses" "vim_cv_terminfo=yes" diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix index 893f8d1da6d..7881741a1cb 100644 --- a/pkgs/applications/graphics/ImageMagick/7.0.nix +++ b/pkgs/applications/graphics/ImageMagick/7.0.nix @@ -2,7 +2,6 @@ , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp, libheif , ApplicationServices -, hostPlatform }: let @@ -46,7 +45,7 @@ stdenv.mkDerivation rec { [ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts" "--with-gslib" ] - ++ lib.optionals hostPlatform.isMinGW + ++ lib.optionals stdenv.hostPlatform.isMinGW [ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM ; @@ -56,13 +55,13 @@ stdenv.mkDerivation rec { [ zlib fontconfig freetype ghostscript libpng libtiff libxml2 libheif ] - ++ lib.optionals (!hostPlatform.isMinGW) + ++ lib.optionals (!stdenv.hostPlatform.isMinGW) [ openexr librsvg openjpeg ] ++ lib.optional stdenv.isDarwin ApplicationServices; propagatedBuildInputs = [ bzip2 freetype libjpeg lcms2 ] - ++ lib.optionals (!hostPlatform.isMinGW) + ++ lib.optionals (!stdenv.hostPlatform.isMinGW) [ libX11 libXext libXt libwebp ] ; diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index 22d1341f0dc..5220fdf8981 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -2,7 +2,6 @@ , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp, fftw, libheif, libde265 , ApplicationServices -, hostPlatform }: let @@ -20,7 +19,7 @@ let } # Freeze version on mingw so we don't need to port the patch too often. # FIXME: This version has multiple security vulnerabilities - // lib.optionalAttrs (hostPlatform.isMinGW) { + // lib.optionalAttrs (stdenv.hostPlatform.isMinGW) { version = "6.9.2-0"; sha256 = "17ir8bw1j7g7srqmsz3rx780sgnc21zfn0kwyj78iazrywldx8h7"; patches = [(fetchpatch { @@ -58,7 +57,7 @@ stdenv.mkDerivation rec { [ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts" "--with-gslib" ] - ++ lib.optionals (hostPlatform.isMinGW) + ++ lib.optionals (stdenv.hostPlatform.isMinGW) [ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM ; @@ -68,13 +67,13 @@ stdenv.mkDerivation rec { [ zlib fontconfig freetype ghostscript libpng libtiff libxml2 libheif libde265 ] - ++ lib.optionals (!hostPlatform.isMinGW) + ++ lib.optionals (!stdenv.hostPlatform.isMinGW) [ openexr librsvg openjpeg ] ++ lib.optional stdenv.isDarwin ApplicationServices; propagatedBuildInputs = [ bzip2 freetype libjpeg lcms2 fftw ] - ++ lib.optionals (!hostPlatform.isMinGW) + ++ lib.optionals (!stdenv.hostPlatform.isMinGW) [ libX11 libXext libXt libwebp ] ; diff --git a/pkgs/applications/networking/cluster/minikube/default.nix b/pkgs/applications/networking/cluster/minikube/default.nix index b674f1f6458..37431b0fbc4 100644 --- a/pkgs/applications/networking/cluster/minikube/default.nix +++ b/pkgs/applications/networking/cluster/minikube/default.nix @@ -1,5 +1,5 @@ { stdenv, buildGoPackage, fetchFromGitHub, go-bindata, libvirt, qemu -, gpgme, makeWrapper, hostPlatform, vmnet, python +, gpgme, makeWrapper, vmnet, python , docker-machine-kvm, docker-machine-kvm2 , extraDrivers ? [] }: @@ -25,8 +25,8 @@ in buildGoPackage rec { sha256 = "0c36rzsdzxf9q6l4hl506bsd4qwmw033i0k1xhqszv9agg7qjlmm"; }; - buildInputs = [ go-bindata makeWrapper gpgme ] ++ stdenv.lib.optional hostPlatform.isDarwin vmnet; - subPackages = [ "cmd/minikube" ] ++ stdenv.lib.optional hostPlatform.isDarwin "cmd/drivers/hyperkit"; + buildInputs = [ go-bindata makeWrapper gpgme ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin vmnet; + subPackages = [ "cmd/minikube" ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "cmd/drivers/hyperkit"; preBuild = '' pushd go/src/${goPackagePath} >/dev/null @@ -56,7 +56,7 @@ in buildGoPackage rec { postFixup = '' wrapProgram $bin/bin/${pname} --prefix PATH : $bin/bin:${stdenv.lib.makeBinPath binPath} - '' + stdenv.lib.optionalString hostPlatform.isDarwin '' + '' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' mv $bin/bin/hyperkit $bin/bin/docker-machine-driver-hyperkit ''; diff --git a/pkgs/applications/networking/remote/putty/default.nix b/pkgs/applications/networking/remote/putty/default.nix index e07bf7958f3..13613774b7c 100644 --- a/pkgs/applications/networking/remote/putty/default.nix +++ b/pkgs/applications/networking/remote/putty/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool +{ stdenv, lib, fetchurl, autoconf, automake, pkgconfig, libtool , gtk2, halibut, ncurses, perl -, hostPlatform, lib }: +}: stdenv.mkDerivation rec { version = "0.70"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { sha256 = "1gmhwwj1y7b5hgkrkxpf4jddjpk9l5832zq5ibhsiicndsfs92mv"; }; - preConfigure = lib.optionalString hostPlatform.isUnix '' + preConfigure = lib.optionalString stdenv.hostPlatform.isUnix '' perl mkfiles.pl ( cd doc ; make ); sed -e '/AM_PATH_GTK(/d' \ @@ -22,22 +22,23 @@ stdenv.mkDerivation rec { -e '/AC_OUTPUT/iAM_PROG_AR' -i configure.ac ./mkauto.sh cd unix - '' + lib.optionalString hostPlatform.isWindows '' + '' + lib.optionalString stdenv.hostPlatform.isWindows '' cd windows ''; TOOLPATH = stdenv.cc.targetPrefix; - makefile = if hostPlatform.isWindows then "Makefile.mgw" else null; + makefile = if stdenv.hostPlatform.isWindows then "Makefile.mgw" else null; - installPhase = if hostPlatform.isWindows then '' + installPhase = if stdenv.hostPlatform.isWindows then '' for exe in *.exe; do install -D $exe $out/bin/$exe done '' else null; nativeBuildInputs = [ autoconf automake halibut libtool perl pkgconfig ]; - buildInputs = [] - ++ lib.optionals hostPlatform.isUnix [ gtk2 ncurses ]; + buildInputs = lib.optionals stdenv.hostPlatform.isUnix [ + gtk2 ncurses + ]; enableParallelBuilding = true; meta = with lib; { diff --git a/pkgs/applications/video/omxplayer/default.nix b/pkgs/applications/video/omxplayer/default.nix index 00a419d0a85..7a130bbdb41 100644 --- a/pkgs/applications/video/omxplayer/default.nix +++ b/pkgs/applications/video/omxplayer/default.nix @@ -1,6 +1,5 @@ { stdenv, fetchurl , raspberrypifw, pcre, boost, freetype, zlib -, hostPlatform }: let @@ -14,7 +13,7 @@ let configurePlatforms = []; configureFlags = [ - "--arch=${hostPlatform.parsed.cpu.name}" + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" ] ++ stdenv.lib.optionals stdenv.hostPlatform.isAarch32 [ # TODO be better with condition "--cpu=arm1176jzf-s" @@ -46,8 +45,8 @@ let "--enable-hardcoded-tables" "--disable-runtime-cpudetect" "--disable-debug" - "--arch=${hostPlatform.parsed.cpu.name}" - "--target_os=${hostPlatform.parsed.kernel.name}" + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" + "--target_os=${stdenv.hostPlatform.parsed.kernel.name}" ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" diff --git a/pkgs/applications/virtualization/vpcs/default.nix b/pkgs/applications/virtualization/vpcs/default.nix index 65435e19366..3d6efcfc844 100644 --- a/pkgs/applications/virtualization/vpcs/default.nix +++ b/pkgs/applications/virtualization/vpcs/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, glibc, buildPlatform }: +{ stdenv, fetchurl, glibc }: stdenv.mkDerivation rec { name = "${pname}-${version}"; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildPhase = ''( cd src - ./mk.sh ${buildPlatform.platform.kernelArch} + ./mk.sh ${stdenv.buildPlatform.platform.kernelArch} )''; installPhase = '' diff --git a/pkgs/applications/window-managers/way-cooler/way-cooler.nix b/pkgs/applications/window-managers/way-cooler/way-cooler.nix index 8a740b15500..d7816be5625 100644 --- a/pkgs/applications/window-managers/way-cooler/way-cooler.nix +++ b/pkgs/applications/window-managers/way-cooler/way-cooler.nix @@ -1,6 +1,6 @@ # Generated by carnix 0.6.5: carnix -o way-cooler.nix Cargo.lock -{ lib, buildPlatform, buildRustCrate, fetchgit }: -let kernel = buildPlatform.parsed.kernel.name; +{ lib, stdenv, buildRustCrate, fetchgit }: +let kernel = stdenv.buildPlatform.parsed.kernel.name; updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); mapFeatures = features: map (fun: fun { features = features; }); mkFeatures = feat: lib.lists.foldl (features: featureName: diff --git a/pkgs/applications/window-managers/way-cooler/wc-bg.nix b/pkgs/applications/window-managers/way-cooler/wc-bg.nix index c63123db7cc..4d527715c5f 100644 --- a/pkgs/applications/window-managers/way-cooler/wc-bg.nix +++ b/pkgs/applications/window-managers/way-cooler/wc-bg.nix @@ -1,6 +1,6 @@ # Generated by carnix 0.6.5: carnix -o wc-bg.nix Cargo.lock -{ lib, buildPlatform, buildRustCrate, fetchgit }: -let kernel = buildPlatform.parsed.kernel.name; +{ lib, stdenv, buildRustCrate, fetchgit }: +let kernel = stdenv.buildPlatform.parsed.kernel.name; updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); mapFeatures = features: map (fun: fun { features = features; }); mkFeatures = feat: lib.lists.foldl (features: featureName: diff --git a/pkgs/applications/window-managers/way-cooler/wc-grab.nix b/pkgs/applications/window-managers/way-cooler/wc-grab.nix index 947a9653e56..6f936eb2e43 100644 --- a/pkgs/applications/window-managers/way-cooler/wc-grab.nix +++ b/pkgs/applications/window-managers/way-cooler/wc-grab.nix @@ -1,6 +1,6 @@ # Generated by carnix 0.6.5: carnix -o wc-grab.nix Cargo.lock -{ lib, buildPlatform, buildRustCrate, fetchgit }: -let kernel = buildPlatform.parsed.kernel.name; +{ lib, stdenv, buildRustCrate, fetchgit }: +let kernel = stdenv.hostPlatform.parsed.kernel.name; updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); mapFeatures = features: map (fun: fun { features = features; }); mkFeatures = feat: lib.lists.foldl (features: featureName: diff --git a/pkgs/applications/window-managers/way-cooler/wc-lock.nix b/pkgs/applications/window-managers/way-cooler/wc-lock.nix index 008df5479ce..1b9e3df3508 100644 --- a/pkgs/applications/window-managers/way-cooler/wc-lock.nix +++ b/pkgs/applications/window-managers/way-cooler/wc-lock.nix @@ -1,6 +1,6 @@ # Generated by carnix 0.6.5: carnix -o wc-lock.nix Cargo.lock -{ lib, buildPlatform, buildRustCrate, fetchgit }: -let kernel = buildPlatform.parsed.kernel.name; +{ lib, stdenv, buildRustCrate, fetchgit }: +let kernel = stdenv.hostPlatform.parsed.kernel.name; updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); mapFeatures = features: map (fun: fun { features = features; }); mkFeatures = feat: lib.lists.foldl (features: featureName: diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix index 262bee608ed..22761af158a 100644 --- a/pkgs/build-support/kernel/make-initrd.nix +++ b/pkgs/build-support/kernel/make-initrd.nix @@ -13,14 +13,13 @@ # argument. { stdenv, perl, cpio, contents, compressor, prepend, ubootTools -, hostPlatform }: stdenv.mkDerivation rec { name = "initrd"; builder = ./make-initrd.sh; - makeUInitrd = hostPlatform.platform.kernelTarget == "uImage"; + makeUInitrd = stdenv.hostPlatform.platform.kernelTarget == "uImage"; nativeBuildInputs = [ perl cpio ] ++ stdenv.lib.optional makeUInitrd ubootTools; diff --git a/pkgs/build-support/rust/build-rust-crate.nix b/pkgs/build-support/rust/build-rust-crate.nix index 6c7dd67c400..6605aa27b21 100644 --- a/pkgs/build-support/rust/build-rust-crate.nix +++ b/pkgs/build-support/rust/build-rust-crate.nix @@ -4,7 +4,7 @@ # This can be useful for deploying packages with NixOps, and to share # binary dependencies between projects. -{ lib, buildPlatform, stdenv, defaultCrateOverrides, fetchCrate, ncurses, rustc }: +{ lib, stdenv, defaultCrateOverrides, fetchCrate, ncurses, rustc }: let makeDeps = dependencies: (lib.concatMapStringsSep " " (dep: @@ -12,14 +12,14 @@ let makeDeps = dependencies: (if dep.crateType == "lib" then " --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}.rlib" else - " --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}${buildPlatform.extensions.sharedLibrary}") + " --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}") ) dependencies); # This doesn't appear to be officially documented anywhere yet. # See https://github.com/rust-lang-nursery/rust-forge/issues/101. - target_os = if buildPlatform.isDarwin + target_os = if stdenv.hostPlatform.isDarwin then "macos" - else buildPlatform.parsed.kernel.name; + else stdenv.hostPlatform.parsed.kernel.name; echo_build_heading = colors: '' echo_build_heading() { @@ -106,20 +106,20 @@ let makeDeps = dependencies: export CARGO_PKG_VERSION=${crateVersion} export CARGO_PKG_AUTHORS="${authors}" - export CARGO_CFG_TARGET_ARCH=${buildPlatform.parsed.cpu.name} + export CARGO_CFG_TARGET_ARCH=${stdenv.hostPlatform.parsed.cpu.name} export CARGO_CFG_TARGET_OS=${target_os} export CARGO_CFG_TARGET_FAMILY="unix" export CARGO_CFG_UNIX=1 export CARGO_CFG_TARGET_ENV="gnu" - export CARGO_CFG_TARGET_ENDIAN=${if buildPlatform.parsed.cpu.significantByte.name == "littleEndian" then "little" else "big"} - export CARGO_CFG_TARGET_POINTER_WIDTH=${toString buildPlatform.parsed.cpu.bits} - export CARGO_CFG_TARGET_VENDOR=${buildPlatform.parsed.vendor.name} + export CARGO_CFG_TARGET_ENDIAN=${if stdenv.hostPlatform.parsed.cpu.significantByte.name == "littleEndian" then "little" else "big"} + export CARGO_CFG_TARGET_POINTER_WIDTH=${toString stdenv.hostPlatform.parsed.cpu.bits} + export CARGO_CFG_TARGET_VENDOR=${stdenv.hostPlatform.parsed.vendor.name} export CARGO_MANIFEST_DIR="." export DEBUG="${toString (!release)}" export OPT_LEVEL="${toString optLevel}" - export TARGET="${buildPlatform.config}" - export HOST="${buildPlatform.config}" + export TARGET="${stdenv.hostPlatform.config}" + export HOST="${stdenv.hostPlatform.config}" export PROFILE=${if release then "release" else "debug"} export OUT_DIR=$(pwd)/target/build/${crateName}.out export CARGO_PKG_VERSION_MAJOR=${builtins.elemAt version 0} @@ -218,8 +218,8 @@ let makeDeps = dependencies: $BUILD_OUT_DIR $EXTRA_BUILD $EXTRA_FEATURES --color ${colors} EXTRA_LIB=" --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}.rlib" - if [ -e target/deps/lib$CRATE_NAME-${metadata}${buildPlatform.extensions.sharedLibrary} ]; then - EXTRA_LIB="$EXTRA_LIB --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}${buildPlatform.extensions.sharedLibrary}" + if [ -e target/deps/lib$CRATE_NAME-${metadata}${stdenv.hostPlatform.extensions.sharedLibrary} ]; then + EXTRA_LIB="$EXTRA_LIB --extern $CRATE_NAME=target/lib/lib$CRATE_NAME-${metadata}${stdenv.hostPlatform.extensions.sharedLibrary}" fi } diff --git a/pkgs/build-support/rust/cargo-vendor/cargo-vendor.nix b/pkgs/build-support/rust/cargo-vendor/cargo-vendor.nix index 486f365f78a..0779ac0537f 100644 --- a/pkgs/build-support/rust/cargo-vendor/cargo-vendor.nix +++ b/pkgs/build-support/rust/cargo-vendor/cargo-vendor.nix @@ -1,7 +1,7 @@ # Generated by carnix 0.5.2: carnix Cargo.lock -o cargo-vendor.nix -{ lib, buildPlatform, buildRustCrate }: -let kernel = buildPlatform.parsed.kernel.name; - abi = buildPlatform.parsed.abi.name; +{ lib, stdenv, buildRustCrate }: +let kernel = stdenv.hostPlatform.parsed.kernel.name; + abi = stdenv.hostPlatform.parsed.abi.name; hasFeature = feature: lib.lists.any (originName: feature.${originName}) diff --git a/pkgs/build-support/rust/carnix.nix b/pkgs/build-support/rust/carnix.nix index 22d3fcd0c1f..0b8b3d60b6c 100644 --- a/pkgs/build-support/rust/carnix.nix +++ b/pkgs/build-support/rust/carnix.nix @@ -1,7 +1,7 @@ # Generated by carnix 0.7.2: carnix nix -{ lib, buildPlatform, buildRustCrate, fetchgit }: -let kernel = buildPlatform.parsed.kernel.name; - abi = buildPlatform.parsed.abi.name; +{ lib, stdenv, buildRustCrate, fetchgit }: +let kernel = stdenv.hostPlatform.parsed.kernel.name; + abi = stdenv.hostPlatform.parsed.abi.name; updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); mapFeatures = features: map (fun: fun { features = features; }); mkFeatures = feat: lib.lists.foldl (features: featureName: diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 3e9ddacac1b..ed185b4be1a 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langJava ? false , langGo ? false , profiledCompiler ? false @@ -20,14 +20,14 @@ , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null , x11Support ? langJava , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -42,7 +42,7 @@ assert cloog != null -> isl != null; assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -54,6 +54,8 @@ let version = "4.8.5"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ ] ++ optional enableParallelBuilding ../parallel-bconfig.patch ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 9b4444b905d..3f13562c1b8 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, noSysDirs, fetchpatch , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langJava ? false , langGo ? false , profiledCompiler ? false @@ -20,14 +20,14 @@ , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null , x11Support ? langJava , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -42,7 +42,7 @@ assert cloog != null -> isl != null; assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -54,6 +54,8 @@ let version = "4.9.4"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ ../use-source-date-epoch.patch ] ++ optionals enableParallelBuilding [ ../parallel-bconfig.patch ./parallel-strsignal.patch ] diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 3fdec1ec310..497ca40c3ae 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langJava ? false , langGo ? false , profiledCompiler ? false @@ -20,15 +20,15 @@ , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null , x11Support ? langJava , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -40,7 +40,7 @@ assert langJava -> zip != null && unzip != null assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -53,6 +53,8 @@ let version = "5.5.0"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ ../use-source-date-epoch.patch ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 099e26375f4..3f5d3172d12 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langJava ? false , langGo ? false , profiledCompiler ? false @@ -20,15 +20,15 @@ , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null , x11Support ? langJava , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -40,7 +40,7 @@ assert langJava -> zip != null && unzip != null assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -52,6 +52,8 @@ let version = "6.4.0"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ ../use-source-date-epoch.patch ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 60e429cc4da..30c1611f5fb 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langGo ? false , profiledCompiler ? false , staticCompiler ? false @@ -13,15 +13,15 @@ , isl ? null # optional, for the Graphite optimization framework. , zlib ? null , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -29,7 +29,7 @@ assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -41,6 +41,8 @@ let version = "7.3.0"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ # https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html ./riscv-pthread-reentrant.patch diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index a05c1c71812..727cd9cbdbd 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langGo ? false , profiledCompiler ? false , staticCompiler ? false @@ -13,15 +13,15 @@ , isl ? null # optional, for the Graphite optimization framework. , zlib ? null , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -29,7 +29,7 @@ assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -41,6 +41,8 @@ let version = "8.2.0"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = optional (targetPlatform != hostPlatform) ../libstdc++-target.patch ++ optional noSysDirs ../no-sys-dirs.patch diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index 275b380e90f..dd6de818117 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langGo ? false , profiledCompiler ? false , staticCompiler ? false @@ -13,16 +13,16 @@ , isl ? null # optional, for the Graphite optimization framework. , zlib ? null , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , flex ? null -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -30,7 +30,7 @@ assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -42,6 +42,8 @@ let version = "7-20170409"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch diff --git a/pkgs/development/compilers/ghc/7.10.3.nix b/pkgs/development/compilers/ghc/7.10.3.nix index 0cf3a4cb12b..9c87d815b4a 100644 --- a/pkgs/development/compilers/ghc/7.10.3.nix +++ b/pkgs/development/compilers/ghc/7.10.3.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, hscolour @@ -8,7 +7,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 +, useLLVM ? !stdenv.targetPlatform.isx86 , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -19,7 +18,7 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. @@ -27,10 +26,12 @@ , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" }: let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/ghc/8.0.2.nix b/pkgs/development/compilers/ghc/8.0.2.nix index ddd9c27589a..935d09b5744 100644 --- a/pkgs/development/compilers/ghc/8.0.2.nix +++ b/pkgs/development/compilers/ghc/8.0.2.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, hscolour @@ -7,7 +6,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 +, useLLVM ? !stdenv.targetPlatform.isx86 , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -18,7 +17,7 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. @@ -26,12 +25,14 @@ , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" }: assert !enableIntegerSimple -> gmp != null; let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix index 79c910e5fd2..cf448d8d849 100644 --- a/pkgs/development/compilers/ghc/8.2.2.nix +++ b/pkgs/development/compilers/ghc/8.2.2.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, alex, happy, hscolour @@ -8,7 +7,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) +, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -19,7 +18,7 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. @@ -27,7 +26,7 @@ , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" , # Whether to backport https://phabricator.haskell.org/D4388 for # deterministic profiling symbol names, at the cost of a slightly # non-standard GHC API @@ -37,6 +36,8 @@ assert !enableIntegerSimple -> gmp != null; let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/ghc/8.4.3.nix b/pkgs/development/compilers/ghc/8.4.3.nix index f30c8dd8622..aa9fab18436 100644 --- a/pkgs/development/compilers/ghc/8.4.3.nix +++ b/pkgs/development/compilers/ghc/8.4.3.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, alex, happy, hscolour @@ -7,7 +6,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) +, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -18,18 +17,18 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. - enableShared ? !targetPlatform.isWindows && !targetPlatform.useiOSPrebuilt + enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt , # Whetherto build terminfo. - enableTerminfo ? !targetPlatform.isWindows + enableTerminfo ? !stdenv.targetPlatform.isWindows , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" , # Whether to backport https://phabricator.haskell.org/D4388 for # deterministic profiling symbol names, at the cost of a slightly # non-standard GHC API @@ -39,6 +38,8 @@ assert !enableIntegerSimple -> gmp != null; let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/ghc/8.6.1.nix b/pkgs/development/compilers/ghc/8.6.1.nix index fdb60ce3f2e..7fcb5296915 100644 --- a/pkgs/development/compilers/ghc/8.6.1.nix +++ b/pkgs/development/compilers/ghc/8.6.1.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, alex, happy, hscolour @@ -7,7 +6,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) +, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -18,23 +17,25 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. - enableShared ? !targetPlatform.isWindows && !targetPlatform.useiOSPrebuilt + enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt , # Whetherto build terminfo. - enableTerminfo ? !targetPlatform.isWindows + enableTerminfo ? !stdenv.targetPlatform.isWindows , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" }: assert !enableIntegerSimple -> gmp != null; let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 2824ce669ee..ee95bd0f604 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, alex, happy, hscolour @@ -7,7 +6,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) +, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -18,22 +17,24 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. - enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt + enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useAndroidPrebuilt , # Whetherto build terminfo. - enableTerminfo ? !targetPlatform.isWindows + enableTerminfo ? !stdenv.targetPlatform.isWindows , version ? "8.5.20180118" , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" }: let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/llvm/3.9/llvm.nix b/pkgs/development/compilers/llvm/3.9/llvm.nix index dfeddf2fe65..9e7fbbe96c3 100644 --- a/pkgs/development/compilers/llvm/3.9/llvm.nix +++ b/pkgs/development/compilers/llvm/3.9/llvm.nix @@ -13,13 +13,11 @@ , zlib , compiler-rt_src , debugVersion ? false -, enableSharedLibraries ? (buildPlatform == hostPlatform) +, enableSharedLibraries ? (stdenv.buildPlatform == stdenv.hostPlatform) , buildPackages -, buildPlatform -, hostPlatform }: -assert (hostPlatform != buildPlatform) -> !enableSharedLibraries; +assert (stdenv.hostPlatform != stdenv.buildPlatform) -> !enableSharedLibraries; let src = fetch "llvm" "1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z"; @@ -131,7 +129,7 @@ in stdenv.mkDerivation rec { ++ stdenv.lib.optionals (isDarwin) [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ stdenv.lib.optionals (buildPlatform != hostPlatform) [ + ] ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildPackages.llvmPackages_39.llvm}/bin/llvm-tblgen" ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 23aa750060a..9c9788ff483 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -12,7 +12,6 @@ , targetToolchains , doCheck ? true , broken ? false -, buildPlatform, hostPlatform }: let diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 0786238040b..1b33954662d 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -1,10 +1,9 @@ { stdenv, buildPackages, buildHaskellPackages, ghc , jailbreak-cabal, hscolour, cpphs, nodejs -, buildPlatform, hostPlatform }: let - isCross = buildPlatform != hostPlatform; + isCross = stdenv.buildPlatform != stdenv.hostPlatform; inherit (buildPackages) fetchurl removeReferencesTo pkgconfig coreutils gnugrep gnused glibcLocales; @@ -32,8 +31,8 @@ in , enableSharedExecutables ? false , enableSharedLibraries ? (ghc.enableShared or false) , enableDeadCodeElimination ? (!stdenv.isDarwin) # TODO: use -dead_strip for darwin -, enableStaticLibraries ? !hostPlatform.isWindows -, enableHsc2hsViaAsm ? hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4" +, enableStaticLibraries ? !stdenv.hostPlatform.isWindows +, enableHsc2hsViaAsm ? stdenv.hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4" , extraLibraries ? [], librarySystemDepends ? [], executableSystemDepends ? [] # On macOS, statically linking against system frameworks is not supported; # see https://developer.apple.com/library/content/qa/qa1118/_index.html @@ -79,7 +78,7 @@ assert editedCabalFile != null -> revision != null; # --enable-static does not work on windows. This is a bug in GHC. # --enable-static will pass -staticlib to ghc, which only works for mach-o and elf. -assert hostPlatform.isWindows -> enableStaticLibraries == false; +assert stdenv.hostPlatform.isWindows -> enableStaticLibraries == false; let @@ -144,7 +143,7 @@ let (optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names") (optionalString enableParallelBuilding "--ghc-option=-j$NIX_BUILD_CORES") (optionalString useCpphs "--with-cpphs=${cpphs}/bin/cpphs --ghc-options=-cpp --ghc-options=-pgmP${cpphs}/bin/cpphs --ghc-options=-optP--cpp") - (enableFeature (enableDeadCodeElimination && !hostPlatform.isAarch32 && !hostPlatform.isAarch64 && (versionAtLeast "8.0.1" ghc.version)) "split-objs") + (enableFeature (enableDeadCodeElimination && !stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64 && (versionAtLeast "8.0.1" ghc.version)) "split-objs") (enableFeature enableLibraryProfiling "library-profiling") (optionalString ((enableExecutableProfiling || enableLibraryProfiling) && versionOlder "8" ghc.version) "--profiling-detail=${profilingDetail}") (enableFeature enableExecutableProfiling (if versionOlder ghc.version "8" then "executable-profiling" else "profiling")) @@ -163,7 +162,7 @@ let ] ++ optionals isGhcjs [ "--ghcjs" ] ++ optionals isCross ([ - "--configure-option=--host=${hostPlatform.config}" + "--configure-option=--host=${stdenv.hostPlatform.config}" ] ++ crossCabalFlags); setupCompileFlags = [ @@ -285,7 +284,7 @@ stdenv.mkDerivation ({ fi '' # It is not clear why --extra-framework-dirs does work fine on Linux - + optionalString (!buildPlatform.isDarwin || versionAtLeast nativeGhc.version "8.0") '' + + optionalString (!stdenv.buildPlatform.isDarwin || versionAtLeast nativeGhc.version "8.0") '' if [[ -d "$p/Library/Frameworks" ]]; then configureFlags+=" --extra-framework-dirs=$p/Library/Frameworks" fi @@ -486,5 +485,5 @@ stdenv.mkDerivation ({ // optionalAttrs (postFixup != "") { inherit postFixup; } // optionalAttrs (dontStrip) { inherit dontStrip; } // optionalAttrs (hardeningDisable != []) { inherit hardeningDisable; } -// optionalAttrs (buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; } +// optionalAttrs (stdenv.buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; } ) diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index 1a29732b651..49beed8549d 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -1,4 +1,4 @@ -{ lib, targetPlatform, ghc, llvmPackages, packages, symlinkJoin, makeWrapper +{ lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper , withLLVM ? false , postBuild ? "" , ghcLibdir ? null # only used by ghcjs, when resolving plugins @@ -48,7 +48,7 @@ let # https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm llvm = lib.makeBinPath ([ llvmPackages.llvm ] - ++ lib.optional targetPlatform.isDarwin llvmPackages.clang); + ++ lib.optional stdenv.targetPlatform.isDarwin llvmPackages.clang); in if paths == [] && !withLLVM then ghc else symlinkJoin { @@ -105,7 +105,7 @@ symlinkJoin { --set "NIX_${ghcCommandCaps}_LIBDIR" "${libDir}" fi - '' + (lib.optionalString (targetPlatform.isDarwin && !isGhcjs && !targetPlatform.isiOS) '' + '' + (lib.optionalString (stdenv.targetPlatform.isDarwin && !isGhcjs && !stdenv.targetPlatform.isiOS) '' # Work around a linker limit in macOS Sierra (see generic-builder.nix): local packageConfDir="$out/lib/${ghc.name}/package.conf.d"; local dynamicLinksDir="$out/lib/links" diff --git a/pkgs/development/interpreters/guile/1.8.nix b/pkgs/development/interpreters/guile/1.8.nix index 53db5949f02..13a0d45dbe4 100644 --- a/pkgs/development/interpreters/guile/1.8.nix +++ b/pkgs/development/interpreters/guile/1.8.nix @@ -1,5 +1,4 @@ { stdenv, buildPackages -, buildPlatform, hostPlatform , fetchurl, makeWrapper, gawk, pkgconfig , libtool, readline, gmp }: @@ -23,7 +22,7 @@ stdenv.mkDerivation rec { "--with-threads=no"; depsBuildBuild = [ buildPackages.stdenv.cc ] - ++ stdenv.lib.optional (hostPlatform != buildPlatform) + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.buildPackages.guile_1_8; nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; buildInputs = [ readline libtool ]; diff --git a/pkgs/development/interpreters/guile/2.0.nix b/pkgs/development/interpreters/guile/2.0.nix index 848b8666f27..ea34fd61f3b 100644 --- a/pkgs/development/interpreters/guile/2.0.nix +++ b/pkgs/development/interpreters/guile/2.0.nix @@ -1,5 +1,4 @@ { stdenv, buildPackages -, buildPlatform, hostPlatform , fetchpatch, fetchurl, makeWrapper, gawk, pkgconfig , libffi, libtool, readline, gmp, boehmgc, libunistring , coverageAnalysis ? null @@ -22,7 +21,7 @@ setOutputFlags = false; # $dev gets into the library otherwise depsBuildBuild = [ buildPackages.stdenv.cc ] - ++ stdenv.lib.optional (hostPlatform != buildPlatform) + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.buildPackages.guile_2_0; nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; buildInputs = [ readline libtool libunistring libffi ]; diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix index 8110598e173..aacc5dc49a1 100644 --- a/pkgs/development/interpreters/guile/default.nix +++ b/pkgs/development/interpreters/guile/default.nix @@ -1,5 +1,4 @@ { stdenv, buildPackages -, buildPlatform, hostPlatform , fetchurl, makeWrapper, gawk, pkgconfig , libffi, libtool, readline, gmp, boehmgc, libunistring , coverageAnalysis ? null @@ -23,7 +22,7 @@ setOutputFlags = false; # $dev gets into the library otherwise depsBuildBuild = [ buildPackages.stdenv.cc ] - ++ stdenv.lib.optional (hostPlatform != buildPlatform) + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.buildPackages.guile; nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; buildInputs = [ readline libtool libunistring libffi ]; diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index fd84d924d7b..df8e6ebf89f 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -1,4 +1,4 @@ -{ stdenv, hostPlatform, buildPlatform, buildPackages, fetchurl +{ stdenv, buildPackages, fetchurl , bzip2 , gdbm , fetchpatch @@ -85,7 +85,7 @@ let # libuuid, slowing down program startup a lot). ./no-ldconfig.patch - ] ++ optionals hostPlatform.isCygwin [ + ] ++ optionals stdenv.hostPlatform.isCygwin [ ./2.5.2-ctypes-util-find_library.patch ./2.5.2-tkinter-x11.patch ./2.6.2-ssl-threads.patch @@ -125,14 +125,14 @@ let "--enable-shared" "--with-threads" "--enable-unicode=ucs${toString ucsEncoding}" - ] ++ optionals (hostPlatform.isCygwin || hostPlatform.isAarch64) [ + ] ++ optionals (stdenv.hostPlatform.isCygwin || stdenv.hostPlatform.isAarch64) [ "--with-system-ffi" - ] ++ optionals hostPlatform.isCygwin [ + ] ++ optionals stdenv.hostPlatform.isCygwin [ "--with-system-expat" "ac_cv_func_bind_textdomain_codeset=yes" ] ++ optionals stdenv.isDarwin [ "--disable-toolbox-glue" - ] ++ optionals (hostPlatform != buildPlatform) [ + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "PYTHON_FOR_BUILD=${getBin buildPackages.python}/bin/python" "ac_cv_buggy_getaddrinfo=no" # Assume little-endian IEEE 754 floating point when cross compiling @@ -157,18 +157,18 @@ let ] # Never even try to use lchmod on linux, # don't rely on detecting glibc-isms. - ++ optional hostPlatform.isLinux "ac_cv_func_lchmod=no"; + ++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no"; buildInputs = optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++ [ bzip2 openssl zlib ] - ++ optional (hostPlatform.isCygwin || hostPlatform.isAarch64) libffi - ++ optional hostPlatform.isCygwin expat + ++ optional (stdenv.hostPlatform.isCygwin || stdenv.hostPlatform.isAarch64) libffi + ++ optional stdenv.hostPlatform.isCygwin expat ++ [ db gdbm ncurses sqlite readline ] ++ optionals x11Support [ tcl tk xlibsWrapper libX11 ] ++ optionals stdenv.isDarwin ([ CF ] ++ optional (configd != null) configd); nativeBuildInputs = - optionals (hostPlatform != buildPlatform) + optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.stdenv.cc buildPackages.python ]; mkPaths = paths: { @@ -190,7 +190,7 @@ in stdenv.mkDerivation { inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2" - + optionalString hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000"; + + optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000"; DETERMINISTIC_BUILD = 1; setupHook = python-setup-hook sitePackages; @@ -235,7 +235,7 @@ in stdenv.mkDerivation { find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i - find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i - find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i - - '' + optionalString hostPlatform.isCygwin '' + '' + optionalString stdenv.hostPlatform.isCygwin '' cp libpython2.7.dll.a $out/lib ''; diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix index c7e4a9c29ac..7bbb1a5e1c9 100644 --- a/pkgs/development/libraries/SDL/default.nix +++ b/pkgs/development/libraries/SDL/default.nix @@ -1,10 +1,9 @@ { stdenv, lib, fetchurl, fetchpatch, pkgconfig, audiofile, libcap, libiconv , openglSupport ? false, libGL, libGLU , alsaSupport ? true, alsaLib -, x11Support ? hostPlatform == buildPlatform, libXext, libICE, libXrandr +, x11Support ? stdenv.hostPlatform == stdenv.buildPlatform, libXext, libICE, libXrandr , pulseaudioSupport ? true, libpulseaudio , OpenGL, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa -, hostPlatform, buildPlatform }: # NOTE: When editing this expression see if the same change applies to @@ -41,7 +40,7 @@ stdenv.mkDerivation rec { ++ optional stdenv.isDarwin Cocoa; buildInputs = [ ] - ++ optional (!hostPlatform.isMinGW) audiofile + ++ optional (!stdenv.hostPlatform.isMinGW) audiofile ++ optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ]; configureFlags = [ diff --git a/pkgs/development/libraries/attr/default.nix b/pkgs/development/libraries/attr/default.nix index 96fe5b89a18..944f33b7a3f 100644 --- a/pkgs/development/libraries/attr/default.nix +++ b/pkgs/development/libraries/attr/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, gettext, hostPlatform }: +{ stdenv, fetchurl, gettext }: stdenv.mkDerivation rec { name = "attr-2.4.47"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { installTargets = [ "install" "install-lib" "install-dev" ]; - patches = if (hostPlatform.libc == "musl") then [ ./fix-headers-musl.patch ] else null; + patches = if (stdenv.hostPlatform.libc == "musl") then [ ./fix-headers-musl.patch ] else null; postPatch = '' for script in install-sh include/install-sh; do diff --git a/pkgs/development/libraries/boehm-gc/default.nix b/pkgs/development/libraries/boehm-gc/default.nix index c11d6689624..da71e40187f 100644 --- a/pkgs/development/libraries/boehm-gc/default.nix +++ b/pkgs/development/libraries/boehm-gc/default.nix @@ -1,6 +1,5 @@ { lib, stdenv, fetchurl, fetchpatch, pkgconfig, libatomic_ops , enableLargeConfig ? false # doc: https://github.com/ivmai/bdwgc/blob/v7.6.6/doc/README.macros#L179 -, buildPlatform, hostPlatform }: stdenv.mkDerivation rec { @@ -30,7 +29,7 @@ stdenv.mkDerivation rec { sha256 = "1gydwlklvci30f5dpp5ccw2p2qpph5y41r55wx9idamjlq66fbb3"; }) ] ++ # https://github.com/ivmai/bdwgc/pull/208 - lib.optional hostPlatform.isRiscV ./riscv.patch; + lib.optional stdenv.hostPlatform.isRiscV ./riscv.patch; configureFlags = [ "--enable-cplusplus" ] @@ -40,7 +39,7 @@ stdenv.mkDerivation rec { doCheck = true; # not cross; # Don't run the native `strip' when cross-compiling. - dontStrip = hostPlatform != buildPlatform; + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/boost/1.66.nix b/pkgs/development/libraries/boost/1.66.nix index 932ebdcb463..e8321c80235 100644 --- a/pkgs/development/libraries/boost/1.66.nix +++ b/pkgs/development/libraries/boost/1.66.nix @@ -1,4 +1,4 @@ -{ stdenv, callPackage, fetchurl, hostPlatform, buildPlatform, ... } @ args: +{ stdenv, callPackage, fetchurl, ... } @ args: callPackage ./generic.nix (args // rec { version = "1.66_0"; diff --git a/pkgs/development/libraries/boost/1.67.nix b/pkgs/development/libraries/boost/1.67.nix index 150272df6ca..0f341217dca 100644 --- a/pkgs/development/libraries/boost/1.67.nix +++ b/pkgs/development/libraries/boost/1.67.nix @@ -1,4 +1,4 @@ -{ stdenv, callPackage, fetchurl, fetchpatch, hostPlatform, buildPlatform, ... } @ args: +{ stdenv, callPackage, fetchurl, fetchpatch, ... } @ args: callPackage ./generic.nix (args // rec { version = "1.67_0"; diff --git a/pkgs/development/libraries/boost/1.68.nix b/pkgs/development/libraries/boost/1.68.nix index 081b105e2d2..97879051a67 100644 --- a/pkgs/development/libraries/boost/1.68.nix +++ b/pkgs/development/libraries/boost/1.68.nix @@ -1,4 +1,4 @@ -{ stdenv, callPackage, fetchurl, fetchpatch, hostPlatform, buildPlatform, ... } @ args: +{ stdenv, callPackage, fetchurl, fetchpatch, ... } @ args: callPackage ./generic.nix (args // rec { version = "1.68_0"; diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index dab6fac6f0c..617484e5a40 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv , which -, buildPackages, buildPlatform, hostPlatform +, buildPackages , toolset ? /**/ if stdenv.cc.isClang then "clang" else null , enableRelease ? true , enableDebug ? false , enableSingleThreaded ? false , enableMultiThreaded ? true -, enableShared ? !(hostPlatform.libc == "msvcrt") # problems for now +, enableShared ? !(stdenv.hostPlatform.libc == "msvcrt") # problems for now , enableStatic ? !enableShared , enablePython ? false , enableNumpy ? false @@ -24,7 +24,7 @@ assert enableShared || enableStatic; # Python isn't supported when cross-compiling -assert enablePython -> hostPlatform == buildPlatform; +assert enablePython -> stdenv.hostPlatform == stdenv.buildPlatform; assert enableNumpy -> enablePython; with stdenv.lib; @@ -59,23 +59,23 @@ let "-sEXPAT_LIBPATH=${expat.out}/lib" # TODO: make this unconditional - ] ++ optionals (hostPlatform != buildPlatform) [ - "address-model=${toString hostPlatform.parsed.cpu.bits}" - "architecture=${toString hostPlatform.parsed.cpu.family}" - "binary-format=${toString hostPlatform.parsed.kernel.execFormat.name}" - "target-os=${toString hostPlatform.parsed.kernel.name}" + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}" + "architecture=${toString stdenv.hostPlatform.parsed.cpu.family}" + "binary-format=${toString stdenv.hostPlatform.parsed.kernel.execFormat.name}" + "target-os=${toString stdenv.hostPlatform.parsed.kernel.name}" # adapted from table in boost manual # https://www.boost.org/doc/libs/1_66_0/libs/context/doc/html/context/architectures.html - "abi=${if hostPlatform.parsed.cpu.family == "arm" then "aapcs" - else if hostPlatform.isWindows then "ms" - else if hostPlatform.isMips then "o32" + "abi=${if stdenv.hostPlatform.parsed.cpu.family == "arm" then "aapcs" + else if stdenv.hostPlatform.isWindows then "ms" + else if stdenv.hostPlatform.isMips then "o32" else "sysv"}" ] ++ optional (link != "static") "runtime-link=${runtime-link}" ++ optional (variant == "release") "debug-symbols=off" ++ optional (toolset != null) "toolset=${toolset}" - ++ optional (mpi != null || hostPlatform != buildPlatform) "--user-config=user-config.jam" - ++ optionals (hostPlatform.libc == "msvcrt") [ + ++ optional (mpi != null || stdenv.hostPlatform != stdenv.buildPlatform) "--user-config=user-config.jam" + ++ optionals (stdenv.hostPlatform.libc == "msvcrt") [ "threadapi=win32" ]); @@ -86,10 +86,10 @@ stdenv.mkDerivation { inherit src; - patchFlags = optionalString (hostPlatform.libc == "msvcrt") "-p0"; + patchFlags = optionalString (stdenv.hostPlatform.libc == "msvcrt") "-p0"; patches = patches ++ optional stdenv.isDarwin ./darwin-no-system-python.patch - ++ optional (hostPlatform.libc == "msvcrt") (fetchurl { + ++ optional (stdenv.hostPlatform.libc == "msvcrt") (fetchurl { url = "https://svn.boost.org/trac/boost/raw-attachment/tickaet/7262/" + "boost-mingw.patch"; sha256 = "0s32kwll66k50w6r5np1y5g907b7lcpsjhfgr7rsw7q5syhzddyj"; @@ -113,7 +113,7 @@ stdenv.mkDerivation { cat << EOF >> user-config.jam using mpi : ${mpi}/bin/mpiCC ; EOF - '' + optionalString (hostPlatform != buildPlatform) '' + '' + optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' cat << EOF >> user-config.jam using gcc : cross : ${stdenv.cc.targetPrefix}c++ ; EOF @@ -126,7 +126,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ which buildPackages.stdenv.cc ]; buildInputs = [ expat zlib bzip2 libiconv ] - ++ optional (hostPlatform == buildPlatform) icu + ++ optional (stdenv.hostPlatform == stdenv.buildPlatform) icu ++ optional stdenv.isDarwin fixDarwinDylibNames ++ optional enablePython python ++ optional enableNumpy python.pkgs.numpy; @@ -137,7 +137,7 @@ stdenv.mkDerivation { "--includedir=$(dev)/include" "--libdir=$(out)/lib" ] ++ optional enablePython "--with-python=${python.interpreter}" - ++ [ (if hostPlatform == buildPlatform then "--with-icu=${icu.dev}" else "--without-icu") ] + ++ [ (if stdenv.hostPlatform == stdenv.buildPlatform then "--with-icu=${icu.dev}" else "--without-icu") ] ++ optional (toolset != null) "--with-toolset=${toolset}"; buildPhase = '' @@ -157,7 +157,7 @@ stdenv.mkDerivation { # Make boost header paths relative so that they are not runtime dependencies cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \ -exec sed '1i#line 1 "{}"' -i '{}' \; - '' + optionalString (hostPlatform.libc == "msvcrt") '' + '' + optionalString (stdenv.hostPlatform.libc == "msvcrt") '' $RANLIB "$out/lib/"*.a ''; diff --git a/pkgs/development/libraries/c-ares/default.nix b/pkgs/development/libraries/c-ares/default.nix index 17624549117..1835356e627 100644 --- a/pkgs/development/libraries/c-ares/default.nix +++ b/pkgs/development/libraries/c-ares/default.nix @@ -1,4 +1,4 @@ -{ targetPlatform, stdenv, fetchurl, writeTextDir }: +{ stdenv, fetchurl, writeTextDir }: let self = stdenv.mkDerivation rec { @@ -40,8 +40,8 @@ stdenv.mkDerivation rec { ) set_property(TARGET c-ares::cares APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_target_properties(c-ares::cares PROPERTIES - IMPORTED_LOCATION_RELEASE "${self}/lib/libcares${targetPlatform.extensions.sharedLibrary}" - IMPORTED_SONAME_RELEASE "libcares${targetPlatform.extensions.sharedLibrary}" + IMPORTED_LOCATION_RELEASE "${self}/lib/libcares${stdenv.targetPlatform.extensions.sharedLibrary}" + IMPORTED_SONAME_RELEASE "libcares${stdenv.targetPlatform.extensions.sharedLibrary}" ) add_library(c-ares::cares_shared INTERFACE IMPORTED) set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares") diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix index e413e29e7ca..4c1ad34f6da 100644 --- a/pkgs/development/libraries/ffmpeg-full/default.nix +++ b/pkgs/development/libraries/ffmpeg-full/default.nix @@ -1,5 +1,4 @@ { stdenv, fetchurl, pkgconfig, perl, texinfo, yasm -, hostPlatform /* * Licensing options (yes some are listed twice, filters and such are not listed) */ @@ -253,8 +252,8 @@ stdenv.mkDerivation rec { configurePlatforms = []; configureFlags = [ - "--target_os=${hostPlatform.parsed.kernel.name}" - "--arch=${hostPlatform.parsed.cpu.name}" + "--target_os=${stdenv.hostPlatform.parsed.kernel.name}" + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" /* * Licensing flags */ diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 4bb995ff074..7d72de2a2de 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -2,7 +2,6 @@ , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg , libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr , x264, x265, xvidcore, zlib, libopus -, hostPlatform , openglSupport ? false, libGLU_combined ? null # Build options , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime @@ -83,8 +82,8 @@ stdenv.mkDerivation rec { configurePlatforms = []; configureFlags = [ - "--arch=${hostPlatform.parsed.cpu.name}" - "--target_os=${hostPlatform.parsed.kernel.name}" + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" + "--target_os=${stdenv.hostPlatform.parsed.kernel.name}" # License "--enable-gpl" "--enable-version3" diff --git a/pkgs/development/libraries/fontconfig/2.10.nix b/pkgs/development/libraries/fontconfig/2.10.nix index eae93d96f45..1d66735569d 100644 --- a/pkgs/development/libraries/fontconfig/2.10.nix +++ b/pkgs/development/libraries/fontconfig/2.10.nix @@ -1,5 +1,4 @@ { stdenv, fetchurl, pkgconfig, freetype, expat -, hostPlatform }: stdenv.mkDerivation rec { @@ -17,13 +16,13 @@ stdenv.mkDerivation rec { buildInputs = [ expat ]; configureFlags = [ - "--with-arch=${hostPlatform.parsed.cpu.name}" + "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" "--sysconfdir=/etc" "--with-cache-dir=/var/cache/fontconfig" "--disable-docs" "--with-default-fonts=" ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - "--with-arch=${hostPlatform.parsed.cpu.name}" + "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix index 01c4140f3b5..1a028526726 100644 --- a/pkgs/development/libraries/fontconfig/default.nix +++ b/pkgs/development/libraries/fontconfig/default.nix @@ -1,6 +1,5 @@ { stdenv, substituteAll, fetchurl , pkgconfig, freetype, expat, libxslt, gperf, dejavu_fonts -, hostPlatform }: /** Font configuration scheme @@ -40,13 +39,13 @@ stdenv.mkDerivation rec { buildInputs = [ expat ]; configureFlags = [ - "--with-arch=${hostPlatform.parsed.cpu.name}" + "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" "--with-cache-dir=/var/cache/fontconfig" # otherwise the fallback is in $out/ "--disable-docs" # just <1MB; this is what you get when loading config fails for some reason "--with-default-fonts=${dejavu_fonts.minimal}" ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - "--with-arch=${hostPlatform.parsed.cpu.name}" + "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index 0a29ab6927f..d638c2bb278 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -1,4 +1,4 @@ -{ stdenvNoLibs, buildPackages, buildPlatform, hostPlatform +{ stdenvNoLibs, buildPackages , gcc, glibc , libiberty }: @@ -29,8 +29,8 @@ stdenvNoLibs.mkDerivation rec { # Drop in libiberty, as external builds are not expected + '' ( - mkdir -p build-${buildPlatform.config}/libiberty/ - cd build-${buildPlatform.config}/libiberty/ + mkdir -p build-${stdenvNoLibs.buildPlatform.config}/libiberty/ + cd build-${stdenvNoLibs.buildPlatform.config}/libiberty/ ln -s ${buildPackages.libiberty}/lib/libiberty.a ./ ) '' @@ -83,8 +83,8 @@ stdenvNoLibs.mkDerivation rec { '' # Preparing to configure + build libgcc itself + '' - mkdir -p "$buildRoot/gcc/${hostPlatform.config}/libgcc" - cd "$buildRoot/gcc/${hostPlatform.config}/libgcc" + mkdir -p "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc" + cd "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc" configureScript=$sourceRoot/configure chmod +x "$configureScript" @@ -107,9 +107,9 @@ stdenvNoLibs.mkDerivation rec { ''; gccConfigureFlags = [ - "--build=${buildPlatform.config}" - "--host=${buildPlatform.config}" - "--target=${hostPlatform.config}" + "--build=${stdenvNoLibs.buildPlatform.config}" + "--host=${stdenvNoLibs.buildPlatform.config}" + "--target=${stdenvNoLibs.hostPlatform.config}" "--disable-bootstrap" "--disable-multilib" "--with-multilib-list=" @@ -128,7 +128,7 @@ stdenvNoLibs.mkDerivation rec { "--disable-vtable-verify" "--with-system-zlib" - ] ++ stdenvNoLibs.lib.optional (hostPlatform.libc == "glibc") + ] ++ stdenvNoLibs.lib.optional (stdenvNoLibs.hostPlatform.libc == "glibc") "--with-glibc-version=${glibc.version}"; configurePlatforms = [ "build" "host" ]; @@ -144,9 +144,9 @@ stdenvNoLibs.mkDerivation rec { makeFlags = [ "MULTIBUILDTOP:=../" ]; postInstall = '' - moveToOutput "lib/gcc/${hostPlatform.config}/${version}/include" "$dev" + moveToOutput "lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}/include" "$dev" mkdir -p "$out/lib" "$dev/include" - ln -s "$out/lib/gcc/${hostPlatform.config}/${version}"/* "$out/lib" - ln -s "$dev/lib/gcc/${hostPlatform.config}/${version}/include"/* "$dev/include/" + ln -s "$out/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}"/* "$out/lib" + ln -s "$dev/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}/include"/* "$dev/include/" ''; } diff --git a/pkgs/development/libraries/gdbm/default.nix b/pkgs/development/libraries/gdbm/default.nix index bbebcca6e2f..685775e2918 100644 --- a/pkgs/development/libraries/gdbm/default.nix +++ b/pkgs/development/libraries/gdbm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, buildPlatform, fetchurl }: +{ stdenv, lib, fetchurl }: stdenv.mkDerivation rec { name = "gdbm-1.17"; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { # Disable dbmfetch03.at test because it depends on unlink() # failing on a link in a chmod -w directory, which cygwin # apparently allows. - postPatch = lib.optionalString buildPlatform.isCygwin '' + postPatch = lib.optionalString stdenv.buildPlatform.isCygwin '' substituteInPlace tests/Makefile.in --replace \ '_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la' \ '_LDADD = ../compat/libgdbm_compat.la ../src/libgdbm.la' diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 469dcbf75bb..4531a5a01d4 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, hostPlatform, fetchurl, libiconv, xz }: +{ stdenv, lib, fetchurl, libiconv, xz }: stdenv.mkDerivation rec { name = "gettext-${version}"; @@ -35,20 +35,20 @@ stdenv.mkDerivation rec { substituteInPlace gettext-tools/projects/KDE/trigger --replace "/bin/pwd" pwd substituteInPlace gettext-tools/projects/GNOME/trigger --replace "/bin/pwd" pwd substituteInPlace gettext-tools/src/project-id --replace "/bin/pwd" pwd - '' + lib.optionalString hostPlatform.isCygwin '' + '' + lib.optionalString stdenv.hostPlatform.isCygwin '' sed -i -e "s/\(cldr_plurals_LDADD = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in sed -i -e "s/\(libgettextsrc_la_LDFLAGS = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in ''; nativeBuildInputs = [ xz xz.bin ]; # HACK, see #10874 (and 14664) - buildInputs = stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv; + buildInputs = stdenv.lib.optional (!stdenv.isLinux && !stdenv.hostPlatform.isCygwin) libiconv; setupHooks = [ ../../../build-support/setup-hooks/role.bash ./gettext-setup-hook.sh ]; - gettextNeedsLdflags = hostPlatform.libc != "glibc" && !hostPlatform.isMusl; + gettextNeedsLdflags = stdenv.hostPlatform.libc != "glibc" && !stdenv.hostPlatform.isMusl; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/glew/1.10.nix b/pkgs/development/libraries/glew/1.10.nix index af0830ab704..b265cfcc016 100644 --- a/pkgs/development/libraries/glew/1.10.nix +++ b/pkgs/development/libraries/glew/1.10.nix @@ -1,5 +1,4 @@ { stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi -, buildPlatform, hostPlatform , AGL ? null }: @@ -19,7 +18,7 @@ stdenv.mkDerivation rec { patchPhase = '' sed -i 's|lib64|lib|' config/Makefile.linux - ${optionalString (hostPlatform != buildPlatform) '' + ${optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile ''} ''; @@ -39,7 +38,7 @@ stdenv.mkDerivation rec { ''; makeFlags = [ - "SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel.name}" + "SYSTEM=${if stdenv.hostPlatform.isMinGW then "mingw" else stdenv.hostPlatform.parsed.kernel.name}" ]; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/glew/default.nix b/pkgs/development/libraries/glew/default.nix index a8add880090..ec56c544cac 100644 --- a/pkgs/development/libraries/glew/default.nix +++ b/pkgs/development/libraries/glew/default.nix @@ -1,5 +1,4 @@ { stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi -, buildPlatform, hostPlatform }: with stdenv.lib; @@ -20,7 +19,7 @@ stdenv.mkDerivation rec { patchPhase = '' sed -i 's|lib64|lib|' config/Makefile.linux substituteInPlace config/Makefile.darwin --replace /usr/local "$out" - ${optionalString (hostPlatform != buildPlatform) '' + ${optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile ''} ''; @@ -41,7 +40,7 @@ stdenv.mkDerivation rec { ''; makeFlags = [ - "SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel.name}" + "SYSTEM=${if stdenv.hostPlatform.isMinGW then "mingw" else stdenv.hostPlatform.parsed.kernel.name}" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 8b4a213aae0..1eecfa90279 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -18,7 +18,6 @@ */ { stdenv, lib -, buildPlatform, hostPlatform , buildPackages , fetchurl ? null , linuxHeaders ? null @@ -119,12 +118,12 @@ stdenv.mkDerivation ({ else "--disable-profile") ] ++ lib.optionals withLinuxHeaders [ "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26 - ] ++ lib.optionals (hostPlatform != buildPlatform) [ - (if hostPlatform.platform.gcc.float or (hostPlatform.parsed.abi.float or "hard") == "soft" + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + (if stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft" then "--without-fp" else "--with-fp") "--with-__thread" - ] ++ lib.optionals (hostPlatform == buildPlatform && hostPlatform.isAarch32) [ + ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [ "--host=arm-linux-gnueabi" "--build=arm-linux-gnueabi" @@ -176,7 +175,7 @@ stdenv.mkDerivation ({ } - '' + lib.optionalString (hostPlatform != buildPlatform) '' + '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig" cat > config.cache << "EOF" @@ -210,7 +209,7 @@ stdenv.mkDerivation ({ } // meta; } -// lib.optionalAttrs (hostPlatform != buildPlatform) { +// lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) { preInstall = null; # clobber the native hook dontStrip = true; diff --git a/pkgs/development/libraries/gmp/6.x.nix b/pkgs/development/libraries/gmp/6.x.nix index 04c57d94666..23a69282b41 100644 --- a/pkgs/development/libraries/gmp/6.x.nix +++ b/pkgs/development/libraries/gmp/6.x.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, m4, cxx ? !hostPlatform.useAndroidPrebuilt -, buildPackages, hostPlatform +{ stdenv, fetchurl, m4, cxx ? !stdenv.hostPlatform.useAndroidPrebuilt +, buildPackages , withStatic ? false }: let inherit (stdenv.lib) optional optionalString; in diff --git a/pkgs/development/libraries/icu/base.nix b/pkgs/development/libraries/icu/base.nix index b8ad48326b2..8ad58c5f90b 100644 --- a/pkgs/development/libraries/icu/base.nix +++ b/pkgs/development/libraries/icu/base.nix @@ -1,7 +1,7 @@ { version, sha256, patches ? [], patchFlags ? "" }: { stdenv, fetchurl, fixDarwinDylibNames # Cross-compiled icu4c requires a build-root of a native compile -, buildRootOnly ? false, nativeBuildRoot, buildPlatform, hostPlatform +, buildRootOnly ? false, nativeBuildRoot }: let @@ -38,7 +38,7 @@ let configureFlags = [ "--disable-debug" ] ++ stdenv.lib.optional (stdenv.isFreeBSD || stdenv.isDarwin) "--enable-rpath" - ++ stdenv.lib.optional (buildPlatform != hostPlatform) "--with-cross-build=${nativeBuildRoot}"; + ++ stdenv.lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--with-cross-build=${nativeBuildRoot}"; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index 5eb90aaf05c..1ef453f24cd 100644 --- a/pkgs/development/libraries/libav/default.nix +++ b/pkgs/development/libraries/libav/default.nix @@ -13,7 +13,6 @@ , SDL # only for avplay in $bin, adds nontrivial closure to it , enableGPL ? true # ToDo: some additional default stuff may need GPL , enableUnfree ? faacSupport -, hostPlatform }: assert faacSupport -> enableUnfree; @@ -53,8 +52,8 @@ let configurePlatforms = []; configureFlags = assert stdenv.lib.all (x: x!=null) buildInputs; [ - "--arch=${hostPlatform.parsed.cpu.name}" - "--target_os=${hostPlatform.parsed.kernel.name}" + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" + "--target_os=${stdenv.hostPlatform.parsed.kernel.name}" #"--enable-postproc" # it's now a separate package in upstream "--disable-avserver" # upstream says it's in a bad state "--enable-avplay" diff --git a/pkgs/development/libraries/libb2/default.nix b/pkgs/development/libraries/libb2/default.nix index 58961a18df1..f7fffa8b298 100644 --- a/pkgs/development/libraries/libb2/default.nix +++ b/pkgs/development/libraries/libb2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, hostPlatform, fetchurl, autoconf, automake, libtool }: +{ stdenv, fetchurl, autoconf, automake, libtool }: stdenv.mkDerivation rec { name = "libb2-${version}"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { ./autogen.sh ''; - configureFlags = stdenv.lib.optional hostPlatform.isx86 "--enable-fat=yes"; + configureFlags = stdenv.lib.optional stdenv.hostPlatform.isx86 "--enable-fat=yes"; nativeBuildInputs = [ autoconf automake libtool ]; diff --git a/pkgs/development/libraries/libelf/default.nix b/pkgs/development/libraries/libelf/default.nix index bb1dbe51765..5adafece353 100644 --- a/pkgs/development/libraries/libelf/default.nix +++ b/pkgs/development/libraries/libelf/default.nix @@ -1,6 +1,5 @@ { stdenv , fetchurl, autoreconfHook, gettext -, buildPlatform, hostPlatform }: stdenv.mkDerivation rec { @@ -20,17 +19,17 @@ stdenv.mkDerivation rec { configureFlags = [] # Configure check for dynamic lib support is broken, see # http://lists.uclibc.org/pipermail/uclibc-cvs/2005-August/019383.html - ++ stdenv.lib.optional (hostPlatform != buildPlatform) "mr_cv_target_elf=yes" + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "mr_cv_target_elf=yes" # Libelf's custom NLS macros fail to determine the catalog file extension # on Darwin, so disable NLS for now. - ++ stdenv.lib.optional hostPlatform.isDarwin "--disable-nls"; + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "--disable-nls"; nativeBuildInputs = [ gettext ] # Need to regenerate configure script with newer version in order to pass # "mr_cv_target_elf=yes", but `autoreconfHook` brings in `makeWrapper` # which doesn't work with the bootstrapTools bash, so can only do this # for cross builds when `stdenv.shell` is a newer bash. - ++ stdenv.lib.optional (hostPlatform != buildPlatform) autoreconfHook; + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) autoreconfHook; meta = { description = "ELF object file access library"; diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index 6f1aeefa675..215f587bb6b 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchpatch -, buildPlatform, hostPlatform, autoreconfHook +, autoreconfHook # libffi is used in darwin stdenv # we cannot run checks within it @@ -19,12 +19,12 @@ stdenv.mkDerivation rec { url = https://src.fedoraproject.org/rpms/libffi/raw/ccffc1700abfadb0969495a6e51b964117fc03f6/f/libffi-aarch64-rhbz1174037.patch; sha256 = "1vpirrgny43hp0885rswgv3xski8hg7791vskpbg3wdjdpb20wbc"; }) - ++ stdenv.lib.optional hostPlatform.isMusl (fetchpatch { + ++ stdenv.lib.optional stdenv.hostPlatform.isMusl (fetchpatch { name = "gnu-linux-define.patch"; url = "https://git.alpinelinux.org/cgit/aports/plain/main/libffi/gnu-linux-define.patch?id=bb024fd8ec6f27a76d88396c9f7c5c4b5800d580"; sha256 = "11pvy3xkhyvnjfyy293v51f1xjy3x0azrahv1nw9y9mw8bifa2j2"; }) - ++ stdenv.lib.optional hostPlatform.isRiscV (fetchpatch { + ++ stdenv.lib.optional stdenv.hostPlatform.isRiscV (fetchpatch { name = "riscv-support.patch"; url = https://github.com/sorear/libffi-riscv/commit/e46492e8bb1695a19bc1053ed869e6c2bab02ff2.patch; sha256 = "1vl1vbvdkigs617kckxvj8j4m2cwg62kxm1clav1w5rnw9afxg0y"; @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "man" "info" ]; - nativeBuildInputs = stdenv.lib.optional hostPlatform.isRiscV autoreconfHook; + nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isRiscV autoreconfHook; configureFlags = [ "--with-gcc-arch=generic" # no detection of -march= or -mtune= @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { inherit doCheck; - dontStrip = hostPlatform != buildPlatform; # Don't run the native `strip' when cross-compiling. + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; # Don't run the native `strip' when cross-compiling. # Install headers and libs in the right places. postFixup = '' diff --git a/pkgs/development/libraries/libiconv/default.nix b/pkgs/development/libraries/libiconv/default.nix index 24dd4f2465c..d9773a1be4d 100644 --- a/pkgs/development/libraries/libiconv/default.nix +++ b/pkgs/development/libraries/libiconv/default.nix @@ -1,10 +1,9 @@ { fetchurl, stdenv, lib -, buildPlatform, hostPlatform , enableStatic ? stdenv.hostPlatform.useAndroidPrebuilt , enableShared ? !stdenv.hostPlatform.useAndroidPrebuilt }: -# assert !stdenv.isLinux || hostPlatform != buildPlatform; # TODO: improve on cross +# assert !stdenv.hostPlatform.isLinux || stdenv.hostPlatform != stdenv.buildPlatform; # TODO: improve on cross stdenv.mkDerivation rec { name = "libiconv-${version}"; @@ -21,7 +20,7 @@ stdenv.mkDerivation rec { ]; postPatch = - lib.optionalString ((hostPlatform != buildPlatform && hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc) + lib.optionalString ((stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc) '' sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h '' diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index e4f70b792fd..84c6c96ea5d 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -1,5 +1,4 @@ { stdenv, fetchurl, nasm -, hostPlatform }: stdenv.mkDerivation rec { @@ -12,7 +11,7 @@ stdenv.mkDerivation rec { }; # github releases still need autotools, surprisingly patches = - stdenv.lib.optional (hostPlatform.libc or null == "msvcrt") + stdenv.lib.optional (stdenv.hostPlatform.libc or null == "msvcrt") ./mingw-boolean.patch; outputs = [ "bin" "dev" "out" "man" "doc" ]; diff --git a/pkgs/development/libraries/libpng/12.nix b/pkgs/development/libraries/libpng/12.nix index 0153ff8327b..2cd8c1debaf 100644 --- a/pkgs/development/libraries/libpng/12.nix +++ b/pkgs/development/libraries/libpng/12.nix @@ -1,8 +1,6 @@ -{ stdenv, fetchurl, zlib -, buildPlatform, hostPlatform -}: +{ stdenv, fetchurl, zlib }: -assert hostPlatform == buildPlatform -> zlib != null; +assert stdenv.hostPlatform == stdenv.buildPlatform -> zlib != null; stdenv.mkDerivation rec { name = "libpng-1.2.57"; diff --git a/pkgs/development/libraries/libssh2/default.nix b/pkgs/development/libraries/libssh2/default.nix index f85b709cf39..a6802a7f518 100644 --- a/pkgs/development/libraries/libssh2/default.nix +++ b/pkgs/development/libraries/libssh2/default.nix @@ -1,6 +1,4 @@ -{ stdenv, fetchurlBoot, openssl, zlib, windows -, hostPlatform -}: +{ stdenv, fetchurlBoot, openssl, zlib, windows }: stdenv.mkDerivation rec { name = "libssh2-1.8.0"; @@ -13,7 +11,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "devdoc" ]; buildInputs = [ openssl zlib ] - ++ stdenv.lib.optional hostPlatform.isMinGW windows.mingw_w64; + ++ stdenv.lib.optional stdenv.hostPlatform.isMinGW windows.mingw_w64; meta = { description = "A client-side C library implementing the SSH2 protocol"; diff --git a/pkgs/development/libraries/libvpx/default.nix b/pkgs/development/libraries/libvpx/default.nix index 515aa253744..cd0cc9798fa 100644 --- a/pkgs/development/libraries/libvpx/default.nix +++ b/pkgs/development/libraries/libvpx/default.nix @@ -1,5 +1,4 @@ { stdenv, fetchFromGitHub, perl, yasm -, hostPlatform , vp8DecoderSupport ? true # VP8 decoder , vp8EncoderSupport ? true # VP8 encoder , vp9DecoderSupport ? true # VP9 decoder @@ -141,17 +140,17 @@ stdenv.mkDerivation rec { # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 - "--force-target=${hostPlatform.config}${ - if hostPlatform.isDarwin then - if hostPlatform.osxMinVersion == "10.10" then "14" - else if hostPlatform.osxMinVersion == "10.9" then "13" - else if hostPlatform.osxMinVersion == "10.8" then "12" - else if hostPlatform.osxMinVersion == "10.7" then "11" - else if hostPlatform.osxMinVersion == "10.6" then "10" - else if hostPlatform.osxMinVersion == "10.5" then "9" + "--force-target=${stdenv.hostPlatform.config}${ + if stdenv.hostPlatform.isDarwin then + if stdenv.hostPlatform.osxMinVersion == "10.10" then "14" + else if stdenv.hostPlatform.osxMinVersion == "10.9" then "13" + else if stdenv.hostPlatform.osxMinVersion == "10.8" then "12" + else if stdenv.hostPlatform.osxMinVersion == "10.7" then "11" + else if stdenv.hostPlatform.osxMinVersion == "10.6" then "10" + else if stdenv.hostPlatform.osxMinVersion == "10.5" then "9" else "8" else ""}-gcc" - (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "") + (if stdenv.hostPlatform.isCygwin then "--enable-static-msvcrt" else "") ] # Experimental features ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc" ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats" diff --git a/pkgs/development/libraries/libvpx/git.nix b/pkgs/development/libraries/libvpx/git.nix index fb7f828f61f..a39113e05b6 100644 --- a/pkgs/development/libraries/libvpx/git.nix +++ b/pkgs/development/libraries/libvpx/git.nix @@ -1,5 +1,4 @@ { stdenv, fetchgit, perl, yasm -, hostPlatform , vp8DecoderSupport ? true # VP8 decoder , vp8EncoderSupport ? true # VP8 encoder , vp9DecoderSupport ? true # VP9 decoder @@ -148,17 +147,17 @@ stdenv.mkDerivation rec { # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 - "--force-target=${hostPlatform.config}${ - if hostPlatform.isDarwin then - if hostPlatform.osxMinVersion == "10.10" then "14" - else if hostPlatform.osxMinVersion == "10.9" then "13" - else if hostPlatform.osxMinVersion == "10.8" then "12" - else if hostPlatform.osxMinVersion == "10.7" then "11" - else if hostPlatform.osxMinVersion == "10.6" then "10" - else if hostPlatform.osxMinVersion == "10.5" then "9" + "--force-target=${stdenv.hostPlatform.config}${ + if stdenv.hostPlatform.isDarwin then + if stdenv.hostPlatform.osxMinVersion == "10.10" then "14" + else if stdenv.hostPlatform.osxMinVersion == "10.9" then "13" + else if stdenv.hostPlatform.osxMinVersion == "10.8" then "12" + else if stdenv.hostPlatform.osxMinVersion == "10.7" then "11" + else if stdenv.hostPlatform.osxMinVersion == "10.6" then "10" + else if stdenv.hostPlatform.osxMinVersion == "10.5" then "9" else "8" else ""}-gcc" - (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "") + (if stdenv.hostPlatform.isCygwin then "--enable-static-msvcrt" else "") ] # Experimental features ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc" ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats" diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 2f0f0f1425d..c359ea10b66 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -1,9 +1,8 @@ { stdenv, lib, fetchurl, fetchpatch , zlib, xz, python2, findXMLCatalogs -, buildPlatform, hostPlatform -, pythonSupport ? buildPlatform == hostPlatform +, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform , icuSupport ? false, icu ? null -, enableShared ? hostPlatform.libc != "msvcrt" +, enableShared ? stdenv.hostPlatform.libc != "msvcrt" , enableStatic ? !enableShared, }: @@ -56,7 +55,7 @@ in stdenv.mkDerivation rec { enableParallelBuilding = true; doCheck = (stdenv.hostPlatform == stdenv.buildPlatform) && !stdenv.isDarwin && - hostPlatform.libc != "musl"; + stdenv.hostPlatform.libc != "musl"; preInstall = lib.optionalString pythonSupport ''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"''; diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index 4dfdea582a2..6dc40bd45a0 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -1,7 +1,6 @@ { stdenv, fetchurl, libxml2, findXMLCatalogs, python2 -, buildPlatform, hostPlatform , cryptoSupport ? false -, pythonSupport ? buildPlatform == hostPlatform +, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform }: assert pythonSupport -> python2 != null; @@ -22,7 +21,7 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optional stdenv.isSunOS ./patch-ah.patch; # fixes: can't build x86_64-unknown-cygwin shared library unless -no-undefined is specified - postPatch = optionalString hostPlatform.isCygwin '' + postPatch = optionalString stdenv.hostPlatform.isCygwin '' substituteInPlace tests/plugins/Makefile.in \ --replace 'la_LDFLAGS =' 'la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS)' ''; diff --git a/pkgs/development/libraries/microsoft_gsl/default.nix b/pkgs/development/libraries/microsoft_gsl/default.nix index 1c10bd6f8fc..c4c4d8e3a57 100644 --- a/pkgs/development/libraries/microsoft_gsl/default.nix +++ b/pkgs/development/libraries/microsoft_gsl/default.nix @@ -1,9 +1,8 @@ { stdenv, fetchgit, cmake -, hostPlatform, buildPlatform }: let - nativeBuild = hostPlatform == buildPlatform; + nativeBuild = stdenv.hostPlatform == stdenv.buildPlatform; in stdenv.mkDerivation rec { name = "microsoft_gsl-${version}"; diff --git a/pkgs/development/libraries/mpfr/default.nix b/pkgs/development/libraries/mpfr/default.nix index afb44dd80f9..ea94a55a619 100644 --- a/pkgs/development/libraries/mpfr/default.nix +++ b/pkgs/development/libraries/mpfr/default.nix @@ -1,6 +1,4 @@ -{ stdenv, fetchurl, gmp -, hostPlatform -}: +{ stdenv, fetchurl, gmp }: stdenv.mkDerivation rec { version = "4.0.1"; @@ -17,8 +15,8 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ gmp ]; configureFlags = - stdenv.lib.optional hostPlatform.isSunOS "--disable-thread-safe" ++ - stdenv.lib.optional hostPlatform.is64bit "--with-pic"; + stdenv.lib.optional stdenv.hostPlatform.isSunOS "--disable-thread-safe" ++ + stdenv.lib.optional stdenv.hostPlatform.is64bit "--with-pic"; doCheck = true; # not cross; diff --git a/pkgs/development/libraries/msgpack/generic.nix b/pkgs/development/libraries/msgpack/generic.nix index 67418b6666d..306becf0c18 100644 --- a/pkgs/development/libraries/msgpack/generic.nix +++ b/pkgs/development/libraries/msgpack/generic.nix @@ -1,6 +1,5 @@ { stdenv, cmake , version, src, patches ? [ ] -, hostPlatform , ... }: @@ -16,7 +15,7 @@ stdenv.mkDerivation rec { cmakeFlags = [] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DMSGPACK_BUILD_EXAMPLES=OFF" - ++ stdenv.lib.optional (hostPlatform.libc == "msvcrt") + ++ stdenv.lib.optional (stdenv.hostPlatform.libc == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows" ; diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index 861b387a993..6293efcca8b 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -8,7 +8,6 @@ , gpm -, buildPlatform, hostPlatform , buildPackages }: @@ -36,7 +35,7 @@ stdenv.mkDerivation rec { ] ++ lib.optional unicode "--enable-widec" ++ lib.optional (!withCxx) "--without-cxx" ++ lib.optional (abiVersion == "5") "--with-abi-version=5" - ++ lib.optionals hostPlatform.isWindows [ + ++ lib.optionals stdenv.hostPlatform.isWindows [ "--enable-sp-funcs" "--enable-term-driver" ]; @@ -47,7 +46,7 @@ stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ pkgconfig - ] ++ lib.optionals (buildPlatform != hostPlatform) [ + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ buildPackages.ncurses ]; buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm; @@ -137,7 +136,7 @@ stdenv.mkDerivation rec { moveToOutput "bin/infotocap" "$out" ''; - preFixup = lib.optionalString (!hostPlatform.isCygwin && !enableStatic) '' + preFixup = lib.optionalString (!stdenv.hostPlatform.isCygwin && !enableStatic) '' rm "$out"/lib/*.a ''; diff --git a/pkgs/development/libraries/nlohmann_json/default.nix b/pkgs/development/libraries/nlohmann_json/default.nix index 0221722e487..15bdbb1b48e 100644 --- a/pkgs/development/libraries/nlohmann_json/default.nix +++ b/pkgs/development/libraries/nlohmann_json/default.nix @@ -1,5 +1,4 @@ { stdenv, fetchFromGitHub, cmake -, hostPlatform }: stdenv.mkDerivation rec { @@ -19,7 +18,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBuildTests=${if doCheck then "ON" else "OFF"}" - ] ++ stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [ + ] ++ stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ "-DCMAKE_SYSTEM_NAME=Windows" ]; diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 380c0c4af63..de13f963b67 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -1,5 +1,4 @@ { stdenv, fetchurl, buildPackages, perl -, buildPlatform, hostPlatform , withCryptodev ? false, cryptodevHeaders , enableSSL2 ? false , static ? false @@ -20,8 +19,8 @@ let (args.patches or []) ++ [ ./nix-ssl-cert-file.patch ] ++ optional (versionOlder version "1.1.0") - (if hostPlatform.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch) - ++ optional (versionOlder version "1.0.2" && hostPlatform.isDarwin) + (if stdenv.hostPlatform.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch) + ++ optional (versionOlder version "1.0.2" && stdenv.hostPlatform.isDarwin) ./darwin-arch.patch; postPatch = '' @@ -40,7 +39,7 @@ let outputs = [ "bin" "dev" "out" "man" ]; setOutputFlags = false; - separateDebugInfo = hostPlatform.isLinux; + separateDebugInfo = stdenv.hostPlatform.isLinux; nativeBuildInputs = [ perl ]; buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders; @@ -50,19 +49,19 @@ let configureScript = { "x86_64-darwin" = "./Configure darwin64-x86_64-cc"; "x86_64-solaris" = "./Configure solaris64-x86_64-gcc"; - }.${hostPlatform.system} or ( - if hostPlatform == buildPlatform + }.${stdenv.hostPlatform.system} or ( + if stdenv.hostPlatform == stdenv.buildPlatform then "./config" - else if hostPlatform.isMinGW + else if stdenv.hostPlatform.isMinGW then "./Configure mingw${optionalString - (hostPlatform.parsed.cpu.bits != 32) - (toString hostPlatform.parsed.cpu.bits)}" - else if hostPlatform.isLinux - then "./Configure linux-generic${toString hostPlatform.parsed.cpu.bits}" - else if hostPlatform.isiOS - then "./Configure ios${toString hostPlatform.parsed.cpu.bits}-cross" + (stdenv.hostPlatform.parsed.cpu.bits != 32) + (toString stdenv.hostPlatform.parsed.cpu.bits)}" + else if stdenv.hostPlatform.isLinux + then "./Configure linux-generic${toString stdenv.hostPlatform.parsed.cpu.bits}" + else if stdenv.hostPlatform.isiOS + then "./Configure ios${toString stdenv.hostPlatform.parsed.cpu.bits}-cross" else - throw "Not sure what configuration to use for ${hostPlatform.config}" + throw "Not sure what configuration to use for ${stdenv.hostPlatform.config}" ); configureFlags = [ @@ -73,7 +72,7 @@ let "-DHAVE_CRYPTODEV" "-DUSE_CRYPTODEV_DIGESTS" ] ++ stdenv.lib.optional enableSSL2 "enable-ssl2" - ++ stdenv.lib.optional (versionAtLeast version "1.1.0" && hostPlatform.isAarch64) "no-afalgeng"; + ++ stdenv.lib.optional (versionAtLeast version "1.1.0" && stdenv.hostPlatform.isAarch64) "no-afalgeng"; makeFlags = [ "MANDIR=$(man)/share/man" ]; diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 04104346748..f9bd4ae91b4 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -1,6 +1,5 @@ { stdenv, fetchurl , pcre, windows ? null -, buildPlatform, hostPlatform , variant ? null }: @@ -24,13 +23,13 @@ in stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" "doc" "man" ]; - configureFlags = optional (!hostPlatform.isRiscV) "--enable-jit" ++ [ + configureFlags = optional (!stdenv.hostPlatform.isRiscV) "--enable-jit" ++ [ "--enable-unicode-properties" "--disable-cpp" ] ++ optional (variant != null) "--enable-${variant}"; - buildInputs = optional (hostPlatform.libc == "msvcrt") windows.mingw_w64_pthreads; + buildInputs = optional (stdenv.hostPlatform.libc == "msvcrt") windows.mingw_w64_pthreads; # https://bugs.exim.org/show_bug.cgi?id=2173 patches = [ ./stacksize-detection.patch ]; @@ -39,7 +38,7 @@ in stdenv.mkDerivation rec { patchShebangs RunGrepTest ''; - doCheck = !(with hostPlatform; isCygwin || isFreeBSD) && hostPlatform == buildPlatform; + doCheck = !(with stdenv.hostPlatform; isCygwin || isFreeBSD) && stdenv.hostPlatform == stdenv.buildPlatform; # XXX: test failure on Cygwin # we are running out of stack on both freeBSDs on Hydra diff --git a/pkgs/development/libraries/readline/6.2.nix b/pkgs/development/libraries/readline/6.2.nix index 2c800e23b27..e97b31896c1 100644 --- a/pkgs/development/libraries/readline/6.2.nix +++ b/pkgs/development/libraries/readline/6.2.nix @@ -1,5 +1,4 @@ { fetchurl, stdenv, ncurses -, buildPlatform, hostPlatform }: stdenv.mkDerivation (rec { @@ -59,6 +58,6 @@ stdenv.mkDerivation (rec { // # Don't run the native `strip' when cross-compiling. -(if hostPlatform != buildPlatform +(if stdenv.hostPlatform != stdenv.buildPlatform then { dontStrip = true; } else { })) diff --git a/pkgs/development/libraries/readline/6.3.nix b/pkgs/development/libraries/readline/6.3.nix index 75c25e12d66..cfa70f423db 100644 --- a/pkgs/development/libraries/readline/6.3.nix +++ b/pkgs/development/libraries/readline/6.3.nix @@ -1,6 +1,4 @@ -{ fetchurl, stdenv, ncurses -, buildPlatform, hostPlatform -}: +{ fetchurl, stdenv, ncurses }: stdenv.mkDerivation rec { name = "readline-6.3p08"; @@ -37,7 +35,7 @@ stdenv.mkDerivation rec { import ./readline-6.3-patches.nix patch); # Don't run the native `strip' when cross-compiling. - dontStrip = hostPlatform != buildPlatform; + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; bash_cv_func_sigsetjmp = if stdenv.isCygwin then "missing" else null; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/readline/7.0.nix b/pkgs/development/libraries/readline/7.0.nix index a7306010a8b..9c0c3d31b4b 100644 --- a/pkgs/development/libraries/readline/7.0.nix +++ b/pkgs/development/libraries/readline/7.0.nix @@ -1,5 +1,4 @@ { fetchurl, stdenv, ncurses -, buildPlatform, hostPlatform }: stdenv.mkDerivation rec { @@ -34,7 +33,7 @@ stdenv.mkDerivation rec { ++ upstreamPatches; # Don't run the native `strip' when cross-compiling. - dontStrip = hostPlatform != buildPlatform; + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; bash_cv_func_sigsetjmp = if stdenv.isCygwin then "missing" else null; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index fa6b8fb13b5..d3fb0970cd0 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -1,6 +1,5 @@ { stdenv , fetchurl -, buildPlatform, hostPlatform , static ? false }: @@ -16,9 +15,9 @@ stdenv.mkDerivation rec { sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"; }; - patches = stdenv.lib.optional hostPlatform.isCygwin ./disable-cygwin-widechar.patch; + patches = stdenv.lib.optional stdenv.hostPlatform.isCygwin ./disable-cygwin-widechar.patch; - postPatch = stdenv.lib.optionalString hostPlatform.isDarwin '' + postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure \ --replace '/usr/bin/libtool' 'ar' \ --replace 'AR="libtool"' 'AR="ar"' \ @@ -37,25 +36,25 @@ stdenv.mkDerivation rec { # jww (2015-01-06): Sometimes this library install as a .so, even on # Darwin; others time it installs as a .dylib. I haven't yet figured out # what causes this difference. - + stdenv.lib.optionalString hostPlatform.isDarwin '' + + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' for file in $out/lib/*.so* $out/lib/*.dylib* ; do install_name_tool -id "$file" $file done '' # Non-typical naming confuses libtool which then refuses to use zlib's DLL # in some cases, e.g. when compiling libpng. - + stdenv.lib.optionalString (hostPlatform.libc == "msvcrt") '' + + stdenv.lib.optionalString (stdenv.hostPlatform.libc == "msvcrt") '' ln -s zlib1.dll $out/bin/libz.dll ''; # As zlib takes part in the stdenv building, we don't want references # to the bootstrap-tools libgcc (as uses to happen on arm/mips) - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!hostPlatform.isDarwin) "-static-libgcc"; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.hostPlatform.isDarwin) "-static-libgcc"; - dontStrip = hostPlatform != buildPlatform && static; + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform && static; configurePlatforms = []; - installFlags = stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [ + installFlags = stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ "BINARY_PATH=$(out)/bin" "INCLUDE_PATH=$(dev)/include" "LIBRARY_PATH=$(out)/lib" @@ -63,7 +62,7 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=${stdenv.cc.targetPrefix}" - ] ++ stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [ + ] ++ stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ "-f" "win32/Makefile.gcc" ] ++ stdenv.lib.optionals (!static) [ "SHARED_MODE=1" diff --git a/pkgs/development/mobile/androidenv/androidndk-pkgs.nix b/pkgs/development/mobile/androidenv/androidndk-pkgs.nix index 0f43705c0d4..e4ea9508aeb 100644 --- a/pkgs/development/mobile/androidenv/androidndk-pkgs.nix +++ b/pkgs/development/mobile/androidenv/androidndk-pkgs.nix @@ -1,4 +1,4 @@ -{ lib, hostPlatform, targetPlatform +{ lib , makeWrapper , runCommand, wrapBintoolsWith, wrapCCWith , buildAndroidndk, androidndk, targetAndroidndkPkgs @@ -33,8 +33,8 @@ let }.${config} or (throw "Android NDK doesn't support ${config}, as far as we know"); - hostInfo = ndkInfoFun hostPlatform; - targetInfo = ndkInfoFun targetPlatform; + hostInfo = ndkInfoFun stdenv.hostPlatform; + targetInfo = ndkInfoFun stdenv.targetPlatform; in @@ -51,7 +51,7 @@ rec { mkdir -p $out/bin for prog in ${ndkBinDir}/${targetInfo.triple}-*; do prog_suffix=$(basename $prog | sed 's/${targetInfo.triple}-//') - ln -s $prog $out/bin/${targetPlatform.config}-$prog_suffix + ln -s $prog $out/bin/${stdenv.targetPlatform.config}-$prog_suffix done ''; @@ -68,11 +68,11 @@ rec { bintools = binutils; libc = targetAndroidndkPkgs.libraries; extraBuildCommands = '' - echo "-D__ANDROID_API__=${targetPlatform.sdkVer}" >> $out/nix-support/cc-cflags + echo "-D__ANDROID_API__=${stdenv.targetPlatform.sdkVer}" >> $out/nix-support/cc-cflags '' - + lib.optionalString targetPlatform.isAarch32 (let - p = targetPlatform.platform.gcc or {} - // targetPlatform.parsed.abi; + + lib.optionalString stdenv.targetPlatform.isAarch32 (let + p = stdenv.targetPlatform.platform.gcc or {} + // stdenv.targetPlatform.parsed.abi; flags = lib.concatLists [ (lib.optional (p ? arch) "-march=${p.arch}") (lib.optional (p ? cpu) "-mcpu=${p.cpu}") @@ -84,10 +84,10 @@ rec { ]; in '' sed -E -i \ - $out/bin/${targetPlatform.config}-cc \ - $out/bin/${targetPlatform.config}-c++ \ - $out/bin/${targetPlatform.config}-gcc \ - $out/bin/${targetPlatform.config}-g++ \ + $out/bin/${stdenv.targetPlatform.config}-cc \ + $out/bin/${stdenv.targetPlatform.config}-c++ \ + $out/bin/${stdenv.targetPlatform.config}-gcc \ + $out/bin/${stdenv.targetPlatform.config}-g++ \ -e '130i extraBefore+=(-Wl,--fix-cortex-a8)' \ -e 's|^(extraBefore=)\(\)$|\1(${builtins.toString flags})|' '') @@ -107,10 +107,10 @@ rec { libraries = let includePath = if buildAndroidndk.version == "10e" then - "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/include/" + "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${stdenv.hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/include/" else "${buildAndroidndk}/libexec/${buildAndroidndk.name}/sysroot/usr/include"; - libPath = "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/lib/"; + libPath = "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${stdenv.hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/lib/"; in runCommand "bionic-prebuilt" {} '' mkdir -p $out diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix index d9e884dabbe..5577004465e 100644 --- a/pkgs/development/python-modules/numpy/default.nix +++ b/pkgs/development/python-modules/numpy/default.nix @@ -1,4 +1,4 @@ -{lib, fetchPypi, python, buildPythonPackage, isPyPy, gfortran, nose, blas, hostPlatform }: +{ stdenv, lib, fetchPypi, python, buildPythonPackage, isPyPy, gfortran, nose, blas }: buildPythonPackage rec { pname = "numpy"; @@ -20,7 +20,7 @@ buildPythonPackage rec { ./numpy-distutils-C++.patch ]; - postPatch = lib.optionalString hostPlatform.isMusl '' + postPatch = lib.optionalString stdenv.hostPlatform.isMusl '' # Use fenv.h sed -i \ numpy/core/src/npymath/ieee754.c.src \ diff --git a/pkgs/development/python-modules/pyserial/default.nix b/pkgs/development/python-modules/pyserial/default.nix index c7787a42691..98ffbe5ad9e 100644 --- a/pkgs/development/python-modules/pyserial/default.nix +++ b/pkgs/development/python-modules/pyserial/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchPypi, buildPythonPackage, hostPlatform }: +{ stdenv, lib, fetchPypi, buildPythonPackage }: buildPythonPackage rec { pname = "pyserial"; @@ -10,7 +10,7 @@ buildPythonPackage rec { }; checkPhase = "python -m unittest discover -s test"; - doCheck = !hostPlatform.isDarwin; # broken on darwin + doCheck = !stdenv.hostPlatform.isDarwin; # broken on darwin meta = with lib; { homepage = "https://github.com/pyserial/pyserial"; diff --git a/pkgs/development/tools/build-managers/cmake/2.8.nix b/pkgs/development/tools/build-managers/cmake/2.8.nix index a57d20e2702..2cbc87a5267 100644 --- a/pkgs/development/tools/build-managers/cmake/2.8.nix +++ b/pkgs/development/tools/build-managers/cmake/2.8.nix @@ -1,6 +1,5 @@ { stdenv, fetchurl, fetchpatch, curl, expat, zlib, bzip2 , useNcurses ? false, ncurses, useQt4 ? false, qt4, ps -, buildPlatform, hostPlatform }: with stdenv.lib; @@ -35,7 +34,7 @@ stdenv.mkDerivation rec { })] ++ # Don't search in non-Nix locations such as /usr, but do search in our libc. [ ./search-path.patch ] ++ - optional (hostPlatform != buildPlatform) (fetchurl { + optional (stdenv.hostPlatform != stdenv.buildPlatform) (fetchurl { name = "fix-darwin-cross-compile.patch"; url = "https://public.kitware.com/Bug/file_download.php?" + "file_id=4981&type=bug"; diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index ca53c4d8c53..35ae59af617 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -1,4 +1,4 @@ -{ lib, python3Packages, stdenv, targetPlatform, writeTextDir, substituteAll }: +{ lib, python3Packages, stdenv, writeTextDir, substituteAll }: python3Packages.buildPythonApplication rec { version = "0.46.1"; @@ -57,10 +57,10 @@ python3Packages.buildPythonApplication rec { needs_exe_wrapper = true [host_machine] - system = '${targetPlatform.parsed.kernel.name}' - cpu_family = '${targetPlatform.parsed.cpu.family}' - cpu = '${targetPlatform.parsed.cpu.name}' - endian = ${if targetPlatform.isLittleEndian then "'little'" else "'big'"} + system = '${stdenv.targetPlatform.parsed.kernel.name}' + cpu_family = '${stdenv.targetPlatform.parsed.cpu.family}' + cpu = '${stdenv.targetPlatform.parsed.cpu.name}' + endian = ${if stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"} ''; # 0.45 update enabled tests but they are failing diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 3ca9e539ddd..3205366f80e 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -1,6 +1,5 @@ { stdenv, buildPackages , fetchurl, zlib, autoreconfHook264 -, hostPlatform, buildPlatform, targetPlatform , noSysDirs, gold ? true, bison ? null }: @@ -13,7 +12,7 @@ let inherit (stdenv.lib) optionals optionalString; # The targetPrefix prepended to binary names to allow multiple binuntils on the # PATH to both be usable. - targetPrefix = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-"; + targetPrefix = optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "${stdenv.targetPlatform.config}-"; in stdenv.mkDerivation rec { @@ -65,14 +64,14 @@ stdenv.mkDerivation rec { # be satisfied on aarch64 platform. Add backported fix from bugzilla. # https://sourceware.org/bugzilla/show_bug.cgi?id=22764 ./relax-R_AARCH64_ABS32-R_AARCH64_ABS16-absolute.patch - ] ++ stdenv.lib.optional targetPlatform.isiOS ./support-ios.patch; + ] ++ stdenv.lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch; outputs = [ "out" "info" "man" ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ bison - ] ++ stdenv.lib.optionals targetPlatform.isiOS [ + ] ++ stdenv.lib.optionals stdenv.targetPlatform.isiOS [ autoreconfHook264 ]; buildInputs = [ zlib ]; @@ -94,14 +93,14 @@ stdenv.mkDerivation rec { # As binutils takes part in the stdenv building, we don't want references # to the bootstrap-tools libgcc (as uses to happen on arm/mips) - NIX_CFLAGS_COMPILE = if hostPlatform.isDarwin + NIX_CFLAGS_COMPILE = if stdenv.hostPlatform.isDarwin then "-Wno-string-plus-int -Wno-deprecated-declarations" else "-static-libgcc"; hardeningDisable = [ "format" ]; # TODO(@Ericson2314): Always pass "--target" and always targetPrefix. - configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; + configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target"; configureFlags = [ "--enable-targets=all" "--enable-64-bit-bfd" @@ -122,7 +121,7 @@ stdenv.mkDerivation rec { doCheck = false; # fails # else fails with "./sanity.sh: line 36: $out/bin/size: not found" - doInstallCheck = buildPlatform == hostPlatform && hostPlatform == targetPlatform; + doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform && stdenv.hostPlatform == stdenv.targetPlatform; enableParallelBuilding = true; diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index 1c2efbeea76..a60a77bed30 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -6,9 +6,7 @@ # Run time , ncurses, readline, gmp, mpfr, expat, zlib, dejagnu -, buildPlatform, hostPlatform, targetPlatform - -, pythonSupport ? hostPlatform == buildPlatform && !hostPlatform.isCygwin, python ? null +, pythonSupport ? stdenv.hostPlatform == stdenv.buildPlatform && !stdenv.hostPlatform.isCygwin, python ? null , guile ? null }: @@ -22,8 +20,8 @@ assert pythonSupport -> python != null; stdenv.mkDerivation rec { name = - stdenv.lib.optionalString (targetPlatform != hostPlatform) - (targetPlatform.config + "-") + stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) + (stdenv.targetPlatform.config + "-") + basename; src = fetchurl { @@ -50,7 +48,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral"; # TODO(@Ericson2314): Always pass "--target" and always prefix. - configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; + configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target"; configureFlags = with stdenv.lib; [ "--enable-targets=all" "--enable-64-bit-bfd" diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix index 7e92df1a997..e5ea17841aa 100644 --- a/pkgs/development/tools/misc/gnum4/default.nix +++ b/pkgs/development/tools/misc/gnum4/default.nix @@ -1,4 +1,4 @@ -{ stdenv, hostPlatform, fetchurl }: +{ stdenv, fetchurl }: stdenv.mkDerivation rec { name = "gnum4-1.4.18"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ]; # Upstream is aware of it; it may be in the next release. - patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional hostPlatform.isDarwin stdenv.secure-format-patch; + patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin stdenv.secure-format-patch; meta = { homepage = http://www.gnu.org/software/m4/; diff --git a/pkgs/development/tools/misc/help2man/default.nix b/pkgs/development/tools/misc/help2man/default.nix index b786aa2123f..7e2dc49fe0f 100644 --- a/pkgs/development/tools/misc/help2man/default.nix +++ b/pkgs/development/tools/misc/help2man/default.nix @@ -1,4 +1,4 @@ -{ stdenv, hostPlatform, fetchurl, perl, gettext, LocaleGettext }: +{ stdenv, fetchurl, perl, gettext, LocaleGettext }: stdenv.mkDerivation rec { name = "help2man-1.47.6"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { doCheck = false; # target `check' is missing - patches = if hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null; + patches = if stdenv.hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null; # We don't use makeWrapper here because it uses substitutions our # bootstrap shell can't handle. @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { cat > $out/bin/help2man < maloader != null; +assert (!stdenv.hostPlatform.isDarwin) -> maloader != null; assert enableDumpNormalizedLibArgs -> (!useOld); @@ -77,7 +76,7 @@ let enableParallelBuilding = true; # TODO(@Ericson2314): Always pass "--target" and always targetPrefix. - configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; + configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target"; postPatch = '' sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp @@ -131,7 +130,7 @@ let }; meta = { - broken = !targetPlatform.isDarwin; # Only supports darwin targets + broken = !stdenv.targetPlatform.isDarwin; # Only supports darwin targets homepage = http://www.opensource.apple.com/source/cctools/; description = "MacOS Compiler Tools (cross-platform port)"; license = stdenv.lib.licenses.apsl20; diff --git a/pkgs/os-specific/darwin/xcode/default.nix b/pkgs/os-specific/darwin/xcode/default.nix index 910f1b91c21..369529d7167 100644 --- a/pkgs/os-specific/darwin/xcode/default.nix +++ b/pkgs/os-specific/darwin/xcode/default.nix @@ -1,4 +1,4 @@ -{ stdenv, requireFile, targetPlatform, lib }: +{ stdenv, requireFile, lib }: let requireXcode = version: sha256: let @@ -46,5 +46,5 @@ in lib.makeExtensible (self: { xcode_9_1 = requireXcode "9.1" "0ab1403wy84ys3yn26fj78cazhpnslmh3nzzp1wxib3mr1afjvic"; xcode_9_2 = requireXcode "9.2" "1bgfgdp266cbbqf2axcflz92frzvhi0qw0jdkcw6r85kdpc8dj4c"; xcode_9_4 = requireXcode "9.4" "6731381785075602a52489f7ea47ece8f6daf225007ba3ffae1fd59b1c0b5f01"; - xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if targetPlatform.useiOSPrebuilt then targetPlatform.xcodeVer else "8.2")}"; + xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if stdenv.targetPlatform.useiOSPrebuilt then stdenv.targetPlatform.xcodeVer else "8.2")}"; }) diff --git a/pkgs/os-specific/linux/busybox/sandbox-shell.nix b/pkgs/os-specific/linux/busybox/sandbox-shell.nix index b94fae7f787..de8865ba3ac 100644 --- a/pkgs/os-specific/linux/busybox/sandbox-shell.nix +++ b/pkgs/os-specific/linux/busybox/sandbox-shell.nix @@ -1,9 +1,9 @@ -{ busybox, hostPlatform }: +{ busybox, stdenv}: # Minimal shell for use as basic /bin/sh in sandbox builds busybox.override { # musl roadmap has RISC-V support projected for 1.1.20 - useMusl = !hostPlatform.isRiscV; + useMusl = !stdenv.hostPlatform.isRiscV; enableStatic = true; enableMinimal = true; extraConfig = '' diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix index 677bb076b0c..e82b785f624 100644 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -1,9 +1,8 @@ { stdenvNoCC, lib, buildPackages -, hostPlatform , fetchurl, perl }: -assert hostPlatform.isLinux; +assert stdenvNoCC.hostPlatform.isLinux; let common = { version, sha256, patches ? null }: stdenvNoCC.mkDerivation { @@ -14,14 +13,14 @@ let inherit sha256; }; - ARCH = hostPlatform.platform.kernelArch; + ARCH = stdenvNoCC.hostPlatform.platform.kernelArch; # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc. # We do this so we have a build->build, not build->host, C compiler. depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ perl ]; - extraIncludeDirs = lib.optional hostPlatform.isPowerPC ["ppc"]; + extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"]; # "patches" array defaults to 'null' to avoid changing hash # and causing mass rebuild diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 4af5e80a655..e424dff596d 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -35,15 +35,14 @@ # symbolic name and `patch' is the actual patch. The patch may # optionally be compressed with gzip or bzip2. kernelPatches ? [] -, ignoreConfigErrors ? hostPlatform.platform.name != "pc" || - hostPlatform != stdenv.buildPlatform +, ignoreConfigErrors ? stdenv.hostPlatform.platform.name != "pc" || + stdenv.hostPlatform != stdenv.buildPlatform , extraMeta ? {} -, hostPlatform -# easy overrides to hostPlatform.platform members -, autoModules ? hostPlatform.platform.kernelAutoModules -, preferBuiltin ? hostPlatform.platform.kernelPreferBuiltin or false -, kernelArch ? hostPlatform.platform.kernelArch +# easy overrides to stdenv.hostPlatform.platform members +, autoModules ? stdenv.hostPlatform.platform.kernelAutoModules +, preferBuiltin ? stdenv.hostPlatform.platform.kernelPreferBuiltin or false +, kernelArch ? stdenv.hostPlatform.platform.kernelArch , mkValueOverride ? null , ... @@ -69,7 +68,7 @@ let inherit stdenv version structuredExtraConfig mkValueOverride; # append extraConfig for backwards compatibility but also means the user can't override the kernelExtraConfig part - extraConfig = extraConfig + lib.optionalString (hostPlatform.platform ? kernelExtraConfig) hostPlatform.platform.kernelExtraConfig; + extraConfig = extraConfig + lib.optionalString (stdenv.hostPlatform.platform ? kernelExtraConfig) stdenv.hostPlatform.platform.kernelExtraConfig; features = kernelFeatures; # Ensure we know of all extra patches, etc. }; @@ -93,11 +92,11 @@ let nativeBuildInputs = [ perl ] ++ lib.optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]; - platformName = hostPlatform.platform.name; + platformName = stdenv.hostPlatform.platform.name; # e.g. "defconfig" - kernelBaseConfig = if defconfig != null then defconfig else hostPlatform.platform.kernelBaseConfig; + kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.platform.kernelBaseConfig; # e.g. "bzImage" - kernelTarget = hostPlatform.platform.kernelTarget; + kernelTarget = stdenv.hostPlatform.platform.kernelTarget; prePatch = kernel.prePatch + '' # Patch kconfig to print "###" after every question so that @@ -128,7 +127,7 @@ let }; kernel = (callPackage ./manual-config.nix {}) { - inherit version modDirVersion src kernelPatches stdenv extraMeta configfile hostPlatform; + inherit version modDirVersion src kernelPatches stdenv extraMeta configfile; config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; }; }; diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix index bbc98592503..000764eca9b 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.14.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: +{ stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: with stdenv.lib; diff --git a/pkgs/os-specific/linux/kernel/linux-4.17.nix b/pkgs/os-specific/linux/kernel/linux-4.17.nix index c9a79fd23cb..5c13f366221 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.17.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.17.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: +{ stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: with stdenv.lib; diff --git a/pkgs/os-specific/linux/kernel/linux-4.18.nix b/pkgs/os-specific/linux/kernel/linux-4.18.nix index bbd0bbfbb21..e76beadc27b 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.18.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.18.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: +{ stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: with stdenv.lib; diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix index a4433cc434c..7c5f345e340 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: +{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { version = "4.4.153"; diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix index 8fa710a0e46..ed0075b7876 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.9.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: +{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { version = "4.9.124"; diff --git a/pkgs/os-specific/linux/kernel/linux-beagleboard.nix b/pkgs/os-specific/linux/kernel/linux-beagleboard.nix index 4f0ff53c59c..e98104f11ca 100644 --- a/pkgs/os-specific/linux/kernel/linux-beagleboard.nix +++ b/pkgs/os-specific/linux/kernel/linux-beagleboard.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ubootTools, dtc, ... } @ args: +{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ubootTools, dtc, ... } @ args: let modDirVersion = "4.14.12"; diff --git a/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix b/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix index 85ad00efcd6..366cfd39e4a 100644 --- a/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix +++ b/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: +{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args: with stdenv.lib; diff --git a/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix b/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix index 2bce56e1e52..d1d7d240cce 100644 --- a/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args: +{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args: buildLinux (args // rec { version = "4.14.66-147"; diff --git a/pkgs/os-specific/linux/kernel/linux-mptcp-93.nix b/pkgs/os-specific/linux/kernel/linux-mptcp-93.nix index 2efe357cbd6..8be59fbea90 100644 --- a/pkgs/os-specific/linux/kernel/linux-mptcp-93.nix +++ b/pkgs/os-specific/linux/kernel/linux-mptcp-93.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: +{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args: buildLinux (rec { mptcpVersion = "0.93"; diff --git a/pkgs/os-specific/linux/kernel/linux-mptcp.nix b/pkgs/os-specific/linux/kernel/linux-mptcp.nix index a439fd0a6ec..8014cb56526 100644 --- a/pkgs/os-specific/linux/kernel/linux-mptcp.nix +++ b/pkgs/os-specific/linux/kernel/linux-mptcp.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: +{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args: buildLinux (rec { mptcpVersion = "0.94"; diff --git a/pkgs/os-specific/linux/kernel/linux-riscv.nix b/pkgs/os-specific/linux/kernel/linux-riscv.nix index 60370311865..dbc69144c4d 100644 --- a/pkgs/os-specific/linux/kernel/linux-riscv.nix +++ b/pkgs/os-specific/linux/kernel/linux-riscv.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args: +{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args: buildLinux (args // rec { version = "4.16-rc6"; diff --git a/pkgs/os-specific/linux/kernel/linux-rpi.nix b/pkgs/os-specific/linux/kernel/linux-rpi.nix index 203faed0544..e6d7b1cee9d 100644 --- a/pkgs/os-specific/linux/kernel/linux-rpi.nix +++ b/pkgs/os-specific/linux/kernel/linux-rpi.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: +{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args: let modDirVersion = "4.14.50"; diff --git a/pkgs/os-specific/linux/kernel/linux-samus-4.12.nix b/pkgs/os-specific/linux/kernel/linux-samus-4.12.nix index 442c8967511..0a936c6c053 100644 --- a/pkgs/os-specific/linux/kernel/linux-samus-4.12.nix +++ b/pkgs/os-specific/linux/kernel/linux-samus-4.12.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ncurses, ... } @ args: +{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ncurses, ... } @ args: buildLinux (args // rec { version = "4.12.2"; diff --git a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix index 1fb9866f4e9..f9d2bd11813 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchgit, perl, buildLinux, ... } @ args: +{ stdenv, buildPackages, fetchgit, perl, buildLinux, ... } @ args: buildLinux (args // rec { version = "4.16.2018.08.03"; diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix index c2feeceb072..44f267bf715 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args: +{ stdenv, buildPackages, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args: buildLinux (args // rec { version = "4.19-rc1"; diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 33aa22abaf2..2cc83e62d11 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -36,8 +36,6 @@ in { allowImportFromDerivation ? false, # ignored features ? null, - - hostPlatform }: let @@ -56,8 +54,8 @@ let commonMakeFlags = [ "O=$(buildRoot)" - ] ++ stdenv.lib.optionals (hostPlatform.platform ? kernelMakeFlags) - hostPlatform.platform.kernelMakeFlags; + ] ++ stdenv.lib.optionals (stdenv.hostPlatform.platform ? kernelMakeFlags) + stdenv.hostPlatform.platform.kernelMakeFlags; drvAttrs = config_: platform: kernelPatches: configfile: let @@ -255,7 +253,7 @@ in assert stdenv.lib.versionAtLeast version "4.14" -> libelf != null; assert stdenv.lib.versionAtLeast version "4.15" -> utillinux != null; -stdenv.mkDerivation ((drvAttrs config hostPlatform.platform kernelPatches configfile) // { +stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // { name = "linux-${version}"; enableParallelBuilding = true; @@ -279,5 +277,5 @@ stdenv.mkDerivation ((drvAttrs config hostPlatform.platform kernelPatches config "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; - karch = hostPlatform.platform.kernelArch; + karch = stdenv.hostPlatform.platform.kernelArch; }) diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix index c503b982aa2..8cae61d56a9 100644 --- a/pkgs/os-specific/linux/klibc/default.nix +++ b/pkgs/os-specific/linux/klibc/default.nix @@ -1,6 +1,4 @@ -{ stdenv, fetchurl, linuxHeaders, perl -, buildPlatform, hostPlatform -}: +{ stdenv, fetchurl, linuxHeaders, perl }: let commonMakeFlags = [ @@ -25,12 +23,12 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" "stackprotector" ]; makeFlags = commonMakeFlags ++ [ - "KLIBCARCH=${hostPlatform.platform.kernelArch}" + "KLIBCARCH=${stdenv.hostPlatform.platform.kernelArch}" "KLIBCKERNELSRC=${linuxHeaders}" ] # TODO(@Ericson2314): We now can get the ABI from - # `hostPlatform.parsed.abi`, is this still a good idea? - ++ stdenv.lib.optional (hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y" - ++ stdenv.lib.optional (hostPlatform != buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}"; + # `stdenv.hostPlatform.parsed.abi`, is this still a good idea? + ++ stdenv.lib.optional (stdenv.hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y" + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}"; # Install static binaries as well. postInstall = '' diff --git a/pkgs/os-specific/linux/mdadm/default.nix b/pkgs/os-specific/linux/mdadm/default.nix index 6de666630bb..52a5f16bc52 100644 --- a/pkgs/os-specific/linux/mdadm/default.nix +++ b/pkgs/os-specific/linux/mdadm/default.nix @@ -1,6 +1,5 @@ { stdenv, writeScript , fetchurl, groff -, buildPlatform, hostPlatform }: let @@ -32,7 +31,7 @@ stdenv.mkDerivation rec { "NIXOS=1" "INSTALL=install" "INSTALL_BINDIR=$(out)/sbin" "MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm" "STRIP=" - ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; diff --git a/pkgs/os-specific/linux/musl/default.nix b/pkgs/os-specific/linux/musl/default.nix index e586539db08..9628ec51676 100644 --- a/pkgs/os-specific/linux/musl/default.nix +++ b/pkgs/os-specific/linux/musl/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, hostPlatform +{ stdenv, lib, fetchurl , linuxHeaders ? null , useBSDCompatHeaders ? true }: @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { configureFlagsArray+=("--syslibdir=$out/lib") ''; - CFLAGS="-fstack-protector-strong" + lib.optionalString hostPlatform.isPower " -mlong-double-64"; + CFLAGS="-fstack-protector-strong" + lib.optionalString stdenv.hostPlatform.isPower " -mlong-double-64"; configureFlags = [ "--enable-shared" diff --git a/pkgs/os-specific/linux/pam/default.nix b/pkgs/os-specific/linux/pam/default.nix index 0e703397249..9db581ad527 100644 --- a/pkgs/os-specific/linux/pam/default.nix +++ b/pkgs/os-specific/linux/pam/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchurl, fetchpatch, flex, cracklib, db4 }: +{ stdenv, buildPackages, fetchurl, fetchpatch, flex, cracklib, db4 }: stdenv.mkDerivation rec { name = "linux-pam-${version}"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"; }; - patches = stdenv.lib.optionals (hostPlatform.libc == "musl") [ + patches = stdenv.lib.optionals (stdenv.hostPlatform.libc == "musl") [ (fetchpatch { url = "https://git.alpinelinux.org/cgit/aports/plain/main/linux-pam/fix-compat.patch?id=05a62bda8ec255d7049a2bd4cf0fdc4b32bdb2cc"; sha256 = "1h5yp5h2mqp1fcwiwwklyfpa69a3i03ya32pivs60fd7g5bqa7sf"; @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { preConfigure = '' configureFlags="$configureFlags --includedir=$out/include/security" - '' + stdenv.lib.optionalString (hostPlatform.libc == "musl") '' + '' + stdenv.lib.optionalString (stdenv.hostPlatform.libc == "musl") '' # export ac_cv_search_crypt=no # (taken from Alpine linux, apparently insecure but also doesn't build O:)) # disable insecure modules diff --git a/pkgs/os-specific/linux/shadow/default.nix b/pkgs/os-specific/linux/shadow/default.nix index 885ea3421f6..8c778e72b70 100644 --- a/pkgs/os-specific/linux/shadow/default.nix +++ b/pkgs/os-specific/linux/shadow/default.nix @@ -1,15 +1,14 @@ { stdenv, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt, libxml2 , docbook_xml_dtd_412, docbook_xsl, gnome-doc-utils, flex, bison , pam ? null, glibcCross ? null -, buildPlatform, hostPlatform }: let glibc = - if hostPlatform != buildPlatform + if stdenv.hostPlatform != stdenv.buildPlatform then glibcCross - else assert hostPlatform.libc == "glibc"; stdenv.cc.libc; + else assert stdenv.hostPlatform.libc == "glibc"; stdenv.cc.libc; dots_in_usernames = fetchpatch { url = http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/shadow/files/shadow-4.1.3-dots-in-usernames.patch; @@ -63,9 +62,9 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-man" "--with-group-name-max-length=32" - ] ++ stdenv.lib.optional (hostPlatform.libc != "glibc") "--disable-nscd"; + ] ++ stdenv.lib.optional (stdenv.hostPlatform.libc != "glibc") "--disable-nscd"; - preBuild = stdenv.lib.optionalString (hostPlatform.libc == "glibc") + preBuild = stdenv.lib.optionalString (stdenv.hostPlatform.libc == "glibc") '' substituteInPlace lib/nscd.c --replace /usr/sbin/nscd ${glibc.bin}/bin/nscd ''; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 912ba5b5e0e..b4caa63799c 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -8,7 +8,6 @@ , ninja, meson, python3Packages, glibcLocales , patchelf , getent -, hostPlatform , buildPackages , withSelinux ? false, libselinux , withLibseccomp ? libseccomp.meta.available, libseccomp @@ -79,7 +78,7 @@ in stdenv.mkDerivation rec { "-Dsystem-gid-max=499" # "-Dtime-epoch=1" - (if stdenv.isAarch32 || stdenv.isAarch64 || !hostPlatform.isEfi then "-Dgnu-efi=false" else "-Dgnu-efi=true") + (if stdenv.isAarch32 || stdenv.isAarch64 || !stdenv.hostPlatform.isEfi then "-Dgnu-efi=false" else "-Dgnu-efi=true") "-Defi-libdir=${toString gnu-efi}/lib" "-Defi-includedir=${toString gnu-efi}/include/efi" "-Defi-ldsdir=${toString gnu-efi}/lib" diff --git a/pkgs/os-specific/linux/uclibc/default.nix b/pkgs/os-specific/linux/uclibc/default.nix index 3da12c41dc1..de1e47faf66 100644 --- a/pkgs/os-specific/linux/uclibc/default.nix +++ b/pkgs/os-specific/linux/uclibc/default.nix @@ -1,6 +1,5 @@ { stdenv, buildPackages , fetchurl, linuxHeaders, libiconvReal -, buildPlatform, hostPlatform , extraConfig ? "" }: @@ -40,7 +39,7 @@ let UCLIBC_SUSV4_LEGACY y UCLIBC_HAS_THREADS_NATIVE y KERNEL_HEADERS "${linuxHeaders}/include" - '' + stdenv.lib.optionalString (stdenv.isAarch32 && buildPlatform != hostPlatform) '' + '' + stdenv.lib.optionalString (stdenv.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) '' CONFIG_ARM_EABI y ARCH_WANTS_BIG_ENDIAN n ARCH_BIG_ENDIAN n @@ -69,7 +68,7 @@ stdenv.mkDerivation { cat << EOF | parseconfig ${nixConfig} ${extraConfig} - ${hostPlatform.platform.uclibc.extraConfig or ""} + ${stdenv.hostPlatform.platform.uclibc.extraConfig or ""} EOF ( set +o pipefail; yes "" | make oldconfig ) ''; @@ -82,7 +81,7 @@ stdenv.mkDerivation { depsBuildBuild = [ buildPackages.stdenv.cc ]; makeFlags = [ - "ARCH=${hostPlatform.parsed.cpu.name}" + "ARCH=${stdenv.hostPlatform.parsed.cpu.name}" "VERBOSE=1" ] ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "CROSS=${stdenv.cc.targetPrefix}" diff --git a/pkgs/os-specific/windows/pthread-w32/default.nix b/pkgs/os-specific/windows/pthread-w32/default.nix index e84270270f8..226bbfb16df 100644 --- a/pkgs/os-specific/windows/pthread-w32/default.nix +++ b/pkgs/os-specific/windows/pthread-w32/default.nix @@ -1,7 +1,7 @@ -{ fetchurl, stdenv, hostPlatform, buildPlatform, mingwrt }: +{ fetchurl, stdenv, mingwrt }: # This file is tweaked for cross-compilation only. -assert hostPlatform != buildPlatform; +assert stdenv.hostPlatform != stdenv.buildPlatform; stdenv.mkDerivation { name = "pthread-w32-1.10.0"; diff --git a/pkgs/os-specific/windows/wxMSW-2.8/default.nix b/pkgs/os-specific/windows/wxMSW-2.8/default.nix index 748bf39a1f2..65690af9869 100644 --- a/pkgs/os-specific/windows/wxMSW-2.8/default.nix +++ b/pkgs/os-specific/windows/wxMSW-2.8/default.nix @@ -1,6 +1,4 @@ -{ stdenv, fetchurl, compat24 ? false, compat26 ? true, unicode ? true -, hostPlatform -}: +{ stdenv, fetchurl, compat24 ? false, compat26 ? true, unicode ? true }: stdenv.mkDerivation { name = "wxMSW-2.8.11"; diff --git a/pkgs/shells/bash/4.4.nix b/pkgs/shells/bash/4.4.nix index de8efd5af27..313a2710b28 100644 --- a/pkgs/shells/bash/4.4.nix +++ b/pkgs/shells/bash/4.4.nix @@ -1,6 +1,5 @@ { stdenv, buildPackages , fetchurl, binutils ? null, bison, autoconf, utillinux -, buildPlatform, hostPlatform # patch for cygwin requires readline support , interactive ? stdenv.isCygwin, readline70 ? null @@ -11,7 +10,7 @@ with stdenv.lib; assert interactive -> readline70 != null; assert withDocs -> texinfo != null; -assert hostPlatform.isDarwin -> binutils != null; +assert stdenv.hostPlatform.isDarwin -> binutils != null; let upstreamPatches = import ./bash-4.4-patches.nix (nr: sha256: fetchurl { @@ -45,26 +44,26 @@ stdenv.mkDerivation rec { patchFlags = "-p0"; patches = upstreamPatches - ++ optional hostPlatform.isCygwin ./cygwin-bash-4.4.11-2.src.patch + ++ optional stdenv.hostPlatform.isCygwin ./cygwin-bash-4.4.11-2.src.patch # https://lists.gnu.org/archive/html/bug-bash/2016-10/msg00006.html - ++ optional hostPlatform.isMusl (fetchurl { + ++ optional stdenv.hostPlatform.isMusl (fetchurl { url = "https://lists.gnu.org/archive/html/bug-bash/2016-10/patchJxugOXrY2y.patch"; sha256 = "1m4v9imidb1cc1h91f2na0b8y9kc5c5fgmpvy9apcyv2kbdcghg1"; }); configureFlags = [ (if interactive then "--with-installed-readline" else "--disable-readline") - ] ++ optionals (hostPlatform != buildPlatform) [ + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "bash_cv_job_control_missing=nomissing" "bash_cv_sys_named_pipes=nomissing" "bash_cv_getcwd_malloc=yes" - ] ++ optionals hostPlatform.isCygwin [ + ] ++ optionals stdenv.hostPlatform.isCygwin [ "--without-libintl-prefix --without-libiconv-prefix" "--with-installed-readline" "bash_cv_dev_stdin=present" "bash_cv_dev_fd=standard" "bash_cv_termcap_lib=libncurses" - ] ++ optionals (hostPlatform.libc == "musl") [ + ] ++ optionals (stdenv.hostPlatform.libc == "musl") [ "--without-bash-malloc" "--disable-nls" ]; @@ -73,8 +72,8 @@ stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ bison ] ++ optional withDocs texinfo - ++ optional hostPlatform.isDarwin binutils - ++ optional (hostPlatform.libc == "musl") autoconf; + ++ optional stdenv.hostPlatform.isDarwin binutils + ++ optional (stdenv.hostPlatform.libc == "musl") autoconf; buildInputs = optional interactive readline70; @@ -82,7 +81,7 @@ stdenv.mkDerivation rec { # build `version.h'. enableParallelBuilding = false; - makeFlags = optional hostPlatform.isCygwin [ + makeFlags = optional stdenv.hostPlatform.isCygwin [ "LOCAL_LDFLAGS=-Wl,--export-all,--out-implib,libbash.dll.a" "SHOBJ_LIBS=-lbash" ]; diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index bc8d772530a..31ca9f2c82e 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -23,8 +23,9 @@ in lib.init bootStages ++ [ inherit config overlays; selfBuild = false; stdenv = - assert vanillaPackages.hostPlatform == localSystem; - assert vanillaPackages.targetPlatform == localSystem; + assert vanillaPackages.stdenv.buildPlatform == localSystem; + assert vanillaPackages.stdenv.hostPlatform == localSystem; + assert vanillaPackages.stdenv.targetPlatform == localSystem; vanillaPackages.stdenv.override { targetPlatform = crossSystem; }; # It's OK to change the built-time dependencies allowCustomOverrides = true; diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 22dd700b2dd..cda643c42fe 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -348,10 +348,10 @@ in rec { darwin = super.darwin // { inherit (darwin) dyld ICU Libsystem libiconv; - } // lib.optionalAttrs (super.targetPlatform == localSystem) { + } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { inherit (darwin) binutils binutils-unwrapped cctools; }; - } // lib.optionalAttrs (super.targetPlatform == localSystem) { + } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { # Need to get rid of these when cross-compiling. inherit binutils binutils-unwrapped; }; diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index c7fc2ebac35..de58178a34b 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -366,7 +366,7 @@ in gnumake gnused gnutar gnugrep gnupatch patchelf attr acl paxctl zlib pcre; ${localSystem.libc} = getLibc prevStage; - } // lib.optionalAttrs (super.targetPlatform == localSystem) { + } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { # Need to get rid of these when cross-compiling. inherit (prevStage) binutils binutils-unwrapped; gcc = cc; diff --git a/pkgs/tools/archivers/zpaq/zpaqd.nix b/pkgs/tools/archivers/zpaq/zpaqd.nix index 0d60e796246..344f0889090 100644 --- a/pkgs/tools/archivers/zpaq/zpaqd.nix +++ b/pkgs/tools/archivers/zpaq/zpaqd.nix @@ -1,6 +1,4 @@ -{ stdenv, fetchurl, unzip -, hostPlatform -}: +{ stdenv, fetchurl, unzip }: let # Generated upstream information @@ -14,10 +12,10 @@ let }; compileFlags = stdenv.lib.concatStringsSep " " ([ "-O3" "-mtune=generic" "-DNDEBUG" ] - ++ stdenv.lib.optional (hostPlatform.isUnix) "-Dunix -pthread" - ++ stdenv.lib.optional (hostPlatform.isi686) "-march=i686" - ++ stdenv.lib.optional (hostPlatform.isx86_64) "-march=nocona" - ++ stdenv.lib.optional (!hostPlatform.isx86) "-DNOJIT"); + ++ stdenv.lib.optional (stdenv.hostPlatform.isUnix) "-Dunix -pthread" + ++ stdenv.lib.optional (stdenv.hostPlatform.isi686) "-march=i686" + ++ stdenv.lib.optional (stdenv.hostPlatform.isx86_64) "-march=nocona" + ++ stdenv.lib.optional (!stdenv.hostPlatform.isx86) "-DNOJIT"); in stdenv.mkDerivation { inherit (s) name version; diff --git a/pkgs/tools/graphics/optipng/default.nix b/pkgs/tools/graphics/optipng/default.nix index fd0b0caea4c..bc849b21117 100644 --- a/pkgs/tools/graphics/optipng/default.nix +++ b/pkgs/tools/graphics/optipng/default.nix @@ -1,5 +1,4 @@ { stdenv, fetchurl, libpng, static ? false -, buildPlatform, hostPlatform }: # This package comes with its own copy of zlib, libpng and pngxtern @@ -26,11 +25,11 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-system-zlib" "--with-system-libpng" - ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ #"-prefix=$out" ]; - postInstall = if hostPlatform != buildPlatform && hostPlatform.isWindows then '' + postInstall = if stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isWindows then '' mv "$out"/bin/optipng{,.exe} '' else null; diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index 69d751a629e..6ffdd3b5d47 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -1,6 +1,5 @@ { stdenv, lib, buildPackages , autoreconfHook, texinfo, fetchurl, perl, xz, libiconv, gmp ? null -, hostPlatform, buildPlatform , aclSupport ? false, acl ? null , attrSupport ? false, attr ? null , selinuxSupport? false, libselinux ? null, libsepol ? null @@ -21,10 +20,10 @@ stdenv.mkDerivation rec { sha256 = "0plm1zs9il6bb5mk881qvbghq4glc8ybbgakk2lfzb0w64fgml4j"; }; - patches = optional hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch; + patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch; # The test tends to fail on btrfs and maybe other unusual filesystems. - postPatch = optionalString (!hostPlatform.isDarwin) '' + postPatch = optionalString (!stdenv.hostPlatform.isDarwin) '' sed '2i echo Skipping dd sparse test && exit 0' -i ./tests/dd/sparse.sh sed '2i echo Skipping cp sparse test && exit 0' -i ./tests/cp/sparse.sh sed '2i echo Skipping rm deep-2 test && exit 0' -i ./tests/rm/deep-2.sh @@ -40,9 +39,9 @@ stdenv.mkDerivation rec { configureFlags = optional (singleBinary != false) ("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}") - ++ optional hostPlatform.isSunOS "ac_cv_func_inotify_init=no" + ++ optional stdenv.hostPlatform.isSunOS "ac_cv_func_inotify_init=no" ++ optional withPrefix "--program-prefix=g" - ++ optionals (hostPlatform != buildPlatform && hostPlatform.libc == "glibc") [ + ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "glibc") [ # TODO(19b98110126fde7cbb1127af7e3fe1568eacad3d): Needed for fstatfs() I # don't know why it is not properly detected cross building with glibc. "fu_cv_sys_stat_statfs2_bsize=yes" @@ -52,37 +51,37 @@ stdenv.mkDerivation rec { buildInputs = [ gmp ] ++ optional aclSupport acl ++ optional attrSupport attr - ++ optionals hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch + ++ optionals stdenv.hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch ++ optionals selinuxSupport [ libselinux libsepol ] # TODO(@Ericson2314): Investigate whether Darwin could benefit too - ++ optional (hostPlatform != buildPlatform && hostPlatform.libc != "glibc") libiconv; + ++ optional (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc != "glibc") libiconv; # The tests are known broken on Cygwin # (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025), # Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351), # and {Open,Free}BSD. # With non-standard storeDir: https://github.com/NixOS/nix/issues/512 - doCheck = hostPlatform == buildPlatform - && hostPlatform.libc == "glibc" + doCheck = stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.hostPlatform.libc == "glibc" && builtins.storeDir == "/nix/store"; # Prevents attempts of running 'help2man' on cross-built binaries. - PERL = if hostPlatform == buildPlatform then null else "missing"; + PERL = if stdenv.hostPlatform == stdenv.buildPlatform then null else "missing"; # Saw random failures like ‘help2man: can't get '--help' info from # man/sha512sum.td/sha512sum’. enableParallelBuilding = false; NIX_LDFLAGS = optionalString selinuxSupport "-lsepol"; - FORCE_UNSAFE_CONFIGURE = optionalString hostPlatform.isSunOS "1"; + FORCE_UNSAFE_CONFIGURE = optionalString stdenv.hostPlatform.isSunOS "1"; # Works around a bug with 8.26: # Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually). Stop. - preInstall = optionalString (hostPlatform != buildPlatform) '' + preInstall = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${buildPackages.coreutils}/bin/install -c|' ''; - postInstall = optionalString (hostPlatform != buildPlatform) '' + postInstall = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' rm $out/share/man/man1/* cp ${buildPackages.coreutils}/share/man/man1/* $out/share/man/man1 ''; diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix index 66b7ef4c291..d6eca100411 100644 --- a/pkgs/tools/misc/findutils/default.nix +++ b/pkgs/tools/misc/findutils/default.nix @@ -1,6 +1,5 @@ { stdenv, fetchurl , coreutils -, buildPlatform, hostPlatform }: stdenv.mkDerivation rec { @@ -17,10 +16,10 @@ stdenv.mkDerivation rec { # Since glibc-2.25 the i686 tests hang reliably right after test-sleep. doCheck - = !hostPlatform.isDarwin - && !(hostPlatform.libc == "glibc" && hostPlatform.isi686) - && (hostPlatform.libc != "musl") - && hostPlatform == buildPlatform; + = !stdenv.hostPlatform.isDarwin + && !(stdenv.hostPlatform.libc == "glibc" && stdenv.hostPlatform.isi686) + && (stdenv.hostPlatform.libc != "musl") + && stdenv.hostPlatform == stdenv.buildPlatform; outputs = [ "out" "info" ]; diff --git a/pkgs/tools/misc/otfcc/default.nix b/pkgs/tools/misc/otfcc/default.nix index 052999033a1..acf46a58a6b 100644 --- a/pkgs/tools/misc/otfcc/default.nix +++ b/pkgs/tools/misc/otfcc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, premake5, ninja, hostPlatform }: +{ stdenv, fetchFromGitHub, premake5, ninja }: stdenv.mkDerivation rec { name = "otfcc-${version}"; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { premake5 ninja ''; - ninjaFlags = let x = if hostPlatform.isi686 then "x86" else "x64"; in + ninjaFlags = let x = if stdenv.hostPlatform.isi686 then "x86" else "x64"; in [ "-C" "build/ninja" "otfccdump_release_${x}" "otfccbuild_release_${x}" ]; installPhase = '' diff --git a/pkgs/tools/misc/ttyrec/default.nix b/pkgs/tools/misc/ttyrec/default.nix index c7cd71ffb6d..ca665171811 100644 --- a/pkgs/tools/misc/ttyrec/default.nix +++ b/pkgs/tools/misc/ttyrec/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, buildPlatform }: +{ stdenv, fetchurl }: stdenv.mkDerivation rec { name = "ttyrec-${version}"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { patches = [ ./clang-fixes.patch ]; - makeFlags = stdenv.lib.optional buildPlatform.isLinux "CFLAGS=-DSVR4" + makeFlags = stdenv.lib.optional stdenv.buildPlatform.isLinux "CFLAGS=-DSVR4" ++ stdenv.lib.optional stdenv.cc.isClang "CC=clang"; installPhase = '' diff --git a/pkgs/tools/package-management/cargo-edit/cargo-edit.nix b/pkgs/tools/package-management/cargo-edit/cargo-edit.nix index 67aa52f4789..7224c11f183 100644 --- a/pkgs/tools/package-management/cargo-edit/cargo-edit.nix +++ b/pkgs/tools/package-management/cargo-edit/cargo-edit.nix @@ -2,7 +2,7 @@ { pkgs }: with pkgs; -let kernel = buildPlatform.parsed.kernel.name; +let kernel = stdenv.buildPlatform.parsed.kernel.name; updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions); mapFeatures = features: map (fun: fun { features = features; }); mkFeatures = feat: lib.lists.foldl (features: featureName: diff --git a/pkgs/tools/package-management/cargo-update/cargo-update.nix b/pkgs/tools/package-management/cargo-update/cargo-update.nix index 83fdaad5bfd..1bd8aadf498 100644 --- a/pkgs/tools/package-management/cargo-update/cargo-update.nix +++ b/pkgs/tools/package-management/cargo-update/cargo-update.nix @@ -1,7 +1,7 @@ # Generated by carnix 0.6.6: carnix -o cargo-update.nix --src ./. Cargo.lock --standalone -{ lib, buildPlatform, buildRustCrate, fetchgit }: -let kernel = buildPlatform.parsed.kernel.name; - abi = buildPlatform.parsed.abi.name; +{ lib, stdenv, buildRustCrate, fetchgit }: +let kernel = stdenv.hostPlatform.parsed.kernel.name; + abi = stdenv.hostPlatform.parsed.abi.name; include = includedFiles: src: builtins.filterSource (path: type: lib.lists.any (f: let p = toString (src + ("/" + f)); in diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index c06a4f41afb..bc07dd457f3 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -2,7 +2,6 @@ , pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli, boost , autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns , busybox-sandbox-shell -, hostPlatform, buildPlatform , storeDir ? "/nix/store" , stateDir ? "/nix/var" , confDir ? "/etc" @@ -73,8 +72,8 @@ let "--with-sandbox-shell=${sh}/bin/busybox" ] ++ lib.optional ( - hostPlatform != buildPlatform && hostPlatform ? nix && hostPlatform.nix ? system - ) ''--with-system=${hostPlatform.nix.system}'' + stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform ? nix && stdenv.hostPlatform.nix ? system + ) ''--with-system=${stdenv.hostPlatform.nix.system}'' # RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50 ++ lib.optional (!libseccomp.meta.available) "--disable-seccomp-sandboxing"; diff --git a/pkgs/tools/text/gnupatch/default.nix b/pkgs/tools/text/gnupatch/default.nix index 0ad2a18236f..e22850a63f0 100644 --- a/pkgs/tools/text/gnupatch/default.nix +++ b/pkgs/tools/text/gnupatch/default.nix @@ -1,6 +1,5 @@ { stdenv, fetchurl , ed, autoreconfHook -, buildPlatform, hostPlatform }: stdenv.mkDerivation rec { @@ -27,11 +26,11 @@ stdenv.mkDerivation rec { buildInputs = stdenv.lib.optional doCheck ed; nativeBuildInputs = [ autoreconfHook ]; - configureFlags = stdenv.lib.optionals (hostPlatform != buildPlatform) [ + configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "ac_cv_func_strnlen_working=yes" ]; - doCheck = hostPlatform.libc != "musl"; # not cross; + doCheck = stdenv.hostPlatform.libc != "musl"; # not cross; meta = { description = "GNU Patch, a program to apply differences to files"; diff --git a/pkgs/tools/text/html-tidy/default.nix b/pkgs/tools/text/html-tidy/default.nix index ccd92700246..51ce4baa0be 100644 --- a/pkgs/tools/text/html-tidy/default.nix +++ b/pkgs/tools/text/html-tidy/default.nix @@ -1,6 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake, libxslt -, hostPlatform -}: +{ stdenv, fetchFromGitHub, cmake, libxslt }: stdenv.mkDerivation rec { name = "html-tidy-${version}"; @@ -16,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake libxslt/*manpage*/ ]; cmakeFlags = stdenv.lib.optional - (hostPlatform.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows"; + (stdenv.hostPlatform.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows"; # ATM bin/tidy is statically linked, as upstream provides no other option yet. # https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107 diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 634a3e4c17e..a84c2e154d9 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -151,7 +151,7 @@ mapAliases ({ libgnome_keyring = libgnome-keyring; # added 2018-02-25 libgnome_keyring3 = libgnome-keyring3; # added 2018-02-25 libgumbo = gumbo; # added 2018-01-21 - libintlOrEmpty = stdenv.lib.optional (!stdenv.isLinux || hostPlatform.libc != "glibc") gettext; # added 2018-03-14 + libintlOrEmpty = stdenv.lib.optional (!stdenv.isLinux || stdenv.hostPlatform.libc != "glibc") gettext; # added 2018-03-14 libjson_rpc_cpp = libjson-rpc-cpp; # added 2017-02-28 libmysql = mysql.connector-c; # added # 2017-12-28, this was a misnomer refering to libmysqlclient librecad2 = librecad; # backwards compatibility alias, added 2015-10 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d6bb0f3cc4e..c3b783d9d87 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18,7 +18,7 @@ with pkgs; # A stdenv capable of building 32-bit binaries. On x86_64-linux, # it uses GCC compiled with multilib support; on i686-linux, it's # just the plain stdenv. - stdenv_32bit = lowPrio (if hostPlatform.is32bit then stdenv else multiStdenv); + stdenv_32bit = lowPrio (if stdenv.hostPlatform.is32bit then stdenv else multiStdenv); stdenvNoCC = stdenv.override { cc = null; }; @@ -6421,7 +6421,7 @@ with pkgs; cc = gcc; # Remove libcxx/libcxxabi, and add clang for AS if on darwin (it uses # clang's internal assembler). - extraBuildInputs = lib.optional hostPlatform.isDarwin clang.cc; + extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc; }; gcc7Stdenv = overrideCC gccStdenv gcc7; @@ -6478,11 +6478,11 @@ with pkgs; # The GCC used to build libc for the target platform. Normal gccs will be # built with, and use, that cross-compiled libc. - gccCrossStageStatic = assert targetPlatform != buildPlatform; let + gccCrossStageStatic = assert stdenv.targetPlatform != stdenv.hostPlatform; let libcCross1 = - if targetPlatform.libc == "msvcrt" then targetPackages.windows.mingw_w64_headers - else if targetPlatform.libc == "libSystem" then darwin.xcode - else if targetPlatform.libc == "musl" then musl + if stdenv.targetPlatform.libc == "msvcrt" then targetPackages.windows.mingw_w64_headers + else if stdenv.targetPlatform.libc == "libSystem" then darwin.xcode + else if stdenv.targetPlatform.libc == "musl" then musl else null; binutils1 = wrapBintoolsWith { bintools = binutils-unwrapped; @@ -6513,7 +6513,7 @@ with pkgs; # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion profiledCompiler = with stdenv; (!isSunOS && !isDarwin && (isi686 || isx86_64)); - libcCross = if targetPlatform != buildPlatform then libcCross else null; + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; isl = if !stdenv.isDarwin then isl_0_14 else null; cloog = if !stdenv.isDarwin then cloog else null; @@ -6526,7 +6526,7 @@ with pkgs; # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); - libcCross = if targetPlatform != buildPlatform then libcCross else null; + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; isl = if !stdenv.isDarwin then isl_0_11 else null; @@ -6539,7 +6539,7 @@ with pkgs; # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); - libcCross = if targetPlatform != buildPlatform then libcCross else null; + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; isl = if !stdenv.isDarwin then isl_0_14 else null; })); @@ -6550,7 +6550,7 @@ with pkgs; # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); - libcCross = if targetPlatform != buildPlatform then libcCross else null; + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; isl = if !stdenv.isDarwin then isl_0_14 else null; })); @@ -6561,7 +6561,7 @@ with pkgs; # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); - libcCross = if targetPlatform != buildPlatform then libcCross else null; + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; isl = if !stdenv.isDarwin then isl_0_17 else null; })); @@ -6572,7 +6572,7 @@ with pkgs; # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); - libcCross = if targetPlatform != buildPlatform then libcCross else null; + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; isl = if !stdenv.isDarwin then isl_0_17 else null; })); @@ -6583,7 +6583,7 @@ with pkgs; # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); - libcCross = if targetPlatform != buildPlatform then libcCross else null; + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; isl = isl_0_17; })); @@ -7284,13 +7284,13 @@ with pkgs; # Others should instead delegate to the next stage's choice with # `targetPackages.stdenv.cc.bintools`. This one is different just to # provide the default choice, avoiding infinite recursion. - bintools ? if targetPlatform.isDarwin then darwin.binutils else binutils + bintools ? if stdenv.targetPlatform.isDarwin then darwin.binutils else binutils , libc ? bintools.libc , ... } @ extraArgs: callPackage ../build-support/cc-wrapper (let self = { - nativeTools = targetPlatform == hostPlatform && stdenv.cc.nativeTools or false; - nativeLibc = targetPlatform == hostPlatform && stdenv.cc.nativeLibc or false; + nativeTools = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeTools or false; + nativeLibc = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeLibc or false; nativePrefix = stdenv.cc.nativePrefix or ""; noLibc = !self.nativeLibc && (self.libc == null); @@ -7306,12 +7306,12 @@ with pkgs; wrapBintoolsWith = { bintools - , libc ? if targetPlatform != hostPlatform then libcCross else stdenv.cc.libc + , libc ? if stdenv.targetPlatform != stdenv.hostPlatform then libcCross else stdenv.cc.libc , ... } @ extraArgs: callPackage ../build-support/bintools-wrapper (let self = { - nativeTools = targetPlatform == hostPlatform && stdenv.cc.nativeTools or false; - nativeLibc = targetPlatform == hostPlatform && stdenv.cc.nativeLibc or false; + nativeTools = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeTools or false; + nativeLibc = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeLibc or false; nativePrefix = stdenv.cc.nativePrefix or ""; noLibc = (self.libc == null); @@ -7950,7 +7950,7 @@ with pkgs; binutils-unwrapped = callPackage ../development/tools/misc/binutils { # FHS sys dirs presumably only have stuff for the build platform - noSysDirs = (targetPlatform != buildPlatform) || noSysDirs; + noSysDirs = (stdenv.targetPlatform != stdenv.hostPlatform) || noSysDirs; }; binutils = wrapBintoolsWith { bintools = binutils-unwrapped; @@ -8936,8 +8936,8 @@ with pkgs; bicgl = callPackage ../development/libraries/science/biology/bicgl { }; # TODO(@Ericson2314): Build bionic libc from source - bionic = assert hostPlatform.useAndroidPrebuilt; - androidenv."androidndkPkgs_${hostPlatform.ndkVer}".libraries; + bionic = assert stdenv.hostPlatform.useAndroidPrebuilt; + androidenv."androidndkPkgs_${stdenv.hostPlatform.ndkVer}".libraries; bobcat = callPackage ../development/libraries/bobcat { }; @@ -9516,14 +9516,14 @@ with pkgs; else if name == "uclibc" then targetPackages.uclibcCross else if name == "musl" then targetPackages.muslCross or muslCross else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64 - else if targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries + else if stdenv.targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries else if name == "libSystem" then targetPackages.darwin.xcode else throw "Unknown libc"; - libcCross = assert targetPlatform != buildPlatform; libcCrossChooser targetPlatform.libc; + libcCross = assert stdenv.targetPlatform != stdenv.buildPlatform; libcCrossChooser stdenv.targetPlatform.libc; # Only supported on Linux, using glibc - glibcLocales = if hostPlatform.libc == "glibc" then callPackage ../development/libraries/glibc/locales.nix { } else null; + glibcLocales = if stdenv.hostPlatform.libc == "glibc" then callPackage ../development/libraries/glibc/locales.nix { } else null; glibcInfo = callPackage ../development/libraries/glibc/info.nix { }; @@ -9641,7 +9641,7 @@ with pkgs; gnu-config = callPackage ../development/libraries/gnu-config { }; - gnu-efi = if hostPlatform.isEfi + gnu-efi = if stdenv.hostPlatform.isEfi then callPackage ../development/libraries/gnu-efi { } else null; @@ -10587,11 +10587,11 @@ with pkgs; # We also provide `libiconvReal`, which will always be a standalone libiconv, # just in case you want it regardless of platform. libiconv = - if (hostPlatform.libc == "glibc" || hostPlatform.libc == "musl") - then glibcIconv (if hostPlatform != buildPlatform + if (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl") + then glibcIconv (if stdenv.hostPlatform != stdenv.buildPlatform then libcCross else stdenv.cc.libc) - else if hostPlatform.isDarwin + else if stdenv.hostPlatform.isDarwin then darwin.libiconv else libiconvReal; @@ -10608,7 +10608,7 @@ with pkgs; }; # On non-GNU systems we need GNU Gettext for libintl. - libintl = if hostPlatform.libc != "glibc" then gettext else null; + libintl = if stdenv.hostPlatform.libc != "glibc" then gettext else null; libid3tag = callPackage ../development/libraries/libid3tag { gperf = gperf_3_0; @@ -11251,7 +11251,7 @@ with pkgs; abiVersion = "6"; }; ncurses = - if hostPlatform.useiOSPrebuilt + if stdenv.hostPlatform.useiOSPrebuilt then null else callPackage ../development/libraries/ncurses { }; @@ -14213,7 +14213,6 @@ with pkgs; linuxPackages_custom = { version, src, configfile, allowImportFromDerivation ? true }: recurseIntoAttrs (linuxPackagesFor (pkgs.linuxManualConfig { inherit version src configfile stdenv allowImportFromDerivation; - inherit (stdenv) hostPlatform; })); # This serves as a test for linuxPackages_custom @@ -22301,7 +22300,7 @@ with pkgs; mount wall hostname more sysctl getconf getent locale killall xxd watch; - fts = if hostPlatform.isMusl then netbsd.fts else null; + fts = if stdenv.hostPlatform.isMusl then netbsd.fts else null; inherit (recurseIntoAttrs (callPackages ../os-specific/bsd { })) netbsd; diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index 047eab83bb4..b0c82508c11 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -19,7 +19,7 @@ in binutils = pkgs.wrapBintoolsWith { libc = - if pkgs.targetPlatform != pkgs.hostPlatform + if stdenv.targetPlatform != stdenv.hostPlatform then pkgs.libcCross else pkgs.stdenv.cc.libc; bintools = darwin.binutils-unwrapped; diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index bef3c2d0a21..0dd0e8edf17 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -1,6 +1,5 @@ { buildPackages, pkgs , newScope -, buildPlatform, targetPlatform }: let @@ -61,7 +60,6 @@ in rec { ghc822 = callPackage ../development/compilers/ghc/8.2.2.nix rec { bootPkgs = packages.ghc821Binary; inherit (bootPkgs) hscolour alex happy; - inherit buildPlatform targetPlatform; sphinx = pkgs.python3Packages.sphinx; buildLlvmPackages = buildPackages.llvmPackages_39; llvmPackages = pkgs.llvmPackages_39; diff --git a/pkgs/top-level/splice.nix b/pkgs/top-level/splice.nix index 27e8136cd39..41fdc22d147 100644 --- a/pkgs/top-level/splice.nix +++ b/pkgs/top-level/splice.nix @@ -27,9 +27,9 @@ let defaultBuildBuildScope = pkgs.buildPackages.buildPackages // pkgs.buildPackages.buildPackages.xorg; defaultBuildHostScope = pkgs.buildPackages // pkgs.buildPackages.xorg; defaultBuildTargetScope = - if pkgs.targetPlatform == pkgs.hostPlatform + if pkgs.stdenv.targetPlatform == pkgs.stdenv.hostPlatform then defaultBuildHostScope - else assert pkgs.hostPlatform == pkgs.buildPlatform; defaultHostTargetScope; + else assert pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform; defaultHostTargetScope; defaultHostHostScope = {}; # unimplemented defaultHostTargetScope = pkgs // pkgs.xorg; defaultTargetTargetScope = pkgs.targetPackages // pkgs.targetPackages.xorg or {}; @@ -114,8 +114,8 @@ let pkgsTargetTarget = defaultTargetTargetScope; } // { # These should never be spliced under any circumstances - inherit (pkgs) pkgs buildPackages targetPackages - buildPlatform targetPlatform hostPlatform; + inherit (pkgs) pkgs buildPackages targetPackages; + inherit (pkgs.stdenv) buildPlatform targetPlatform hostPlatform; }; in diff --git a/pkgs/top-level/unix-tools.nix b/pkgs/top-level/unix-tools.nix index 52c3de3166f..bc166382a60 100644 --- a/pkgs/top-level/unix-tools.nix +++ b/pkgs/top-level/unix-tools.nix @@ -1,4 +1,4 @@ -{ pkgs, buildEnv, runCommand, hostPlatform, lib, stdenv }: +{ pkgs, buildEnv, runCommand, lib, stdenv }: # These are some unix tools that are commonly included in the /usr/bin # and /usr/sbin directory under more normal distributions. Along with @@ -16,7 +16,7 @@ let version = "1003.1-2008"; singleBinary = cmd: providers: let - provider = providers.${hostPlatform.parsed.kernel.name}; + provider = providers.${stdenv.hostPlatform.parsed.kernel.name}; bin = "${getBin provider}/bin/${cmd}"; manpage = "${getOutput "man" provider}/share/man/man1/${cmd}.1.gz"; in runCommand "${cmd}-${version}" { @@ -59,12 +59,12 @@ let linux = pkgs.utillinux; }; getconf = { - linux = if hostPlatform.libc == "glibc" then pkgs.glibc + linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc else pkgs.netbsd.getconf; darwin = pkgs.darwin.system_cmds; }; getent = { - linux = if hostPlatform.libc == "glibc" then pkgs.glibc + linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc else pkgs.netbsd.getent; darwin = pkgs.netbsd.getent; }; From 83f876cb29c67a1d13b8a60a13c9152a7abcf029 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 30 Aug 2018 14:37:06 -0700 Subject: [PATCH 093/123] lightdm: 1.26.0 -> 1.28.0 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from lightdm --- pkgs/applications/display-managers/lightdm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/display-managers/lightdm/default.nix b/pkgs/applications/display-managers/lightdm/default.nix index 4bf81dcdd26..15926fde3db 100644 --- a/pkgs/applications/display-managers/lightdm/default.nix +++ b/pkgs/applications/display-managers/lightdm/default.nix @@ -9,7 +9,7 @@ with stdenv.lib; stdenv.mkDerivation rec { pname = "lightdm"; - version = "1.26.0"; + version = "1.28.0"; name = "${pname}-${version}"; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { owner = "CanonicalLtd"; repo = pname; rev = version; - sha256 = "1mhj6l025cnf2dzxnbzlk0qa9fm4gj2aw58qh5fl4ky87dp4wdyb"; + sha256 = "1mmqy1jdvgc0h0h9gli7n4vdv5p8m5019qjr5ni4h73iz6mjdj2b"; }; nativeBuildInputs = [ From 2e1f7f4b98d99f603d3d2fb3efd800a9aafe2af0 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 30 Aug 2018 18:11:08 -0400 Subject: [PATCH 094/123] lightdm: add description --- pkgs/applications/display-managers/lightdm/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/display-managers/lightdm/default.nix b/pkgs/applications/display-managers/lightdm/default.nix index 15926fde3db..6947a010a0e 100644 --- a/pkgs/applications/display-managers/lightdm/default.nix +++ b/pkgs/applications/display-managers/lightdm/default.nix @@ -73,6 +73,7 @@ stdenv.mkDerivation rec { meta = { homepage = https://github.com/CanonicalLtd/lightdm; + description = "A cross-desktop display manager."; platforms = platforms.linux; license = licenses.gpl3; maintainers = with maintainers; [ ocharles wkennington worldofpeace ]; From cc424308df11e7925109ae3f0299f0179302da49 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 30 Aug 2018 18:22:43 -0400 Subject: [PATCH 095/123] lightdm: split outputs --- pkgs/applications/display-managers/lightdm/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/display-managers/lightdm/default.nix b/pkgs/applications/display-managers/lightdm/default.nix index 6947a010a0e..bec07ac2d50 100644 --- a/pkgs/applications/display-managers/lightdm/default.nix +++ b/pkgs/applications/display-managers/lightdm/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { name = "${pname}-${version}"; + outputs = [ "out" "dev" ]; + src = fetchFromGitHub { owner = "CanonicalLtd"; repo = pname; From 58cbb0d0e61084c2161f77d6c73c18fc5ca74507 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 30 Aug 2018 18:28:14 -0700 Subject: [PATCH 096/123] git-cola: 3.1 -> 3.2 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from git-cola --- .../version-management/git-and-tools/git-cola/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/git-cola/default.nix b/pkgs/applications/version-management/git-and-tools/git-cola/default.nix index 63894cc3dcd..4b15d03d200 100644 --- a/pkgs/applications/version-management/git-and-tools/git-cola/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-cola/default.nix @@ -4,13 +4,13 @@ let inherit (pythonPackages) buildPythonApplication pyqt5 sip pyinotify; in buildPythonApplication rec { name = "git-cola-${version}"; - version = "3.1"; + version = "3.2"; src = fetchFromGitHub { owner = "git-cola"; repo = "git-cola"; rev = "v${version}"; - sha256 = "1xzm8694zndl2pb4nanzhldn7wrsc1gjd5ldjncidw1msp9fczq1"; + sha256 = "1ivaqhvdbmlp0lmrwb2pv3kjqlcpqbxbinbvjjn3g81r4avjs7yy"; }; buildInputs = [ git gettext ]; From 7bc2a0dd64eb3512488c8dd981186a5b0b5c3e92 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Fri, 31 Aug 2018 02:17:38 +0000 Subject: [PATCH 097/123] removed quotes when not needed as suggested by @aszlig --- nixos/modules/services/monitoring/incron.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/monitoring/incron.nix b/nixos/modules/services/monitoring/incron.nix index b366597fb2b..3857186f42d 100644 --- a/nixos/modules/services/monitoring/incron.nix +++ b/nixos/modules/services/monitoring/incron.nix @@ -79,13 +79,13 @@ in # incron won't read symlinks environment.etc."incron.d/system" = { mode = "0444"; - text = "${cfg.systab}"; + text = ${cfg.systab}; }; environment.etc."incron.allow" = mkIf (cfg.allow != null) { - text = "${concatStringsSep "\n" cfg.allow}"; + text = ${concatStringsSep "\n" cfg.allow}; }; environment.etc."incron.deny" = mkIf (cfg.deny != null) { - text = "${concatStringsSep "\n" cfg.deny}"; + text = ${concatStringsSep "\n" cfg.deny}; }; systemd.services.incron = { From d7d7533c18531237e458e7f29d9b072925e5bb72 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Fri, 31 Aug 2018 02:52:49 +0000 Subject: [PATCH 098/123] changes as per requested by @aszlig --- nixos/modules/services/monitoring/incron.nix | 27 +++++++++----------- pkgs/tools/system/incron/default.nix | 2 +- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/nixos/modules/services/monitoring/incron.nix b/nixos/modules/services/monitoring/incron.nix index 3857186f42d..cac93ad4712 100644 --- a/nixos/modules/services/monitoring/incron.nix +++ b/nixos/modules/services/monitoring/incron.nix @@ -20,7 +20,7 @@ in description = '' Whether to enable the incron daemon. - Note that commands run under incrontab only support common Nix profiles for the PATH provided variable. + Note that commands run under incrontab only support common Nix profiles for the PATH provided variable. ''; }; @@ -31,7 +31,7 @@ in Users allowed to use incrontab. If empty then no user will be allowed to have their own incrontab. - If null then will defer to . + If null then will defer to . If both and are null then all users will be allowed to have their own incrontab. ''; @@ -48,15 +48,15 @@ in default = ""; description = "The system incrontab contents."; example = '' - "/var/mail IN_CLOSE_WRITE abc $@/$#" - "/tmp IN_ALL_EVENTS efg $@/$# $&" + /var/mail IN_CLOSE_WRITE abc $@/$# + /tmp IN_ALL_EVENTS efg $@/$# $& ''; }; extraPackages = mkOption { type = types.listOf types.package; default = []; - example = "[ pkgs.rsync ];"; + example = literalExample "[ pkgs.rsync ]"; description = "Extra packages available to the system incrontab."; }; @@ -66,11 +66,8 @@ in config = mkIf cfg.enable { - assertions = [ - { assertion = cfg.allow != null -> cfg.deny == null; - message = "If `services.incron.allow` is set then `services.incron.deny` will be ignored."; - } - ]; + warnings = optional (cfg.allow != null && cfg.deny != null) + ''If `services.incron.allow` is set then `services.incron.deny` will be ignored.''; environment.systemPackages = [ pkgs.incron ]; @@ -79,22 +76,22 @@ in # incron won't read symlinks environment.etc."incron.d/system" = { mode = "0444"; - text = ${cfg.systab}; + text = cfg.systab; }; environment.etc."incron.allow" = mkIf (cfg.allow != null) { - text = ${concatStringsSep "\n" cfg.allow}; + text = concatStringsSep "\n" cfg.allow; }; environment.etc."incron.deny" = mkIf (cfg.deny != null) { - text = ${concatStringsSep "\n" cfg.deny}; + text = concatStringsSep "\n" cfg.deny; }; systemd.services.incron = { - description = "File system events scheduler"; + description = "File System Events Scheduler"; wantedBy = [ "multi-user.target" ]; path = cfg.extraPackages; - preStart = "mkdir -m 710 -p /var/spool/incron"; serviceConfig.Type = "forking"; serviceConfig.PIDFile = "/run/incrond.pid"; + serviceConfig.ExecStartPre = "${pkgs.coreutils}/bin/mkdir -m 710 -p /var/spool/incron"; serviceConfig.ExecStart = "${pkgs.incron}/bin/incrond"; }; }; diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix index 29e3b88acc8..2afbed2f9bb 100644 --- a/pkgs/tools/system/incron/default.nix +++ b/pkgs/tools/system/incron/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - description = "A daemon which monitors filesystem events and executes commands defined in system and user tables"; + description = "A cron-like daemon which handles filesystem events."; homepage = https://github.com/ar-/incron; license = licenses.gpl2; maintainers = [ maintainers.aanderse ]; From 9b12db6928543dd33a02e7964e82e2291c48a3f0 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Fri, 31 Aug 2018 03:03:04 +0000 Subject: [PATCH 099/123] changed from forking to simple as recommended by @aszlig --- nixos/modules/services/monitoring/incron.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/services/monitoring/incron.nix b/nixos/modules/services/monitoring/incron.nix index cac93ad4712..1789fd9f205 100644 --- a/nixos/modules/services/monitoring/incron.nix +++ b/nixos/modules/services/monitoring/incron.nix @@ -89,10 +89,9 @@ in description = "File System Events Scheduler"; wantedBy = [ "multi-user.target" ]; path = cfg.extraPackages; - serviceConfig.Type = "forking"; serviceConfig.PIDFile = "/run/incrond.pid"; serviceConfig.ExecStartPre = "${pkgs.coreutils}/bin/mkdir -m 710 -p /var/spool/incron"; - serviceConfig.ExecStart = "${pkgs.incron}/bin/incrond"; + serviceConfig.ExecStart = "${pkgs.incron}/bin/incrond --foreground"; }; }; From e4babb32d580d0f97218cd8aa606a7b2cdea4bb1 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 31 Aug 2018 02:41:29 +0000 Subject: [PATCH 100/123] treewide: write better docstrings for tor-browser things --- .../tor-browser-bundle-bin/default.nix | 6 ++++- .../browsers/tor-browser-bundle/default.nix | 24 ++++++++++++++++++- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 7 ------ 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix index de676670913..8d8c1bc979c 100644 --- a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix +++ b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix @@ -51,6 +51,9 @@ # Extra preferences , extraPrefs ? "" + +# For meta +, tor-browser-bundle }: with stdenv.lib; @@ -397,7 +400,8 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - description = "Tor Browser Bundle"; + description = "Tor Browser Bundle built by torproject.org"; + longDescription = tor-browser-bundle.meta.longDescription; homepage = https://www.torproject.org/; platforms = attrNames srcs; maintainers = with maintainers; [ offline matejc doublec thoughtpolice joachifm ]; diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix index 50b992253ce..6ce22e16415 100644 --- a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix +++ b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix @@ -339,7 +339,29 @@ stdenv.mkDerivation rec { passthru.execdir = "/bin"; meta = with stdenv.lib; { - description = "An unofficial version of the tor browser bundle, built from source"; + description = "An unofficial version of the Tor Browser Bundle, built from source"; + longDescription = '' + Tor Browser Bundle is a bundle of the Tor daemon, Tor Browser (heavily patched version of + Firefox), several essential extensions for Tor Browser, and some tools that glue those + together with a convenient UI. + + `tor-browser-bundle-bin` package is the official version built by torproject.org patched with + `patchelf` to work under nix and with bundled scripts adapted to the read-only nature of + the `/nix/store`. + + `tor-browser-bundle` package is the version built completely from source. It reuses the `tor` + package for the tor daemon, `firefoxPackages.tor-browser` package for the tor-browser, and + builds all the extensions from source. + + Note that `tor-browser-bundle` package is not only built from source, but also bundles Tor + Browser differently from the official `tor-browser-bundle-bin` implementation. The official + Tor Browser is not a normal UNIX program and is heavily patched for its use in the Tor Browser + Bundle (which `tor-browser-bundle-bin` package then has to work around for the read-only + /nix/store). Meanwhile, `firefoxPackages.tor-browser` reverts all those patches, allowing + `firefoxPackages.tor-browser` to be used independently of the bundle, and then implements what + `tor-browser-bundle` needs for the bundling using a much simpler patch. See the + longDescription and expression of the `firefoxPackages.tor-browser` package for more info. + ''; homepage = https://torproject.org/; license = licenses.free; platforms = [ "x86_64-linux" ]; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 634a3e4c17e..34260652649 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -278,6 +278,7 @@ mapAliases ({ tex-gyre-schola-math = tex-gyre-math.schola; # added 2018-04-03 tex-gyre-termes-math = tex-gyre-math.termes; # added 2018-04-03 tftp_hpa = tftp-hpa; # added 2015-04-03 + torbrowser = tor-browser-bundle-bin; # added 2017-04-05 trang = jing-trang; # added 2018-04-25 transmission_gtk = transmission-gtk; # added 2018-01-06 transmission_remote_gtk = transmission-remote-gtk; # added 2018-01-06 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 60147e724ee..e2d4ba27b33 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5562,13 +5562,6 @@ with pkgs; tor-arm = callPackage ../tools/security/tor/tor-arm.nix { }; - # added 2017-04-05 - torbrowser = /* builtins.trace '' - WARNING: torbrowser package was renamed to tor-browser-bundle-bin. - - Also, consider using nix-built tor-browser-unwrapped package instead. Read its longDescription. - '' */ tor-browser-bundle-bin; - tor-browser-bundle-bin = callPackage ../applications/networking/browsers/tor-browser-bundle-bin { }; tor-browser-bundle = callPackage ../applications/networking/browsers/tor-browser-bundle { From 582507627ff25298795f16897ecc7ff78fadf503 Mon Sep 17 00:00:00 2001 From: Sarah Brofeldt Date: Fri, 31 Aug 2018 02:09:52 +0200 Subject: [PATCH 101/123] pythonPackages.httpsig: init at 1.2.0 --- .../python-modules/httpsig/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/python-modules/httpsig/default.nix diff --git a/pkgs/development/python-modules/httpsig/default.nix b/pkgs/development/python-modules/httpsig/default.nix new file mode 100644 index 00000000000..cff72de3607 --- /dev/null +++ b/pkgs/development/python-modules/httpsig/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools_scm +, pycryptodome +, requests +}: + +buildPythonPackage rec { + pname = "httpsig"; + version = "1.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "19ng7y7blp13z081z5a6dxng1p8xlih7g6frmsg3q5ri8lvpybc7"; + }; + + buildInputs = [ setuptools_scm ]; + propagatedBuildInputs = [ pycryptodome requests ]; + + # Jailbreak pycryptodome + preBuild = '' + substituteInPlace setup.py --replace "==3.4.7" "" + ''; + + meta = with lib; { + description = "Sign HTTP requests with secure signatures"; + license = licenses.mit; + maintainers = with maintainers; [ srhb ]; + homepage = https://github.com/ahknight/httpsig; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 96c44cd2a1e..d2b45e979a3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -304,6 +304,8 @@ in { habanero = callPackage ../development/python-modules/habanero { }; + httpsig = callPackage ../development/python-modules/httpsig { }; + i3ipc = callPackage ../development/python-modules/i3ipc { }; intelhex = callPackage ../development/python-modules/intelhex { }; From 4b02c087f1a3eb5a68a131eca24da1541756e472 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 30 Aug 2018 22:22:45 -0700 Subject: [PATCH 102/123] bro: 2.5.4 -> 2.5.5 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from bro --- pkgs/applications/networking/ids/bro/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/ids/bro/default.nix b/pkgs/applications/networking/ids/bro/default.nix index 5e79517a551..f90457ba937 100644 --- a/pkgs/applications/networking/ids/bro/default.nix +++ b/pkgs/applications/networking/ids/bro/default.nix @@ -2,11 +2,11 @@ , geoip, gperftools, python, swig }: stdenv.mkDerivation rec { - name = "bro-2.5.4"; + name = "bro-2.5.5"; src = fetchurl { url = "https://www.bro.org/downloads/${name}.tar.gz"; - sha256 = "07sz1i4ly30257677b8vfrbsvxhz2awijyzn5ihg4m567x1ymnl0"; + sha256 = "1kvkiq8jjsqryry9jd4vw45pbfb46jly988mq62mv4sd1fqsxwhq"; }; nativeBuildInputs = [ cmake flex bison file ]; From 59bbf715890029437d00eed6fa15a31c784a4898 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 31 Aug 2018 07:40:19 +0200 Subject: [PATCH 103/123] =?UTF-8?q?pulseeffects:=204.3.1=20=E2=86=92=204.3?= =?UTF-8?q?.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/applications/audio/pulseeffects/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/pulseeffects/default.nix b/pkgs/applications/audio/pulseeffects/default.nix index 11eea900423..37729868e6f 100644 --- a/pkgs/applications/audio/pulseeffects/default.nix +++ b/pkgs/applications/audio/pulseeffects/default.nix @@ -43,13 +43,13 @@ let ]; in stdenv.mkDerivation rec { name = "pulseeffects-${version}"; - version = "4.3.1"; + version = "4.3.3"; src = fetchFromGitHub { owner = "wwmm"; repo = "pulseeffects"; rev = "v${version}"; - sha256 = "0qx5fc0kbxxwf9g0y6kf9myzl20s4cn725byzppjnqlbp4fpzqk9"; + sha256 = "1krfxvwqimfcsv7f2l722ivzz0qdf5h0pmb702mg65qb160zn065"; }; nativeBuildInputs = [ From e5124b0f7571b506d5d0a9a47579db55fae3de1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 30 Aug 2018 23:07:21 +0100 Subject: [PATCH 104/123] doc/python: convention for attributes names cc @FRidh, @dotlambda --- doc/languages-frameworks/python.section.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index d825823d01a..53bccc74725 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -1074,4 +1074,5 @@ Following rules are desired to be respected: * Make sure libraries build for all Python interpreters. * 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. * Commit names of Python libraries should reflect that they are Python libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`. - +* Attribute names in `python-packages.nix` should be normalized according to [PEP 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names). + 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) From 86bd0411965f86c026ae792b966024187e409b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 31 Aug 2018 08:02:55 +0100 Subject: [PATCH 105/123] docs/python: fix attribute naming example https://github.com/NixOS/nixpkgs/pull/45822#issuecomment-417566642 --- doc/languages-frameworks/python.section.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index 53bccc74725..5eabb866654 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -1075,4 +1075,4 @@ Following rules are desired to be respected: * 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. * Commit names of Python libraries should reflect that they are Python libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`. * Attribute names in `python-packages.nix` should be normalized according to [PEP 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names). - 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) + 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 ) From 9a93fa292fcddd7f371b84c73480c5bf845353d0 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 31 Aug 2018 00:27:08 -0700 Subject: [PATCH 106/123] notify-osd-customizable: init at 0.9.35+16.04.20160415 (#43226) --- .../misc/notify-osd-customizable/default.nix | 47 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/applications/misc/notify-osd-customizable/default.nix diff --git a/pkgs/applications/misc/notify-osd-customizable/default.nix b/pkgs/applications/misc/notify-osd-customizable/default.nix new file mode 100644 index 00000000000..828c39d5ed8 --- /dev/null +++ b/pkgs/applications/misc/notify-osd-customizable/default.nix @@ -0,0 +1,47 @@ +{ stdenv +, dbus-glib +, fetchurl +, glib +, gnome3 +, libnotify +, libtool +, libwnck3 +, makeWrapper +, pkgconfig +}: + +let baseURI = "https://launchpad.net/~leolik/+archive/leolik"; +in stdenv.mkDerivation rec { + name = "notify-osd-${version}"; + version = "0.9.35+16.04.20160415"; + + src = fetchurl { + url = "${baseURI}/+files/notify-osd_${version}-0ubuntu1-leolik~ppa0.tar.gz"; + sha256 = "026dr46jh3xc4103wnslzy7pxbxkkpflh52c59j8vzwaa7bvvzkv"; + name = "notify-osd-customizable.tar.gz"; + }; + + preConfigure = "./autogen.sh --libexecdir=$(out)/bin"; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + glib libwnck3 libnotify dbus-glib makeWrapper + gnome3.gsettings-desktop-schemas gnome3.gnome-common + libtool + ]; + + configureFlags = "--libexecdir=$(out)/bin"; + + preFixup = '' + wrapProgram "$out/bin/notify-osd" \ + --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" + ''; + + meta = with stdenv.lib; { + description = "Daemon that displays passive pop-up notifications"; + homepage = https://launchpad.net/notify-osd; + license = licenses.gpl3; + maintainers = [ maintainers.imalison ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d1b57fa3964..78f58e0889c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4294,6 +4294,8 @@ with pkgs; notify-osd = callPackage ../applications/misc/notify-osd { }; + notify-osd-customizable = callPackage ../applications/misc/notify-osd-customizable { }; + nox = callPackage ../tools/package-management/nox { }; nq = callPackage ../tools/system/nq { }; From 897206755e5c466c1f23f8d363c734bb6654638f Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 31 Aug 2018 00:41:36 -0700 Subject: [PATCH 107/123] mdds: 1.3.1 -> 1.4.1 (#45814) Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from mdds --- pkgs/development/libraries/mdds/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mdds/default.nix b/pkgs/development/libraries/mdds/default.nix index 43fee9ccead..d2b8ff19dba 100644 --- a/pkgs/development/libraries/mdds/default.nix +++ b/pkgs/development/libraries/mdds/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, boost }: stdenv.mkDerivation rec { - version = "1.3.1"; + version = "1.4.1"; name = "mdds-${version}"; src = fetchurl { url = "https://kohei.us/files/mdds/src/mdds-${version}.tar.bz2"; - sha256 = "18g511z1lgfxrga2ld9yr95phmyfbd3ymbv4q5g5lyjn4ljcvf6w"; + sha256 = "1hs4lhmmr44ynljn7bjsyvnjbbfrz7dda18lan4dq1jzgz1r1ils"; }; postInstall = '' From d72125d5684f4308e40fde6a4536676db3d76622 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 31 Aug 2018 00:42:58 -0700 Subject: [PATCH 108/123] minizinc: 2.1.7 -> 2.2.0 (#45816) Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from minizinc --- pkgs/development/tools/minizinc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/minizinc/default.nix b/pkgs/development/tools/minizinc/default.nix index d569b8d3068..8c210cb9360 100644 --- a/pkgs/development/tools/minizinc/default.nix +++ b/pkgs/development/tools/minizinc/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, cmake, flex, bison }: let - version = "2.1.7"; + version = "2.2.0"; in stdenv.mkDerivation { name = "minizinc-${version}"; @@ -11,7 +11,7 @@ stdenv.mkDerivation { rev = "${version}"; owner = "MiniZinc"; repo = "libminizinc"; - sha256 = "05rifsgzfaalv5ymv59sjcvhr6i1byzbmq5p36hj3hpi5f929kip"; + sha256 = "05is1r5y06jfqwvka90dn2ffxnvbgyswaxl00aqz6455hnggnxvm"; }; # meta is all the information about the package.. From 5c0423eff41f064fd31656e1604dddd4b3d8362a Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 31 Aug 2018 00:45:14 -0700 Subject: [PATCH 109/123] at: 3.1.20 -> 3.1.23 (#45847) Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from at --- pkgs/tools/system/at/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/at/default.nix b/pkgs/tools/system/at/default.nix index baac00bfa76..1e3bf0c0050 100644 --- a/pkgs/tools/system/at/default.nix +++ b/pkgs/tools/system/at/default.nix @@ -5,12 +5,12 @@ stdenv.mkDerivation rec { name = "at-${version}"; - version = "3.1.20"; + version = "3.1.23"; src = fetchurl { # Debian is apparently the last location where it can be found. url = "mirror://debian/pool/main/a/at/at_${version}.orig.tar.gz"; - sha256 = "1fgsrqpx0r6qcjxmlsqnwilydhfxn976c870mjc0n1bkmcy94w88"; + sha256 = "040pr2ivfbrhvrhzis97cpwfkzpr7nin33nc301aga5aajlhlicp"; }; patches = [ From 9b375a34e5865bea30f1b8189ccf5e6ccecb88de Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Fri, 31 Aug 2018 08:39:44 +0000 Subject: [PATCH 110/123] folium: 0.5.0 -> 0.6.0 --- pkgs/development/python-modules/folium/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/folium/default.nix b/pkgs/development/python-modules/folium/default.nix index eeb787ea3c0..9cef17dc772 100644 --- a/pkgs/development/python-modules/folium/default.nix +++ b/pkgs/development/python-modules/folium/default.nix @@ -14,15 +14,15 @@ buildPythonPackage rec { pname = "folium"; - version = "0.5.0"; + version = "0.6.0"; src = fetchPypi { inherit pname version; - sha256 = "748944521146d85c6cd6230acf234e885864cd0f42fea3758d655488517e5e6e"; + sha256 = "0yfb8ygq67m149n72bb8h7dk9mx8d3ivc5ygqwdj4q8qggj1ns08"; }; checkInputs = [ pytest numpy nbconvert pandas mock ]; - propagatedBuildInputs = [ jinja2 branca six requests ]; + propagatedBuildInputs = [ jinja2 branca six requests numpy ]; # No tests in archive doCheck = false; From 195d81c45f014602fc7705e3d380b074eb9c46c6 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Fri, 31 Aug 2018 10:57:33 +0200 Subject: [PATCH 111/123] julia: add 0.7 and 1.0 --- pkgs/top-level/all-packages.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 78f58e0889c..bbbfcfdf9a6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6908,6 +6908,18 @@ with pkgs; llvm = llvm_39; }; + julia_07 = callPackage ../development/compilers/julia/0.7.nix { + gmp = gmp6; + openblas = openblasCompat; + inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; + }; + + julia_10 = callPackage ../development/compilers/julia/1.0.nix { + gmp = gmp6; + openblas = openblasCompat; + inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; + }; + jwasm = callPackage ../development/compilers/jwasm { }; kotlin = callPackage ../development/compilers/kotlin { }; From c745ed1f7c5398848c0361e75be3c2d82aaab95b Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Fri, 31 Aug 2018 10:57:54 +0200 Subject: [PATCH 112/123] julia: add 0.7 and 1.0 --- pkgs/development/compilers/julia/0.7.nix | 6 + pkgs/development/compilers/julia/1.0.nix | 6 + pkgs/development/compilers/julia/shared.nix | 218 ++++++++++++++++++++ 3 files changed, 230 insertions(+) create mode 100644 pkgs/development/compilers/julia/0.7.nix create mode 100644 pkgs/development/compilers/julia/1.0.nix create mode 100644 pkgs/development/compilers/julia/shared.nix diff --git a/pkgs/development/compilers/julia/0.7.nix b/pkgs/development/compilers/julia/0.7.nix new file mode 100644 index 00000000000..99c6b245ba6 --- /dev/null +++ b/pkgs/development/compilers/julia/0.7.nix @@ -0,0 +1,6 @@ +import ./shared.nix { + majorVersion = "0"; + minorVersion = "7"; + maintenanceVersion = "0"; + src_sha256 = "1j57569qm2ii8ddzsp08hds2navpk7acdz83kh27dvk44axhwj6f"; +} diff --git a/pkgs/development/compilers/julia/1.0.nix b/pkgs/development/compilers/julia/1.0.nix new file mode 100644 index 00000000000..2301d0c1f43 --- /dev/null +++ b/pkgs/development/compilers/julia/1.0.nix @@ -0,0 +1,6 @@ +import ./shared.nix { + majorVersion = "1"; + minorVersion = "0"; + maintenanceVersion = "0"; + src_sha256 = "083277z90m1jxr2d1ysb96rgjj9h5q97l6h54mx3pb3f38ykshz2"; +} diff --git a/pkgs/development/compilers/julia/shared.nix b/pkgs/development/compilers/julia/shared.nix new file mode 100644 index 00000000000..41c9c57bd03 --- /dev/null +++ b/pkgs/development/compilers/julia/shared.nix @@ -0,0 +1,218 @@ +{ majorVersion +, minorVersion +, maintenanceVersion +, src_sha256 +}: +{ stdenv, fetchurl, fetchzip +# build tools +, gfortran, m4, makeWrapper, patchelf, perl, which, python2, paxctl +, llvm, cmake +# libjulia dependencies +, libunwind, readline, utf8proc, zlib +# standard library dependencies +, curl, fftwSinglePrec, fftw, gmp, libgit2, mpfr, openlibm, openspecfun, pcre2 +# linear algebra +, openblas, arpack +# Darwin frameworks +, CoreServices, ApplicationServices +}: + +with stdenv.lib; + +# All dependencies must use the same OpenBLAS. +let + arpack_ = arpack; +in +let + arpack = arpack_.override { inherit openblas; }; +in + +let + dsfmtVersion = "2.2.3"; + dsfmt = fetchurl { + url = "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-${dsfmtVersion}.tar.gz"; + sha256 = "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42"; + }; + + libuvVersion = "ed3700c849289ed01fe04273a7bf865340b2bd7e"; + libuv = fetchurl { + url = "https://api.github.com/repos/JuliaLang/libuv/tarball/${libuvVersion}"; + sha256 = "137w666zsjw1p0ma3lf94d75hr1q45sgkfmbizkyji2qm57cnxjs"; + }; + + rmathVersion = "0.1"; + rmath-julia = fetchurl { + url = "https://api.github.com/repos/JuliaLang/Rmath-julia/tarball/v${rmathVersion}"; + sha256 = "1qyps217175qhid46l8f5i1v8i82slgp23ia63x2hzxwfmx8617p"; + }; + + virtualenvVersion = "15.0.0"; + virtualenv = fetchurl { + url = "mirror://pypi/v/virtualenv/virtualenv-${virtualenvVersion}.tar.gz"; + sha256 = "06fw4liazpx5vf3am45q2pdiwrv0id7ckv7n6zmpml29x6vkzmkh"; + }; + + libwhichVersion = "81e9723c0273d78493dc8c8ed570f68d9ce7e89e"; + libwhich = fetchurl { + url = "https://api.github.com/repos/vtjnash/libwhich/tarball/${libwhichVersion}"; + sha256 = "1p7zg31kpmpbmh1znrk1xrbd074agx13b9q4dcw8n2zrwwdlbz3b"; + }; + + llvmVersion = "6.0.0"; + llvm = fetchurl { + url = "http://releases.llvm.org/6.0.0/llvm-${llvmVersion}.src.tar.xz"; + sha256 = "0224xvfg6h40y5lrbnb9qaq3grmdc5rg00xq03s1wxjfbf8krx8z"; + }; + + suitesparseVersion = "4.4.5"; + suitesparse = fetchurl { + url = "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${suitesparseVersion}.tar.gz"; + sha256 = "1jcbxb8jx5wlcixzf6n5dca2rcfx6mlcms1k2rl5gp67ay3bix43"; + }; + version = "${majorVersion}.${minorVersion}.${maintenanceVersion}"; +in + +stdenv.mkDerivation rec { + pname = "julia"; + inherit version; + name = "${pname}-${version}"; + + src = fetchzip { + url = "https://github.com/JuliaLang/${pname}/releases/download/v${version}/${name}.tar.gz"; + sha256 = src_sha256; + }; + prePatch = '' + export PATH=$PATH:${cmake}/bin + mkdir deps/srccache + cp "${dsfmt}" "./deps/srccache/dsfmt-${dsfmtVersion}.tar.gz" + cp "${rmath-julia}" "./deps/srccache/Rmath-julia-${rmathVersion}.tar.gz" + cp "${libuv}" "./deps/srccache/libuv-${libuvVersion}.tar.gz" + cp "${virtualenv}" "./deps/srccache/virtualenv-${virtualenvVersion}.tar.gz" + cp "${libwhich}" "./deps/srccache/libwhich-${libwhichVersion}.tar.gz" + cp "${llvm}" "./deps/srccache/llvm-${llvmVersion}.src.tar.xz" + cp "${suitesparse}" "./deps/srccache/SuiteSparse-${suitesparseVersion}.tar.gz" + ''; + + patches = [ + ./0001.1-use-system-utf8proc.patch + ] ++ stdenv.lib.optional stdenv.needsPax ./0004-hardened.patch; + + postPatch = '' + patchShebangs . contrib + for i in backtrace cmdlineargs; do + mv test/$i.jl{,.off} + touch test/$i.jl + done + rm stdlib/Sockets/test/runtests.jl && touch stdlib/Sockets/test/runtests.jl + sed -e 's/Invalid Content-Type:/invalid Content-Type:/g' -i ./stdlib/LibGit2/test/libgit2.jl + sed -e 's/Failed to resolve /failed to resolve /g' -i ./stdlib/LibGit2/test/libgit2.jl + ''; + + buildInputs = [ + arpack fftw fftwSinglePrec gmp libgit2 libunwind mpfr + pcre2.dev openblas openlibm openspecfun readline utf8proc + zlib + ] + ++ stdenv.lib.optionals stdenv.isDarwin [CoreServices ApplicationServices] + ; + + nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ] + ++ stdenv.lib.optional stdenv.needsPax paxctl; + + makeFlags = + let + arch = head (splitString "-" stdenv.system); + march = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}" + or (throw "unsupported architecture: ${arch}"); + # Julia requires Pentium 4 (SSE2) or better + cpuTarget = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}" + or (throw "unsupported architecture: ${arch}"); + in [ + "ARCH=${arch}" + "MARCH=${march}" + "JULIA_CPU_TARGET=${cpuTarget}" + "PREFIX=$(out)" + "prefix=$(out)" + "SHELL=${stdenv.shell}" + + "USE_SYSTEM_BLAS=1" + "USE_BLAS64=${if openblas.blas64 then "1" else "0"}" + "LIBBLAS=-lopenblas" + "LIBBLASNAME=libopenblas" + + "USE_SYSTEM_LAPACK=1" + "LIBLAPACK=-lopenblas" + "LIBLAPACKNAME=libopenblas" + + "USE_SYSTEM_ARPACK=1" + "USE_SYSTEM_FFTW=1" + "USE_SYSTEM_GMP=1" + "USE_SYSTEM_LIBGIT2=1" + "USE_SYSTEM_LIBUNWIND=1" + + #"USE_SYSTEM_LLVM=1" + "LLVM_VER=6.0.0" + + "USE_SYSTEM_MPFR=1" + "USE_SYSTEM_OPENLIBM=1" + "USE_SYSTEM_OPENSPECFUN=1" + "USE_SYSTEM_PATCHELF=1" + "USE_SYSTEM_PCRE=1" + "PCRE_CONFIG=${pcre2.dev}/bin/pcre2-config" + "PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h" + "USE_SYSTEM_READLINE=1" + "USE_SYSTEM_UTF8PROC=1" + "USE_SYSTEM_ZLIB=1" + ]; + + NIX_CFLAGS_COMPILE = [ "-fPIC" ]; + + LD_LIBRARY_PATH = makeLibraryPath [ + arpack fftw fftwSinglePrec gmp libgit2 mpfr openblas openlibm + openspecfun pcre2 + ]; + + dontStrip = true; + dontPatchELF = true; + + enableParallelBuilding = true; + + doCheck = !stdenv.isDarwin; + checkTarget = "testall"; + # Julia's tests require read/write access to $HOME + preCheck = '' + export HOME="$NIX_BUILD_TOP" + ''; + + preBuild = '' + sed -e '/^install:/s@[^ ]*/doc/[^ ]*@@' -i Makefile + sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} + ''; + + postInstall = '' + # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia, + # as using a wrapper with LD_LIBRARY_PATH causes segmentation + # faults when program returns an error: + # $ julia -e 'throw(Error())' + find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do + if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then + ln -sv $lib $out/lib/julia/$(basename $lib) + fi + done + ''; + + passthru = { + inherit majorVersion minorVersion maintenanceVersion; + site = "share/julia/site/v${majorVersion}.${minorVersion}"; + }; + + meta = { + description = "High-level performance-oriented dynamical language for technical computing"; + homepage = https://julialang.org/; + license = stdenv.lib.licenses.mit; + maintainers = with stdenv.lib.maintainers; [ raskin rob ]; + platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; + broken = stdenv.isi686; + }; +} From 297a82f3ebd75ab2278b15a81abb1941fc4a1cc5 Mon Sep 17 00:00:00 2001 From: Matt McHenry Date: Fri, 31 Aug 2018 06:32:20 -0400 Subject: [PATCH 113/123] perl: Text-Unaccent: fixup build (#45768) workaround as mentioned at https://rt.cpan.org/Public/Bug/Display.html?id=124815 --- pkgs/top-level/perl-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 2d35a573b72..3623e751123 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -16588,9 +16588,11 @@ let url = mirror://cpan/authors/id/L/LD/LDACHARY/Text-Unaccent-1.08.tar.gz; sha256 = "0avk50kia78kxryh2whmaj5l18q2wvmkdyqyjsf6kwr4kgy6x3i7"; }; + # https://rt.cpan.org/Public/Bug/Display.html?id=124815 + NIX_CFLAGS_COMPILE = [ "-DHAS_VPRINTF" ]; meta = { maintainers = with maintainers; [ ]; - platforms = stdenv.lib.platforms.unix; + platforms = stdenv.lib.platforms.linux; }; }; From 17564e0ed9e5948c6c34cecf63bc45fd08c7135a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=81=E3=83=AB=E3=83=8E?= Date: Fri, 31 Aug 2018 05:40:23 -0500 Subject: [PATCH 114/123] nixos/zeronet: init (#44842) --- nixos/modules/misc/ids.nix | 2 + nixos/modules/module-list.nix | 1 + nixos/modules/services/networking/zeronet.nix | 102 ++++++++++++++++++ .../networking/p2p/zeronet/default.nix | 12 +-- 4 files changed, 108 insertions(+), 9 deletions(-) create mode 100644 nixos/modules/services/networking/zeronet.nix diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 0928e368d80..8292cdc995e 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -328,6 +328,7 @@ qemu-libvirtd = 301; # kvm = 302; # unused # render = 303; # unused + zeronet = 304; # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! @@ -616,6 +617,7 @@ qemu-libvirtd = 301; kvm = 302; # default udev rules from systemd requires these render = 303; # default udev rules from systemd requires these + zeronet = 304; # When adding a gid, make sure it doesn't match an existing # uid. Users and groups with the same name should have equal diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 93e6050e1dd..4795922abcf 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -620,6 +620,7 @@ ./services/networking/xl2tpd.nix ./services/networking/xrdp.nix ./services/networking/zerobin.nix + ./services/networking/zeronet.nix ./services/networking/zerotierone.nix ./services/networking/znc.nix ./services/printing/cupsd.nix diff --git a/nixos/modules/services/networking/zeronet.nix b/nixos/modules/services/networking/zeronet.nix new file mode 100644 index 00000000000..2377cb2c8f1 --- /dev/null +++ b/nixos/modules/services/networking/zeronet.nix @@ -0,0 +1,102 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.zeronet; + + zConfFile = pkgs.writeTextFile { + name = "zeronet.conf"; + + text = '' + [global] + data_dir = ${cfg.dataDir} + log_dir = ${cfg.logDir} + '' + lib.optionalString (cfg.port != null) '' + ui_port = ${toString cfg.port} + '' + cfg.extraConfig; + }; +in with lib; { + options.services.zeronet = { + enable = mkEnableOption "zeronet"; + + dataDir = mkOption { + type = types.path; + default = "/var/lib/zeronet"; + example = "/home/okina/zeronet"; + description = "Path to the zeronet data directory."; + }; + + logDir = mkOption { + type = types.path; + default = "/var/log/zeronet"; + example = "/home/okina/zeronet/log"; + description = "Path to the zeronet log directory."; + }; + + port = mkOption { + type = types.nullOr types.int; + default = null; + example = 15441; + description = "Optional zeronet port."; + }; + + tor = mkOption { + type = types.bool; + default = false; + description = "Use TOR for all zeronet traffic."; + }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + + description = '' + Extra configuration. Contents will be added verbatim to the + configuration file at the end. + ''; + }; + }; + + config = mkIf cfg.enable { + services.tor = mkIf cfg.tor { + enable = true; + controlPort = 9051; + extraConfig = "CookieAuthentication 1"; + }; + + systemd.services.zeronet = { + description = "zeronet"; + after = [ "network.target" (optionalString cfg.tor "tor.service") ]; + wantedBy = [ "multi-user.target" ]; + + preStart = '' + # Ensure folder exists or create it and permissions are correct + mkdir -p ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir} + chmod 750 ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir} + chown zeronet:zeronet ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir} + ''; + + serviceConfig = { + PermissionsStartOnly = true; + PrivateTmp = "yes"; + User = "zeronet"; + Group = "zeronet"; + ExecStart = "${pkgs.zeronet}/bin/zeronet --config_file ${zConfFile}"; + }; + }; + + users = { + groups.zeronet.gid = config.ids.gids.zeronet; + + users.zeronet = { + description = "zeronet service user"; + home = cfg.dataDir; + createHome = true; + group = "zeronet"; + extraGroups = mkIf cfg.tor [ "tor" ]; + uid = config.ids.uids.zeronet; + }; + }; + }; + + meta.maintainers = with maintainers; [ chiiruno ]; +} diff --git a/pkgs/applications/networking/p2p/zeronet/default.nix b/pkgs/applications/networking/p2p/zeronet/default.nix index 8a8d1b33ca7..33acd103d8b 100644 --- a/pkgs/applications/networking/p2p/zeronet/default.nix +++ b/pkgs/applications/networking/p2p/zeronet/default.nix @@ -3,6 +3,7 @@ python2Packages.buildPythonApplication rec { pname = "zeronet"; version = "0.6.2"; + format = "other"; src = fetchFromGitHub { owner = "HelloZeroNet"; @@ -12,9 +13,6 @@ python2Packages.buildPythonApplication rec { }; propagatedBuildInputs = with python2Packages; [ msgpack gevent ]; - - format = "other"; - buildPhase = "${python2Packages.python.interpreter} -O -m compileall ."; installPhase = '' @@ -22,14 +20,10 @@ python2Packages.buildPythonApplication rec { cp -r plugins src tools *.py $out/share/ ''; - # Wrap the main executable and set the log and data dir to something out of - # the store postFixup = '' makeWrapper "$out/share/zeronet.py" "$out/bin/zeronet" \ - --set PYTHONPATH "$PYTHONPATH" \ - --set PATH ${python2Packages.python}/bin \ - --add-flags "--log_dir \$HOME/.local/share/zeronet/logs" \ - --add-flags "--data_dir \$HOME/.local/share/zeronet" + --set PYTHONPATH "$PYTHONPATH" \ + --set PATH ${python2Packages.python}/bin ''; meta = with stdenv.lib; { From 37c0f1cafa6d6097f0aa7caf9f0c6b94abb18cb1 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Fri, 31 Aug 2018 14:49:42 +0300 Subject: [PATCH 115/123] matrix-synapse: 0.33.0 -> 0.33.3 --- pkgs/servers/matrix-synapse/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix index d0c496d3857..74cd233710c 100644 --- a/pkgs/servers/matrix-synapse/default.nix +++ b/pkgs/servers/matrix-synapse/default.nix @@ -26,13 +26,13 @@ let }; in python2Packages.buildPythonApplication rec { name = "matrix-synapse-${version}"; - version = "0.33.0"; + version = "0.33.3"; src = fetchFromGitHub { owner = "matrix-org"; repo = "synapse"; rev = "v${version}"; - sha256 = "1immk6k0wgiks1s39dhyjg79n6rgans9zy85r5wmkp4dlc3r5rx6"; + sha256 = "0yxxrs8yrrkp3pffdfab8apdmyhdcl90wgmglryy4q8vsksxn7d4"; }; patches = [ From 865301fb8226944a899aa817ff355d0a8d065182 Mon Sep 17 00:00:00 2001 From: Uli Baum Date: Fri, 31 Aug 2018 14:05:17 +0200 Subject: [PATCH 116/123] Revert "mdds: 1.3.1 -> 1.4.1 (#45814)" This update appears to break libreoffice. This reverts commit 897206755e5c466c1f23f8d363c734bb6654638f. --- pkgs/development/libraries/mdds/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mdds/default.nix b/pkgs/development/libraries/mdds/default.nix index d2b8ff19dba..43fee9ccead 100644 --- a/pkgs/development/libraries/mdds/default.nix +++ b/pkgs/development/libraries/mdds/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, boost }: stdenv.mkDerivation rec { - version = "1.4.1"; + version = "1.3.1"; name = "mdds-${version}"; src = fetchurl { url = "https://kohei.us/files/mdds/src/mdds-${version}.tar.bz2"; - sha256 = "1hs4lhmmr44ynljn7bjsyvnjbbfrz7dda18lan4dq1jzgz1r1ils"; + sha256 = "18g511z1lgfxrga2ld9yr95phmyfbd3ymbv4q5g5lyjn4ljcvf6w"; }; postInstall = '' From 647b5b1a29134c1d51c0a81a1ec1616bb5975d74 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Wed, 29 Aug 2018 08:44:05 +0200 Subject: [PATCH 117/123] nginxMainline: 1.15.2 -> 1.15.3 --- pkgs/servers/http/nginx/mainline.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/nginx/mainline.nix b/pkgs/servers/http/nginx/mainline.nix index ecde2430f52..49f212a8fe5 100644 --- a/pkgs/servers/http/nginx/mainline.nix +++ b/pkgs/servers/http/nginx/mainline.nix @@ -1,6 +1,6 @@ { callPackage, ... }@args: callPackage ./generic.nix (args // { - version = "1.15.2"; - sha256 = "145dcypq8dqc5as03iy1ycwifwynq9p4i8m56fn7g0myryp0kfpf"; + version = "1.15.3"; + sha256 = "11dysslkz76cdzhshc6w5qivdplk10pjpb73li0d1sz2qf8zp4ck"; }) From 678695fde54232610dc1b8c76f84e02aef955856 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 30 Aug 2018 23:12:40 +0200 Subject: [PATCH 118/123] youtubeDL: 2018.08.04 -> 2018.08.28 --- pkgs/tools/misc/youtube-dl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix index ebdd08b23a8..7ed8f3bfd71 100644 --- a/pkgs/tools/misc/youtube-dl/default.nix +++ b/pkgs/tools/misc/youtube-dl/default.nix @@ -15,11 +15,11 @@ buildPythonPackage rec { pname = "youtube-dl"; - version = "2018.08.04"; + version = "2018.08.28"; src = fetchurl { url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz"; - sha256 = "1hcx99qbbyigc8k98c8bcc6a2wnhq6493fmrkl7rysc8krlxr0pm"; + sha256 = "1swdp4czvm0752psbi8a4qw5i9x18s7nhivh7iw92274pmqxq9wi"; }; nativeBuildInputs = [ makeWrapper ]; From 4774d6a58d3dd23be9677260b86e5633565d74d6 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Fri, 31 Aug 2018 15:16:59 +0200 Subject: [PATCH 119/123] gbenchmark: add darwin to platforms --- pkgs/development/libraries/gbenchmark/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gbenchmark/default.nix b/pkgs/development/libraries/gbenchmark/default.nix index d700c3d3c16..5ce08cbe636 100644 --- a/pkgs/development/libraries/gbenchmark/default.nix +++ b/pkgs/development/libraries/gbenchmark/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { description = "A microbenchmark support library"; homepage = https://github.com/google/benchmark; license = licenses.asl20; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ abbradar ]; }; } From 2b5659dc04c4d163aca087bb0653337845bbdf34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 31 Aug 2018 15:44:47 +0200 Subject: [PATCH 120/123] python.pkgs.ecpy: 0.9.0 -> 0.9.1 --- .../development/python-modules/ecpy/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/ecpy/default.nix b/pkgs/development/python-modules/ecpy/default.nix index 97f04828300..df843ed7c32 100644 --- a/pkgs/development/python-modules/ecpy/default.nix +++ b/pkgs/development/python-modules/ecpy/default.nix @@ -1,21 +1,20 @@ -{ stdenv, fetchPypi, buildPythonPackage, isPy3k, hidapi -, pycrypto, pillow, protobuf, future -}: +{ lib, fetchPypi, buildPythonPackage, isPy3k, future }: buildPythonPackage rec { pname = "ECPy"; - version = "0.9.0"; - - disabled = !isPy3k; + version = "0.9.1"; src = fetchPypi { inherit pname version; - sha256 = "ef41346ae24789699f3bc3ddefbfac03ad6b73b7d3d19b998ba9ce47b67c7277"; + sha256 = "f0df66be67f3de0152dfb3c453f4247bdfa2b4e37aa75b98617a637376032229"; }; - buildInputs = [ hidapi pycrypto pillow protobuf future ]; + propagatedBuildInputs = lib.optional (!isPy3k) future; - meta = with stdenv.lib; { + # No tests implemented + doCheck = false; + + meta = with lib; { description = "Pure Pyhton Elliptic Curve Library"; homepage = https://github.com/ubinity/ECPy; license = licenses.asl20; From e45d1fff33aa8ad3584fd4bbe54ea7c679153d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Fri, 31 Aug 2018 11:11:38 -0300 Subject: [PATCH 121/123] catfish: 1.4.4 -> 1.4.6 (#45860) --- pkgs/applications/search/catfish/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/search/catfish/default.nix b/pkgs/applications/search/catfish/default.nix index adf0f51fc4c..c36baae0621 100644 --- a/pkgs/applications/search/catfish/default.nix +++ b/pkgs/applications/search/catfish/default.nix @@ -5,13 +5,13 @@ pythonPackages.buildPythonApplication rec { majorver = "1.4"; - minorver = "4"; + minorver = "6"; version = "${majorver}.${minorver}"; pname = "catfish"; src = fetchurl { - url = "https://launchpad.net/catfish-search/${majorver}/${version}/+download/${pname}-${version}.tar.gz"; - sha256 = "1mw7py6si6y88jblmzm04hf049bpww7h87k2wypq07zm1dw55m52"; + url = "https://archive.xfce.org/src/apps/${pname}/${majorver}/${pname}-${version}.tar.bz2"; + sha256 = "1gxdk5gx0gjq95jhdbpiq39cxpzd4vmw00a78f0wg2i6qlafxjp1"; }; nativeBuildInputs = [ @@ -52,7 +52,7 @@ pythonPackages.buildPythonApplication rec { doCheck = false; meta = with stdenv.lib; { - homepage = https://launchpad.net/catfish-search; + homepage = https://docs.xfce.org/apps/catfish/start; description = "A handy file search tool"; longDescription = '' Catfish is a handy file searching tool. The interface is From 8f0bafcaff7744d3d489a4eed563eda76fc604f8 Mon Sep 17 00:00:00 2001 From: Tobias Happ Date: Fri, 31 Aug 2018 16:39:58 +0200 Subject: [PATCH 122/123] nixos/gitea: fix pre start script (#44979) The gitea path is hardcoded in hooks directory in files of paths like: repositories//.git/hooks/update.d/gitea --- nixos/modules/services/misc/gitea.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix index dc63f1a6c05..a222325579f 100644 --- a/nixos/modules/services/misc/gitea.nix +++ b/nixos/modules/services/misc/gitea.nix @@ -283,7 +283,7 @@ in mkdir -p ${cfg.repositoryRoot} # update all hooks' binary paths - HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 5 -type f -wholename "*git/hooks/*") + HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 6 -type f -wholename "*git/hooks/*") if [ "$HOOKS" ] then sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' $HOOKS From af99bb6429b061762c322c3cfd4aa911be0f0504 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Fri, 31 Aug 2018 17:18:48 +0200 Subject: [PATCH 123/123] spotify: 1.0.80.474.gef6b503e-7 -> 1.0.88.353.g15c26ea1-14 --- pkgs/applications/audio/spotify/default.nix | 7 ++++--- pkgs/applications/audio/spotify/update.sh | 0 2 files changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 pkgs/applications/audio/spotify/update.sh diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix index 04bdff3c813..1639ab34b6c 100644 --- a/pkgs/applications/audio/spotify/default.nix +++ b/pkgs/applications/audio/spotify/default.nix @@ -3,15 +3,16 @@ , libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_0_10, curl, zlib, gnome3 }: let + # TO UPDATE: just execute the ./update.sh script (won't do anything if there is no update) # "rev" decides what is actually being downloaded - version = "1.0.80.474.gef6b503e-7"; + version = "1.0.88.353.g15c26ea1-14"; # To get the latest stable revision: # curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated' # To get general information: # curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.' # More exapmles of api usage: # https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py - rev = "16"; + rev = "19"; deps = [ @@ -64,7 +65,7 @@ stdenv.mkDerivation { # https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334 src = fetchurl { url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap"; - sha512 = "45b7ab574b30fb368e0b6f4dd60addbfd1ddc02173b4f98b31c524eed49073432352a361e75959ce8e2f752231e93c79ca1b538c4bd295c935d1e2e0585d147f"; + sha512 = "3a068cbe3c1fca84ae67e28830216f993aa459947517956897c3b3f63063005c9db646960e85185b149747ffc302060c208a7f9968ea69d50a3496067089f3db"; }; buildInputs = [ squashfsTools makeWrapper ]; diff --git a/pkgs/applications/audio/spotify/update.sh b/pkgs/applications/audio/spotify/update.sh old mode 100644 new mode 100755