about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2019-03-01 09:21:35 +0100
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2019-03-01 09:21:35 +0100
commit3c77acbcd50156d300011e7a826dfcd41403e3f3 (patch)
treee9d38370aac7632cd35207180dc7c87d2bb6171d /pkgs/build-support
parentfc4a8f63c4e46652d484b127162641be36481363 (diff)
parent2fcb11a2442b27834db87b2f62511037c31b5e36 (diff)
downloadnixlib-3c77acbcd50156d300011e7a826dfcd41403e3f3.tar
nixlib-3c77acbcd50156d300011e7a826dfcd41403e3f3.tar.gz
nixlib-3c77acbcd50156d300011e7a826dfcd41403e3f3.tar.bz2
nixlib-3c77acbcd50156d300011e7a826dfcd41403e3f3.tar.lz
nixlib-3c77acbcd50156d300011e7a826dfcd41403e3f3.tar.xz
nixlib-3c77acbcd50156d300011e7a826dfcd41403e3f3.tar.zst
nixlib-3c77acbcd50156d300011e7a826dfcd41403e3f3.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/docker/default.nix7
-rw-r--r--pkgs/build-support/nix-prefetch-github/default.nix4
-rw-r--r--pkgs/build-support/release/ant-build.nix2
-rw-r--r--pkgs/build-support/rust/build-rust-crate/build-crate.nix10
-rw-r--r--pkgs/build-support/rust/build-rust-crate/configure-crate.nix24
-rw-r--r--pkgs/build-support/rust/build-rust-crate/default.nix11
-rw-r--r--pkgs/build-support/rust/carnix.nix25
-rw-r--r--pkgs/build-support/rust/crates-io.nix264
-rw-r--r--pkgs/build-support/singularity-tools/default.nix3
-rw-r--r--pkgs/build-support/skaware/build-skaware-package.nix36
-rw-r--r--pkgs/build-support/skaware/clean-packaging.nix53
-rw-r--r--pkgs/build-support/trivial-builders.nix14
-rw-r--r--pkgs/build-support/vm/windows/controller/default.nix3
13 files changed, 396 insertions, 60 deletions
diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix
index 4b20c5624607..011ff3685093 100644
--- a/pkgs/build-support/docker/default.nix
+++ b/pkgs/build-support/docker/default.nix
@@ -23,7 +23,8 @@
   writeScript,
   writeText,
   closureInfo,
-  substituteAll
+  substituteAll,
+  runtimeShell
 }:
 
 # WARNING: this API is unstable and may be subject to backwards-incompatible changes in the future.
@@ -119,7 +120,7 @@ rec {
     export PATH=${shadow}/bin:$PATH
     mkdir -p /etc/pam.d
     if [[ ! -f /etc/passwd ]]; then
-      echo "root:x:0:0::/root:${stdenv.shell}" > /etc/passwd
+      echo "root:x:0:0::/root:${runtimeShell}" > /etc/passwd
       echo "root:!x:::::::" > /etc/shadow
     fi
     if [[ ! -f /etc/group ]]; then
@@ -261,7 +262,7 @@ rec {
   # things like `ls` or `echo` will be missing.
   shellScript = name: text:
     writeScript name ''
-      #!${stdenv.shell}
+      #!${runtimeShell}
       set -e
       export PATH=${coreutils}/bin:/bin
       ${text}
diff --git a/pkgs/build-support/nix-prefetch-github/default.nix b/pkgs/build-support/nix-prefetch-github/default.nix
index b0fd55260fd1..acc95eaf993f 100644
--- a/pkgs/build-support/nix-prefetch-github/default.nix
+++ b/pkgs/build-support/nix-prefetch-github/default.nix
@@ -5,13 +5,13 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "nix-prefetch-github";
-  version = "2.0";
+  version = "2.2";
 
   src = fetchFromGitHub {
     owner = "seppeljordan";
     repo = "nix-prefetch-github";
     rev = "v${version}";
-    sha256 = "06vxy26d1s7azb9amxdf83i8kxgs2sbjsy0d3mjhwffga13b4igc";
+    sha256 = "1m1d1fzacvwprfvhxih1hzr1m0y1jjxiznf8p8b3bi5a41yzvrrl";
   };
 
   propagatedBuildInputs = with python3.pkgs; [
diff --git a/pkgs/build-support/release/ant-build.nix b/pkgs/build-support/release/ant-build.nix
index 5ab24132290a..2d24d5bd7041 100644
--- a/pkgs/build-support/release/ant-build.nix
+++ b/pkgs/build-support/release/ant-build.nix
@@ -69,7 +69,7 @@ stdenv.mkDerivation (
 
       mkdir -p $out/bin
       cat >> $out/bin/${w.name} <<EOF
-      #!${stdenv.shell}
+      #!${pkgs.runtimeShell}
       export JAVA_HOME=$jre
       $jre/bin/java ${cp w} ${if w ? mainClass then w.mainClass else "-jar ${w.jar}"} \$@
       EOF
diff --git a/pkgs/build-support/rust/build-rust-crate/build-crate.nix b/pkgs/build-support/rust/build-rust-crate/build-crate.nix
index 252a0ff521fd..0978f7e1756f 100644
--- a/pkgs/build-support/rust/build-rust-crate/build-crate.nix
+++ b/pkgs/build-support/rust/build-rust-crate/build-crate.nix
@@ -8,11 +8,11 @@
   let
 
     deps = makeDeps dependencies;
-        rustcOpts =
-          lib.lists.foldl' (opts: opt: opts + " " + opt)
-            (if release then "-C opt-level=3" else "-C debuginfo=2")
-            (["-C codegen-units=1"] ++ extraRustcOpts);
-        rustcMeta = "-C metadata=${metadata} -C extra-filename=-${metadata}";
+    rustcOpts =
+      lib.lists.foldl' (opts: opt: opts + " " + opt)
+        (if release then "-C opt-level=3" else "-C debuginfo=2")
+        (["-C codegen-units=1"] ++ extraRustcOpts);
+    rustcMeta = "-C metadata=${metadata} -C extra-filename=-${metadata}";
 
     # Some platforms have different names for rustc.
     rustPlatform =
diff --git a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix
index 7630c6471dcd..9f499e4f5e72 100644
--- a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix
+++ b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix
@@ -1,9 +1,28 @@
 { lib, stdenv, echo_build_heading, noisily, makeDeps }:
-{ build, buildDependencies, colors, completeBuildDeps, completeDeps, crateAuthors, crateFeatures, crateName, crateVersion, extraLinkFlags, libName, libPath, release, target_os, verbose, workspace_member }:
+{ build
+, buildDependencies
+, colors
+, completeBuildDeps
+, completeDeps
+, crateAuthors
+, crateDescription
+, crateFeatures
+, crateName
+, crateVersion
+, extraLinkFlags
+, extraRustcOpts
+, libName
+, libPath
+, release
+, target_os
+, verbose
+, workspace_member }:
 let version_ = lib.splitString "-" crateVersion;
     versionPre = if lib.tail version_ == [] then "" else builtins.elemAt version_ 1;
     version = lib.splitString "." (lib.head version_);
-    rustcOpts = (if release then "-C opt-level=3" else "-C debuginfo=2");
+    rustcOpts = lib.lists.foldl' (opts: opt: opts + " " + opt)
+        (if release then "-C opt-level=3" else "-C debuginfo=2")
+        (["-C codegen-units=1"] ++ extraRustcOpts);
     buildDeps = makeDeps buildDependencies;
     authors = lib.concatStringsSep ":" crateAuthors;
     optLevel = if release then 3 else 0;
@@ -51,6 +70,7 @@ in ''
   export CARGO_PKG_NAME=${crateName}
   export CARGO_PKG_VERSION=${crateVersion}
   export CARGO_PKG_AUTHORS="${authors}"
+  export CARGO_PKG_DESCRIPTION="${crateDescription}"
 
   export CARGO_CFG_TARGET_ARCH=${stdenv.hostPlatform.parsed.cpu.name}
   export CARGO_CFG_TARGET_OS=${target_os}
diff --git a/pkgs/build-support/rust/build-rust-crate/default.nix b/pkgs/build-support/rust/build-rust-crate/default.nix
index dbb2f1b80cc9..81e8a7ca0afa 100644
--- a/pkgs/build-support/rust/build-rust-crate/default.nix
+++ b/pkgs/build-support/rust/build-rust-crate/default.nix
@@ -71,7 +71,7 @@ let crate = crate_ // (lib.attrByPath [ crate_.crateName ] (attr: {}) crateOverr
     processedAttrs = [
       "src" "buildInputs" "crateBin" "crateLib" "libName" "libPath"
       "buildDependencies" "dependencies" "features"
-      "crateName" "version" "build" "authors" "colors"
+      "crateName" "version" "build" "authors" "colors" "edition"
     ];
     extraDerivationAttrs = lib.filterAttrs (n: v: ! lib.elem n processedAttrs) crate;
     buildInputs_ = buildInputs;
@@ -129,6 +129,7 @@ stdenv.mkDerivation (rec {
     build = crate.build or "";
     workspace_member = crate.workspace_member or ".";
     crateVersion = crate.version;
+    crateDescription = crate.description or "";
     crateAuthors = if crate ? authors && lib.isList crate.authors then crate.authors else [];
     crateType =
       if lib.attrByPath ["procMacro"] false crate then ["proc-macro"] else
@@ -136,13 +137,15 @@ stdenv.mkDerivation (rec {
         (crate.type or ["lib"]);
     colors = lib.attrByPath [ "colors" ] "always" crate;
     extraLinkFlags = builtins.concatStringsSep " " (crate.extraLinkFlags or []);
+    edition = crate.edition or null;
+    extraRustcOpts = (if crate ? extraRustcOpts then crate.extraRustcOpts else []) ++ extraRustcOpts_ ++ (lib.optional (edition != null) "--edition ${edition}");
+
     configurePhase = configureCrate {
-      inherit crateName buildDependencies completeDeps completeBuildDeps
+      inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription
               crateFeatures libName build workspace_member release libPath crateVersion
-              extraLinkFlags
+              extraLinkFlags extraRustcOpts
               crateAuthors verbose colors target_os;
     };
-    extraRustcOpts = (if crate ? extraRustcOpts then crate.extraRustcOpts else []) ++ extraRustcOpts_;
     buildPhase = buildCrate {
       inherit crateName dependencies
               crateFeatures libName release libPath crateType
diff --git a/pkgs/build-support/rust/carnix.nix b/pkgs/build-support/rust/carnix.nix
index dd44fed623ed..ef69f90c3669 100644
--- a/pkgs/build-support/rust/carnix.nix
+++ b/pkgs/build-support/rust/carnix.nix
@@ -1,12 +1,12 @@
-# Generated by carnix 0.9.1: carnix generate-nix
+# Generated by carnix 0.9.8: carnix generate-nix
 { lib, buildPlatform, buildRustCrate, buildRustCrateHelpers, cratesIO, fetchgit }:
 with buildRustCrateHelpers;
 let inherit (lib.lists) fold;
     inherit (lib.attrsets) recursiveUpdate;
 in
-let crates = cratesIO; in
 rec {
-  carnix = crates.crates.carnix."0.9.2" deps;
+  crates = cratesIO;
+  carnix = crates.crates.carnix."0.9.8" deps;
   __all = [ (carnix {}) ];
   deps.aho_corasick."0.6.8" = {
     memchr = "2.1.0";
@@ -42,7 +42,7 @@ rec {
     arrayvec = "0.4.7";
     constant_time_eq = "0.1.3";
   };
-  deps.carnix."0.9.2" = {
+  deps.carnix."0.9.8" = {
     clap = "2.32.0";
     dirs = "1.0.4";
     env_logger = "0.5.13";
@@ -56,6 +56,7 @@ rec {
     serde_json = "1.0.32";
     tempdir = "0.3.7";
     toml = "0.4.8";
+    url = "1.7.2";
   };
   deps.cc."1.0.25" = {};
   deps.cfg_if."0.1.6" = {};
@@ -103,6 +104,11 @@ rec {
   deps.humantime."1.1.1" = {
     quick_error = "1.2.2";
   };
+  deps.idna."0.1.5" = {
+    matches = "0.1.8";
+    unicode_bidi = "0.3.4";
+    unicode_normalization = "0.1.7";
+  };
   deps.itertools."0.7.8" = {
     either = "1.5.0";
   };
@@ -114,6 +120,7 @@ rec {
   deps.log."0.4.5" = {
     cfg_if = "0.1.6";
   };
+  deps.matches."0.1.8" = {};
   deps.memchr."1.0.2" = {
     libc = "0.2.43";
   };
@@ -126,6 +133,7 @@ rec {
   deps.nom."3.2.1" = {
     memchr = "1.0.2";
   };
+  deps.percent_encoding."1.0.1" = {};
   deps.proc_macro2."0.4.20" = {
     unicode_xid = "0.1.0";
   };
@@ -209,8 +217,17 @@ rec {
     serde = "1.0.80";
   };
   deps.ucd_util."0.1.1" = {};
+  deps.unicode_bidi."0.3.4" = {
+    matches = "0.1.8";
+  };
+  deps.unicode_normalization."0.1.7" = {};
   deps.unicode_width."0.1.5" = {};
   deps.unicode_xid."0.1.0" = {};
+  deps.url."1.7.2" = {
+    idna = "0.1.5";
+    matches = "0.1.8";
+    percent_encoding = "1.0.1";
+  };
   deps.utf8_ranges."1.0.1" = {};
   deps.vec_map."0.8.1" = {};
   deps.version_check."0.1.5" = {};
diff --git a/pkgs/build-support/rust/crates-io.nix b/pkgs/build-support/rust/crates-io.nix
index f312cd6e4903..3521f0997bd3 100644
--- a/pkgs/build-support/rust/crates-io.nix
+++ b/pkgs/build-support/rust/crates-io.nix
@@ -338,6 +338,65 @@ rec {
 
 
 # end
+# carnix-0.9.1
+
+  crates.carnix."0.9.1" = deps: { features?(features_.carnix."0.9.1" deps {}) }: buildRustCrate {
+    crateName = "carnix";
+    version = "0.9.1";
+    authors = [ "pe@pijul.org <pe@pijul.org>" ];
+    sha256 = "0dn292d4mjlxif0kclrljzff8rm35cd9d92vycjbzklyhz5d62wi";
+    crateBin =
+      [{  name = "cargo-generate-nixfile";  path = "src/cargo-generate-nixfile.rs"; }] ++
+      [{  name = "carnix";  path = "src/main.rs"; }];
+    dependencies = mapFeatures features ([
+      (crates."clap"."${deps."carnix"."0.9.1"."clap"}" deps)
+      (crates."dirs"."${deps."carnix"."0.9.1"."dirs"}" deps)
+      (crates."env_logger"."${deps."carnix"."0.9.1"."env_logger"}" deps)
+      (crates."error_chain"."${deps."carnix"."0.9.1"."error_chain"}" deps)
+      (crates."itertools"."${deps."carnix"."0.9.1"."itertools"}" deps)
+      (crates."log"."${deps."carnix"."0.9.1"."log"}" deps)
+      (crates."nom"."${deps."carnix"."0.9.1"."nom"}" deps)
+      (crates."regex"."${deps."carnix"."0.9.1"."regex"}" deps)
+      (crates."serde"."${deps."carnix"."0.9.1"."serde"}" deps)
+      (crates."serde_derive"."${deps."carnix"."0.9.1"."serde_derive"}" deps)
+      (crates."serde_json"."${deps."carnix"."0.9.1"."serde_json"}" deps)
+      (crates."tempdir"."${deps."carnix"."0.9.1"."tempdir"}" deps)
+      (crates."toml"."${deps."carnix"."0.9.1"."toml"}" deps)
+    ]);
+  };
+  features_.carnix."0.9.1" = deps: f: updateFeatures f (rec {
+    carnix."0.9.1".default = (f.carnix."0.9.1".default or true);
+    clap."${deps.carnix."0.9.1".clap}".default = true;
+    dirs."${deps.carnix."0.9.1".dirs}".default = true;
+    env_logger."${deps.carnix."0.9.1".env_logger}".default = true;
+    error_chain."${deps.carnix."0.9.1".error_chain}".default = true;
+    itertools."${deps.carnix."0.9.1".itertools}".default = true;
+    log."${deps.carnix."0.9.1".log}".default = true;
+    nom."${deps.carnix."0.9.1".nom}".default = true;
+    regex."${deps.carnix."0.9.1".regex}".default = true;
+    serde."${deps.carnix."0.9.1".serde}".default = true;
+    serde_derive."${deps.carnix."0.9.1".serde_derive}".default = true;
+    serde_json."${deps.carnix."0.9.1".serde_json}".default = true;
+    tempdir."${deps.carnix."0.9.1".tempdir}".default = true;
+    toml."${deps.carnix."0.9.1".toml}".default = true;
+  }) [
+    (features_.clap."${deps."carnix"."0.9.1"."clap"}" deps)
+    (features_.dirs."${deps."carnix"."0.9.1"."dirs"}" deps)
+    (features_.env_logger."${deps."carnix"."0.9.1"."env_logger"}" deps)
+    (features_.error_chain."${deps."carnix"."0.9.1"."error_chain"}" deps)
+    (features_.itertools."${deps."carnix"."0.9.1"."itertools"}" deps)
+    (features_.log."${deps."carnix"."0.9.1"."log"}" deps)
+    (features_.nom."${deps."carnix"."0.9.1"."nom"}" deps)
+    (features_.regex."${deps."carnix"."0.9.1"."regex"}" deps)
+    (features_.serde."${deps."carnix"."0.9.1"."serde"}" deps)
+    (features_.serde_derive."${deps."carnix"."0.9.1"."serde_derive"}" deps)
+    (features_.serde_json."${deps."carnix"."0.9.1"."serde_json"}" deps)
+    (features_.tempdir."${deps."carnix"."0.9.1"."tempdir"}" deps)
+    (features_.toml."${deps."carnix"."0.9.1"."toml"}" deps)
+  ];
+
+
+# end
 # carnix-0.9.2
 
   crates.carnix."0.9.2" = deps: { features?(features_.carnix."0.9.2" deps {}) }: buildRustCrate {
@@ -397,6 +456,68 @@ rec {
 
 
 # end
+# carnix-0.9.8
+
+  crates.carnix."0.9.8" = deps: { features?(features_.carnix."0.9.8" deps {}) }: buildRustCrate {
+    crateName = "carnix";
+    version = "0.9.8";
+    authors = [ "pe@pijul.org <pe@pijul.org>" ];
+    sha256 = "0c2k98qjm1yyx5wl0wqs0rrjczp6h62ri1x8a99442clxsyvp4n9";
+    crateBin =
+      [{  name = "cargo-generate-nixfile";  path = "src/cargo-generate-nixfile.rs"; }] ++
+      [{  name = "carnix";  path = "src/main.rs"; }];
+    dependencies = mapFeatures features ([
+      (crates."clap"."${deps."carnix"."0.9.8"."clap"}" deps)
+      (crates."dirs"."${deps."carnix"."0.9.8"."dirs"}" deps)
+      (crates."env_logger"."${deps."carnix"."0.9.8"."env_logger"}" deps)
+      (crates."error_chain"."${deps."carnix"."0.9.8"."error_chain"}" deps)
+      (crates."itertools"."${deps."carnix"."0.9.8"."itertools"}" deps)
+      (crates."log"."${deps."carnix"."0.9.8"."log"}" deps)
+      (crates."nom"."${deps."carnix"."0.9.8"."nom"}" deps)
+      (crates."regex"."${deps."carnix"."0.9.8"."regex"}" deps)
+      (crates."serde"."${deps."carnix"."0.9.8"."serde"}" deps)
+      (crates."serde_derive"."${deps."carnix"."0.9.8"."serde_derive"}" deps)
+      (crates."serde_json"."${deps."carnix"."0.9.8"."serde_json"}" deps)
+      (crates."tempdir"."${deps."carnix"."0.9.8"."tempdir"}" deps)
+      (crates."toml"."${deps."carnix"."0.9.8"."toml"}" deps)
+      (crates."url"."${deps."carnix"."0.9.8"."url"}" deps)
+    ]);
+  };
+  features_.carnix."0.9.8" = deps: f: updateFeatures f (rec {
+    carnix."0.9.8".default = (f.carnix."0.9.8".default or true);
+    clap."${deps.carnix."0.9.8".clap}".default = true;
+    dirs."${deps.carnix."0.9.8".dirs}".default = true;
+    env_logger."${deps.carnix."0.9.8".env_logger}".default = true;
+    error_chain."${deps.carnix."0.9.8".error_chain}".default = true;
+    itertools."${deps.carnix."0.9.8".itertools}".default = true;
+    log."${deps.carnix."0.9.8".log}".default = true;
+    nom."${deps.carnix."0.9.8".nom}".default = true;
+    regex."${deps.carnix."0.9.8".regex}".default = true;
+    serde."${deps.carnix."0.9.8".serde}".default = true;
+    serde_derive."${deps.carnix."0.9.8".serde_derive}".default = true;
+    serde_json."${deps.carnix."0.9.8".serde_json}".default = true;
+    tempdir."${deps.carnix."0.9.8".tempdir}".default = true;
+    toml."${deps.carnix."0.9.8".toml}".default = true;
+    url."${deps.carnix."0.9.8".url}".default = true;
+  }) [
+    (features_.clap."${deps."carnix"."0.9.8"."clap"}" deps)
+    (features_.dirs."${deps."carnix"."0.9.8"."dirs"}" deps)
+    (features_.env_logger."${deps."carnix"."0.9.8"."env_logger"}" deps)
+    (features_.error_chain."${deps."carnix"."0.9.8"."error_chain"}" deps)
+    (features_.itertools."${deps."carnix"."0.9.8"."itertools"}" deps)
+    (features_.log."${deps."carnix"."0.9.8"."log"}" deps)
+    (features_.nom."${deps."carnix"."0.9.8"."nom"}" deps)
+    (features_.regex."${deps."carnix"."0.9.8"."regex"}" deps)
+    (features_.serde."${deps."carnix"."0.9.8"."serde"}" deps)
+    (features_.serde_derive."${deps."carnix"."0.9.8"."serde_derive"}" deps)
+    (features_.serde_json."${deps."carnix"."0.9.8"."serde_json"}" deps)
+    (features_.tempdir."${deps."carnix"."0.9.8"."tempdir"}" deps)
+    (features_.toml."${deps."carnix"."0.9.8"."toml"}" deps)
+    (features_.url."${deps."carnix"."0.9.8"."url"}" deps)
+  ];
+
+
+# end
 # cc-1.0.25
 
   crates.cc."1.0.25" = deps: { features?(features_.cc."1.0.25" deps {}) }: buildRustCrate {
@@ -802,6 +923,32 @@ rec {
 
 
 # end
+# idna-0.1.5
+
+  crates.idna."0.1.5" = deps: { features?(features_.idna."0.1.5" deps {}) }: buildRustCrate {
+    crateName = "idna";
+    version = "0.1.5";
+    authors = [ "The rust-url developers" ];
+    sha256 = "1gwgl19rz5vzi67rrhamczhxy050f5ynx4ybabfapyalv7z1qmjy";
+    dependencies = mapFeatures features ([
+      (crates."matches"."${deps."idna"."0.1.5"."matches"}" deps)
+      (crates."unicode_bidi"."${deps."idna"."0.1.5"."unicode_bidi"}" deps)
+      (crates."unicode_normalization"."${deps."idna"."0.1.5"."unicode_normalization"}" deps)
+    ]);
+  };
+  features_.idna."0.1.5" = deps: f: updateFeatures f (rec {
+    idna."0.1.5".default = (f.idna."0.1.5".default or true);
+    matches."${deps.idna."0.1.5".matches}".default = true;
+    unicode_bidi."${deps.idna."0.1.5".unicode_bidi}".default = true;
+    unicode_normalization."${deps.idna."0.1.5".unicode_normalization}".default = true;
+  }) [
+    (features_.matches."${deps."idna"."0.1.5"."matches"}" deps)
+    (features_.unicode_bidi."${deps."idna"."0.1.5"."unicode_bidi"}" deps)
+    (features_.unicode_normalization."${deps."idna"."0.1.5"."unicode_normalization"}" deps)
+  ];
+
+
+# end
 # itertools-0.7.8
 
   crates.itertools."0.7.8" = deps: { features?(features_.itertools."0.7.8" deps {}) }: buildRustCrate {
@@ -927,6 +1074,21 @@ rec {
 
 
 # end
+# matches-0.1.8
+
+  crates.matches."0.1.8" = deps: { features?(features_.matches."0.1.8" deps {}) }: buildRustCrate {
+    crateName = "matches";
+    version = "0.1.8";
+    authors = [ "Simon Sapin <simon.sapin@exyr.org>" ];
+    sha256 = "03hl636fg6xggy0a26200xs74amk3k9n0908rga2szn68agyz3cv";
+    libPath = "lib.rs";
+  };
+  features_.matches."0.1.8" = deps: f: updateFeatures f (rec {
+    matches."0.1.8".default = (f.matches."0.1.8".default or true);
+  }) [];
+
+
+# end
 # memchr-1.0.2
 
   crates.memchr."1.0.2" = deps: { features?(features_.memchr."1.0.2" deps {}) }: buildRustCrate {
@@ -1094,6 +1256,21 @@ rec {
 
 
 # end
+# percent-encoding-1.0.1
+
+  crates.percent_encoding."1.0.1" = deps: { features?(features_.percent_encoding."1.0.1" deps {}) }: buildRustCrate {
+    crateName = "percent-encoding";
+    version = "1.0.1";
+    authors = [ "The rust-url developers" ];
+    sha256 = "04ahrp7aw4ip7fmadb0bknybmkfav0kk0gw4ps3ydq5w6hr0ib5i";
+    libPath = "lib.rs";
+  };
+  features_.percent_encoding."1.0.1" = deps: f: updateFeatures f (rec {
+    percent_encoding."1.0.1".default = (f.percent_encoding."1.0.1".default or true);
+  }) [];
+
+
+# end
 # proc-macro2-0.4.20
 
   crates.proc_macro2."0.4.20" = deps: { features?(features_.proc_macro2."0.4.20" deps {}) }: buildRustCrate {
@@ -1850,6 +2027,56 @@ rec {
 
 
 # end
+# unicode-bidi-0.3.4
+
+  crates.unicode_bidi."0.3.4" = deps: { features?(features_.unicode_bidi."0.3.4" deps {}) }: buildRustCrate {
+    crateName = "unicode-bidi";
+    version = "0.3.4";
+    authors = [ "The Servo Project Developers" ];
+    sha256 = "0lcd6jasrf8p9p0q20qyf10c6xhvw40m2c4rr105hbk6zy26nj1q";
+    libName = "unicode_bidi";
+    dependencies = mapFeatures features ([
+      (crates."matches"."${deps."unicode_bidi"."0.3.4"."matches"}" deps)
+    ]);
+    features = mkFeatures (features."unicode_bidi"."0.3.4" or {});
+  };
+  features_.unicode_bidi."0.3.4" = deps: f: updateFeatures f (rec {
+    matches."${deps.unicode_bidi."0.3.4".matches}".default = true;
+    unicode_bidi = fold recursiveUpdate {} [
+      { "0.3.4".default = (f.unicode_bidi."0.3.4".default or true); }
+      { "0.3.4".flame =
+        (f.unicode_bidi."0.3.4".flame or false) ||
+        (f.unicode_bidi."0.3.4".flame_it or false) ||
+        (unicode_bidi."0.3.4"."flame_it" or false); }
+      { "0.3.4".flamer =
+        (f.unicode_bidi."0.3.4".flamer or false) ||
+        (f.unicode_bidi."0.3.4".flame_it or false) ||
+        (unicode_bidi."0.3.4"."flame_it" or false); }
+      { "0.3.4".serde =
+        (f.unicode_bidi."0.3.4".serde or false) ||
+        (f.unicode_bidi."0.3.4".with_serde or false) ||
+        (unicode_bidi."0.3.4"."with_serde" or false); }
+    ];
+  }) [
+    (features_.matches."${deps."unicode_bidi"."0.3.4"."matches"}" deps)
+  ];
+
+
+# end
+# unicode-normalization-0.1.7
+
+  crates.unicode_normalization."0.1.7" = deps: { features?(features_.unicode_normalization."0.1.7" deps {}) }: buildRustCrate {
+    crateName = "unicode-normalization";
+    version = "0.1.7";
+    authors = [ "kwantam <kwantam@gmail.com>" ];
+    sha256 = "1da2hv800pd0wilmn4idwpgv5p510hjxizjcfv6xzb40xcsjd8gs";
+  };
+  features_.unicode_normalization."0.1.7" = deps: f: updateFeatures f (rec {
+    unicode_normalization."0.1.7".default = (f.unicode_normalization."0.1.7".default or true);
+  }) [];
+
+
+# end
 # unicode-width-0.1.5
 
   crates.unicode_width."0.1.5" = deps: { features?(features_.unicode_width."0.1.5" deps {}) }: buildRustCrate {
@@ -1880,6 +2107,43 @@ rec {
 
 
 # end
+# url-1.7.2
+
+  crates.url."1.7.2" = deps: { features?(features_.url."1.7.2" deps {}) }: buildRustCrate {
+    crateName = "url";
+    version = "1.7.2";
+    authors = [ "The rust-url developers" ];
+    sha256 = "0qzrjzd9r1niv7037x4cgnv98fs1vj0k18lpxx890ipc47x5gc09";
+    dependencies = mapFeatures features ([
+      (crates."idna"."${deps."url"."1.7.2"."idna"}" deps)
+      (crates."matches"."${deps."url"."1.7.2"."matches"}" deps)
+      (crates."percent_encoding"."${deps."url"."1.7.2"."percent_encoding"}" deps)
+    ]);
+    features = mkFeatures (features."url"."1.7.2" or {});
+  };
+  features_.url."1.7.2" = deps: f: updateFeatures f (rec {
+    idna."${deps.url."1.7.2".idna}".default = true;
+    matches."${deps.url."1.7.2".matches}".default = true;
+    percent_encoding."${deps.url."1.7.2".percent_encoding}".default = true;
+    url = fold recursiveUpdate {} [
+      { "1.7.2".default = (f.url."1.7.2".default or true); }
+      { "1.7.2".encoding =
+        (f.url."1.7.2".encoding or false) ||
+        (f.url."1.7.2".query_encoding or false) ||
+        (url."1.7.2"."query_encoding" or false); }
+      { "1.7.2".heapsize =
+        (f.url."1.7.2".heapsize or false) ||
+        (f.url."1.7.2".heap_size or false) ||
+        (url."1.7.2"."heap_size" or false); }
+    ];
+  }) [
+    (features_.idna."${deps."url"."1.7.2"."idna"}" deps)
+    (features_.matches."${deps."url"."1.7.2"."matches"}" deps)
+    (features_.percent_encoding."${deps."url"."1.7.2"."percent_encoding"}" deps)
+  ];
+
+
+# end
 # utf8-ranges-1.0.1
 
   crates.utf8_ranges."1.0.1" = deps: { features?(features_.utf8_ranges."1.0.1" deps {}) }: buildRustCrate {
diff --git a/pkgs/build-support/singularity-tools/default.nix b/pkgs/build-support/singularity-tools/default.nix
index 4206b0f33ff9..3fc10c8b0b4b 100644
--- a/pkgs/build-support/singularity-tools/default.nix
+++ b/pkgs/build-support/singularity-tools/default.nix
@@ -8,12 +8,13 @@
 , vmTools
 , gawk
 , utillinux
+, runtimeShell
 , e2fsprogs }:
 
 rec {
   shellScript = name: text:
     writeScript name ''
-      #!${stdenv.shell}
+      #!${runtimeShell}
       set -e
       ${text}
     '';
diff --git a/pkgs/build-support/skaware/build-skaware-package.nix b/pkgs/build-support/skaware/build-skaware-package.nix
index 5ae8985e3abe..e4712a5ef22c 100644
--- a/pkgs/build-support/skaware/build-skaware-package.nix
+++ b/pkgs/build-support/skaware/build-skaware-package.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, writeScript, file }:
+{ stdenv, callPackage, cleanPackaging, fetchurl, writeScript, file }:
 let lib = stdenv.lib;
 in {
   # : string
@@ -54,25 +54,6 @@ let
     "README.*"
   ];
 
-  globWith = stdenv.lib.concatMapStringsSep "\n";
-  rmNoise = globWith (f:
-    ''rm -rf ${f}'') commonNoiseFiles;
-  mvMeta = globWith
-    (f: ''mv ${f} "$DOCDIR" 2>/dev/null || true'')
-    commonMetaFiles;
-
-  # Move & remove actions, taking the package doc directory
-  commonFileActions = writeScript "common-file-actions.sh" ''
-    #!${stdenv.shell}
-    set -e
-    DOCDIR="$1"
-    shopt -s globstar extglob nullglob
-    ${rmNoise}
-    mkdir -p "$DOCDIR"
-    ${mvMeta}
-  '';
-
-
 in stdenv.mkDerivation {
   name = "${pname}-${version}";
 
@@ -105,21 +86,16 @@ in stdenv.mkDerivation {
   # TODO(Profpatsch): ensure that there is always a $doc output!
   postInstall = ''
     echo "Cleaning & moving common files"
-    mkdir -p $doc/share/doc/${pname}
-    ${commonFileActions} $doc/share/doc/${pname}
+    ${cleanPackaging.commonFileActions {
+       noiseFiles = commonNoiseFiles;
+       docFiles = commonMetaFiles;
+     }} $doc/share/doc/${pname}
 
     ${postInstall}
   '';
 
   postFixup = ''
-    echo "Checking for remaining source files"
-    rem=$(find -mindepth 1 -xtype f -print0 \
-           | tee $TMP/remaining-files)
-    if [[ "$rem" != "" ]]; then
-      echo "ERROR: These files should be either moved or deleted:"
-      cat $TMP/remaining-files | xargs -0 ${file}/bin/file
-      exit 1
-    fi
+    ${cleanPackaging.checkForRemainingFiles}
   '';
 
   meta = {
diff --git a/pkgs/build-support/skaware/clean-packaging.nix b/pkgs/build-support/skaware/clean-packaging.nix
new file mode 100644
index 000000000000..16bae04b21e2
--- /dev/null
+++ b/pkgs/build-support/skaware/clean-packaging.nix
@@ -0,0 +1,53 @@
+# set of utilities that assure the cwd of a build
+# is completely clean after the build, meaning all
+# files were either discarded or moved to outputs.
+# This ensures nothing is forgotten and new files
+# are correctly handled on update.
+{ stdenv, file, writeScript }:
+
+let
+  globWith = stdenv.lib.concatMapStringsSep "\n";
+  rmNoise = noiseGlobs: globWith (f:
+    ''rm -rf ${f}'') noiseGlobs;
+  mvDoc = docGlobs: globWith
+    (f: ''mv ${f} "$DOCDIR" 2>/dev/null || true'')
+    docGlobs;
+
+  # Shell script that implements common move & remove actions
+  # $1 is the doc directory (will be created).
+  # Best used in conjunction with checkForRemainingFiles
+  commonFileActions =
+    { # list of fileglobs that are removed from the source dir
+      noiseFiles
+      # files that are moved to the doc directory ($1)
+      # TODO(Profpatsch): allow to set target dir with
+      # { glob = …; to = "html" } (relative to docdir)
+    , docFiles }:
+    writeScript "common-file-actions.sh" ''
+      #!${stdenv.shell}
+      set -e
+      DOCDIR="$1"
+      shopt -s globstar extglob nullglob
+      ${rmNoise noiseFiles}
+      mkdir -p "$DOCDIR"
+      ${mvDoc docFiles}
+    '';
+
+  # Shell script to check whether the build directory is empty.
+  # If there are still files remaining, exit 1 with a helpful
+  # listing of all remaining files and their types.
+  checkForRemainingFiles = writeScript "check-for-remaining-files.sh" ''
+    #!${stdenv.shell}
+    echo "Checking for remaining source files"
+    rem=$(find -mindepth 1 -xtype f -print0 \
+           | tee $TMP/remaining-files)
+    if [[ "$rem" != "" ]]; then
+      echo "ERROR: These files should be either moved or deleted:"
+      cat $TMP/remaining-files | xargs -0 ${file}/bin/file
+      exit 1
+    fi
+  '';
+
+in {
+  inherit commonFileActions checkForRemainingFiles;
+}
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix
index 454ef8912b3b..58bc7147ede4 100644
--- a/pkgs/build-support/trivial-builders.nix
+++ b/pkgs/build-support/trivial-builders.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, stdenvNoCC, lndir }:
+{ lib, stdenv, stdenvNoCC, lndir, runtimeShell }:
 
 let
 
@@ -15,12 +15,12 @@ rec {
   /* Run the shell command `buildCommand' to produce a store path named
   * `name'.  The attributes in `env' are added to the environment
   * prior to running the command. By default `runCommand' runs using
-  * stdenv with no compiler environment. `runCommandCC` 
+  * stdenv with no compiler environment. `runCommandCC`
   *
   * Examples:
   * runCommand "name" {envVariable = true;} ''echo hello''
   * runCommandNoCC "name" {envVariable = true;} ''echo hello'' # equivalent to prior
-  * runCommandCC "name" {} ''gcc -o myfile myfile.c; cp myfile $out''; 
+  * runCommandCC "name" {} ''gcc -o myfile myfile.c; cp myfile $out'';
   */
   runCommand = runCommandNoCC;
   runCommandNoCC = runCommand' stdenvNoCC;
@@ -145,11 +145,11 @@ rec {
       executable = true;
       destination = "/bin/${name}";
       text = ''
-        #!${stdenv.shell}
+        #!${runtimeShell}
         ${text}
         '';
       checkPhase = ''
-        ${stdenv.shell} -n $out/bin/${name}
+        ${runtimeShell} -n $out/bin/${name}
       '';
     };
 
@@ -215,7 +215,7 @@ rec {
    * myhellohook = makeSetupHook { deps = [ hello ]; } ./myscript.sh;
    *
    * # wrotes a setup hook where @bash@ myscript.sh is substituted for the
-   * # bash interpreter. 
+   * # bash interpreter.
    * myhellohookSub = makeSetupHook {
    *                 deps = [ hello ];
    *                 substitutions = { bash = "${pkgs.bash}/bin/bash"; };
@@ -278,7 +278,7 @@ rec {
    * packages that cannot be built automatically.
    *
    * Examples:
-   * 
+   *
    * requireFile {
    *   name = "my-file";
    *   url = "http://example.com/download/";
diff --git a/pkgs/build-support/vm/windows/controller/default.nix b/pkgs/build-support/vm/windows/controller/default.nix
index e000308bed8f..08b93aaf1174 100644
--- a/pkgs/build-support/vm/windows/controller/default.nix
+++ b/pkgs/build-support/vm/windows/controller/default.nix
@@ -1,5 +1,6 @@
 { stdenv, writeScript, vmTools, makeInitrd
 , samba, vde2, openssh, socat, netcat-gnu, coreutils, gnugrep, gzip
+, runtimeShell
 }:
 
 { sshKey
@@ -74,7 +75,7 @@ let
   loopForever = "while :; do ${coreutils}/bin/sleep 1; done";
 
   initScript = writeScript "init.sh" (''
-    #!${stdenv.shell}
+    #!${runtimeShell}
     ${coreutils}/bin/cp -L "${sshKey}" /ssh.key
     ${coreutils}/bin/chmod 600 /ssh.key
   '' + (if installMode then ''