diff options
Diffstat (limited to 'pkgs/build-support')
37 files changed, 562 insertions, 933 deletions
diff --git a/pkgs/build-support/appimage/default.nix b/pkgs/build-support/appimage/default.nix index 1f84403c10fc..7e2b2b347d90 100644 --- a/pkgs/build-support/appimage/default.nix +++ b/pkgs/build-support/appimage/default.nix @@ -185,10 +185,12 @@ rec { keyutils.lib libjack2 fribidi + p11_kit # libraries not on the upstream include list, but nevertheless expected # by at least one appimage libtool.lib # for Synfigstudio + at-spi2-core ]; }; } diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index e1ec09bc95a1..e02e77de45e4 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -180,10 +180,10 @@ stdenv.mkDerivation { else if targetPlatform.isx86_64 then "x86-64" else if targetPlatform.isx86_32 then "i386" else if targetPlatform.isMips then { - "mips" = "btsmipn32"; # n32 variant - "mipsel" = "ltsmipn32"; # n32 variant - "mips64" = "btsmip"; - "mips64el" = "ltsmip"; + mips = "btsmipn32"; # n32 variant + mipsel = "ltsmipn32"; # n32 variant + mips64 = "btsmip"; + mips64el = "ltsmip"; }.${targetPlatform.parsed.cpu.name} else if targetPlatform.isPower then if targetPlatform.isBigEndian then "ppc" else "lppc" else if targetPlatform.isSparc then "sparc" diff --git a/pkgs/build-support/bintools-wrapper/setup-hook.sh b/pkgs/build-support/bintools-wrapper/setup-hook.sh index f65b792485a0..2e15fa95c794 100644 --- a/pkgs/build-support/bintools-wrapper/setup-hook.sh +++ b/pkgs/build-support/bintools-wrapper/setup-hook.sh @@ -24,7 +24,8 @@ bintoolsWrapper_addLDVars () { # Python and Haskell packages often only have directories like $out/lib/ghc-8.4.3/ or # $out/lib/python3.6/, so having them in LDFLAGS just makes the linker search unnecessary # directories and bloats the size of the environment variable space. - if [[ -n "$(echo $1/lib/lib*)" ]]; then + local -a glob=( $1/lib/lib* ) + if [ "${#glob[*]}" -gt 0 ]; then export NIX_${role_pre}LDFLAGS+=" -L$1/lib" fi fi @@ -61,9 +62,8 @@ do if PATH=$_PATH type -p "@targetPrefix@${cmd}" > /dev/null then - upper_case="$(echo "$cmd" | tr "[:lower:]" "[:upper:]")" - export "${role_pre}${upper_case}=@targetPrefix@${cmd}"; - export "${upper_case}${role_post}=@targetPrefix@${cmd}"; + export "${role_pre}${cmd^^}=@targetPrefix@${cmd}"; + export "${cmd^^}${role_post}=@targetPrefix@${cmd}"; fi done diff --git a/pkgs/build-support/buildenv/builder.pl b/pkgs/build-support/buildenv/builder.pl index b699d762d29c..fc6ffce735cc 100755 --- a/pkgs/build-support/buildenv/builder.pl +++ b/pkgs/build-support/buildenv/builder.pl @@ -26,6 +26,19 @@ sub isInPathsToLink { return 0; } +# Returns whether a path in one of the linked packages may contain +# files in one of the elements of pathsToLink. +sub hasPathsToLink { + my $path = shift; + foreach my $elem (@pathsToLink) { + return 1 if + $path eq "" || + (substr($elem, 0, length($path)) eq $path + && (($path eq $elem) || (substr($elem, length($path), 1) eq "/"))); + } + return 0; +} + # Similar to `lib.isStorePath` sub isStorePath { my $path = shift; @@ -103,7 +116,8 @@ sub findFiles { $relName =~ /info\/dir/ || ( $relName =~ /^\/share\/mime\// && !( $relName =~ /^\/share\/mime\/packages/ ) ) || $baseName eq "perllocal.pod" || - $baseName eq "log"; + $baseName eq "log" || + ! (hasPathsToLink($relName) || isInPathsToLink($relName)); my ($oldTarget, $oldPriority) = @{$symlinks{$relName} // [undef, undef]}; diff --git a/pkgs/build-support/dhall-to-nix.nix b/pkgs/build-support/dhall-to-nix.nix index c563b34ff3bc..3805656dfa0e 100644 --- a/pkgs/build-support/dhall-to-nix.nix +++ b/pkgs/build-support/dhall-to-nix.nix @@ -33,6 +33,6 @@ let }; in - import "${drv}"; + import drv; in dhallToNix diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 83e21c8945dc..37b25232b961 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -1,4 +1,5 @@ { + buildPackages, cacert, callPackage, closureInfo, @@ -47,7 +48,7 @@ rec { , imageDigest , sha256 , os ? "linux" - , arch ? "amd64" + , arch ? buildPackages.go.GOARCH # This is used to set name to the pulled image , finalImageName ? imageName @@ -540,7 +541,7 @@ rec { configJson = let pure = writeText "${baseName}-config.json" (builtins.toJSON { inherit created config; - architecture = "amd64"; + architecture = buildPackages.go.GOARCH; os = "linux"; }); impure = runCommand "${baseName}-standard-dynamic-date.json" @@ -658,7 +659,7 @@ rec { baseJson = let pure = writeText "${baseName}-config.json" (builtins.toJSON { inherit created config; - architecture = "amd64"; + architecture = buildPackages.go.GOARCH; os = "linux"; }); impure = runCommand "${baseName}-config.json" diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix index dfdd5b60851d..b242672df10b 100644 --- a/pkgs/build-support/emacs/wrapper.nix +++ b/pkgs/build-support/emacs/wrapper.nix @@ -18,10 +18,10 @@ the correct version of Emacs. `emacsWithPackages` inherits the package set which contains it, so the correct way to override the provided package set is to override the set which contains `emacsWithPackages`. For example, to override -`emacsPackagesNg.emacsWithPackages`, +`emacsPackages.emacsWithPackages`, ``` let customEmacsPackages = - emacsPackagesNg.overrideScope' (self: super: { + emacsPackages.overrideScope' (self: super: { # use a custom version of emacs emacs = ...; # use the unstable MELPA version of magit diff --git a/pkgs/build-support/fetchdocker/default.nix b/pkgs/build-support/fetchdocker/default.nix index bbd2bae46df5..57d2e4ad82d2 100644 --- a/pkgs/build-support/fetchdocker/default.nix +++ b/pkgs/build-support/fetchdocker/default.nix @@ -37,8 +37,8 @@ let repositories = writeText "repositories" (builtins.toJSON { - "${repoTag1}" = { - "${tag}" = lib.last layers; + ${repoTag1} = { + ${tag} = lib.last layers; }; }); diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix index 256c86748d28..0405951a9e40 100644 --- a/pkgs/build-support/fetchgit/default.nix +++ b/pkgs/build-support/fetchgit/default.nix @@ -52,7 +52,7 @@ else stdenvNoCC.mkDerivation { inherit name; builder = ./builder.sh; - fetcher = "${./nix-prefetch-git}"; # This must be a string to ensure it's called with bash. + fetcher = ./nix-prefetch-git; # This must be a string to ensure it's called with bash. nativeBuildInputs = [git]; outputHashAlgo = "sha256"; diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index b447911ab8d3..931be1a37007 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -265,7 +265,9 @@ make_deterministic_repo(){ rm -f .git/config # Garbage collect unreferenced objects. - git gc --prune=all + # Note: --keep-largest-pack prevents non-deterministic ordering of packs + # listed in .git/objects/info/packs by only using a single pack + git gc --prune=all --keep-largest-pack ) } diff --git a/pkgs/build-support/fetchgit/private.nix b/pkgs/build-support/fetchgit/private.nix index 59376f3b0424..6731cf87fbd1 100644 --- a/pkgs/build-support/fetchgit/private.nix +++ b/pkgs/build-support/fetchgit/private.nix @@ -4,7 +4,7 @@ else null; GIT_SSH = let - config = ''${let + config = let sshConfigFile = if (builtins.tryEval <ssh-config-file>).success then <ssh-config-file> else builtins.trace '' @@ -14,7 +14,7 @@ You may need StrictHostKeyChecking=no in the config file. Since ssh will refuse to use a group-readable private key, if using build-users you will likely want to use something like IdentityFile /some/directory/%u/key and have a directory for each build user accessible to that user. '' "/var/lib/empty/config"; - in builtins.toString sshConfigFile}''; + in builtins.toString sshConfigFile; ssh-wrapped = runCommand "fetchgit-ssh" { nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix index 1ca1e45f2fbb..c0e115bca280 100644 --- a/pkgs/build-support/fetchurl/mirrors.nix +++ b/pkgs/build-support/fetchurl/mirrors.nix @@ -1,4 +1,4 @@ -rec { +{ # Content-addressable Nix mirrors. hashedMirrors = [ @@ -8,6 +8,13 @@ rec { # Mirrors for mirror://site/filename URIs, where "site" is # "sourceforge", "gnu", etc. + luarocks = [ + https://luarocks.org + https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/ + http://luafr.org/moonrocks + http://luarocks.logiceditor.com/rocks + ]; + # SourceForge. sourceforge = [ https://downloads.sourceforge.net/ diff --git a/pkgs/build-support/install-shell-files/default.nix b/pkgs/build-support/install-shell-files/default.nix new file mode 100644 index 000000000000..e1f2e24dd875 --- /dev/null +++ b/pkgs/build-support/install-shell-files/default.nix @@ -0,0 +1,4 @@ +{ makeSetupHook }: + +# See the header comment in ../setup-hooks/install-shell-files.sh for example usage. +makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh diff --git a/pkgs/build-support/nix-prefetch-github/default.nix b/pkgs/build-support/nix-prefetch-github/default.nix index 3c5cbe2b4928..10a6daaf53f7 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.3"; + version = "2.3.1"; src = fetchFromGitHub { owner = "seppeljordan"; repo = "nix-prefetch-github"; rev = "v${version}"; - sha256 = "0b2hgfyxhlqq6lyi5cr98dz6if5kl6b3kq67f2lzfkalydywl1dh"; + sha256 = "13wvq13iiva97a16kahfpxar5ppb015nnbn7d4v9s9jyxdickc2c"; }; propagatedBuildInputs = with python3.pkgs; [ diff --git a/pkgs/build-support/oci-tools/default.nix b/pkgs/build-support/oci-tools/default.nix new file mode 100644 index 000000000000..18b238033ffd --- /dev/null +++ b/pkgs/build-support/oci-tools/default.nix @@ -0,0 +1,78 @@ +{ lib, writeText, runCommand, writeReferencesToFile }: + +{ + buildContainer = + { args + , mounts ? {} + , os ? "linux" + , arch ? "x86_64" + , readonly ? false + }: + let + sysMounts = { + "/proc" = { + type = "proc"; + source = "proc"; + }; + "/dev" = { + type = "tmpfs"; + source = "tmpfs"; + options = [ "nosuid" "strictatime" "mode=755" "size=65536k" ]; + }; + "/dev/pts" = { + type = "devpts"; + source = "devpts"; + options = [ "nosuid" "noexec" "newinstance" "ptmxmode=0666" "mode=755" "gid=5" ]; + }; + "/dev/shm" = { + type = "tmpfs"; + source = "shm"; + options = [ "nosuid" "noexec" "nodev" "mode=1777" "size=65536k" ]; + }; + "/dev/mqueue" = { + type = "mqueue"; + source = "mqueue"; + options = [ "nosuid" "noexec" "nodev" ]; + }; + "/sys" = { + type = "sysfs"; + source = "sysfs"; + options = [ "nosuid" "noexec" "nodev" "ro" ]; + }; + "/sys/fs/cgroup" = { + type = "cgroup"; + source = "cgroup"; + options = [ "nosuid" "noexec" "nodev" "realatime" "ro" ]; + }; + }; + config = writeText "config.json" (builtins.toJSON { + ociVersion = "1.0.0"; + platform = { + inherit os arch; + }; + + linux = { + namespaces = map (type: { inherit type; }) [ "pid" "network" "mount" "ipc" "uts" ]; + }; + + root = { path = "rootfs"; inherit readonly; }; + + process = { + inherit args; + user = { uid = 0; gid = 0; }; + cwd = "/"; + }; + + mounts = lib.mapAttrsToList (destination: { type, source, options ? null }: { + inherit destination type source options; + }) sysMounts; + }); + in + runCommand "join" {} '' + set -o pipefail + mkdir -p $out/rootfs/{dev,proc,sys} + cp ${config} $out/config.json + xargs tar c < ${writeReferencesToFile args} | tar -xC $out/rootfs/ + ''; +} + diff --git a/pkgs/build-support/release/maven-build.nix b/pkgs/build-support/release/maven-build.nix index f7ea07baccbe..71eb63b850d5 100644 --- a/pkgs/build-support/release/maven-build.nix +++ b/pkgs/build-support/release/maven-build.nix @@ -15,7 +15,7 @@ let mvnFlags = "-Dmaven.repo.local=$M2_REPO ${if doTest then "" else "-Dmaven.test.skip.exec=true"} ${extraMvnFlags}"; in -stdenv.mkDerivation ( rec { +stdenv.mkDerivation ( { inherit name src; phases = "setupPhase unpackPhase patchPhase mvnCompile ${if doTestCompile then "mvnTestCompile mvnTestJar" else ""} ${if doTest then "mvnTest" else ""} ${if doJavadoc then "mvnJavadoc" else ""} ${if doCheckstyle then "mvnCheckstyle" else ""} mvnJar mvnAssembly mvnRelease finalPhase"; 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 2999c3d4c1d9..e0a52e62561b 100644 --- a/pkgs/build-support/rust/build-rust-crate/build-crate.nix +++ b/pkgs/build-support/rust/build-rust-crate/build-crate.nix @@ -1,13 +1,13 @@ { lib, stdenv, echo_build_heading, noisily, makeDeps }: { crateName, dependencies, - crateFeatures, libName, release, libPath, + crateFeatures, crateRenames, libName, release, libPath, crateType, metadata, crateBin, hasCrateBin, extraRustcOpts, verbose, colors }: let - deps = makeDeps dependencies; + deps = makeDeps dependencies crateRenames; rustcOpts = lib.lists.foldl' (opts: opt: opts + " " + opt) (if release then "-C opt-level=3" else "-C debuginfo=2") 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 169adcf2d43a..2a40240671cb 100644 --- a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix +++ b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix @@ -9,6 +9,7 @@ , crateHomepage , crateFeatures , crateName +, crateRenames , crateVersion , extraLinkFlags , extraRustcOpts @@ -24,7 +25,7 @@ let version_ = lib.splitString "-" crateVersion; rustcOpts = lib.lists.foldl' (opts: opt: opts + " " + opt) (if release then "-C opt-level=3" else "-C debuginfo=2") (["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts); - buildDeps = makeDeps buildDependencies; + buildDeps = makeDeps buildDependencies crateRenames; authors = lib.concatStringsSep ":" crateAuthors; optLevel = if release then 3 else 0; completeDepsDir = lib.concatStringsSep " " completeDeps; diff --git a/pkgs/build-support/rust/build-rust-crate/default.nix b/pkgs/build-support/rust/build-rust-crate/default.nix index acb2ee63cce4..6534e21c0f0c 100644 --- a/pkgs/build-support/rust/build-rust-crate/default.nix +++ b/pkgs/build-support/rust/build-rust-crate/default.nix @@ -13,13 +13,18 @@ let then "macos" else stdenv.hostPlatform.parsed.kernel.name; - makeDeps = dependencies: + makeDeps = dependencies: crateRenames: (lib.concatMapStringsSep " " (dep: - let extern = lib.strings.replaceStrings ["-"] ["_"] dep.libName; in - (if lib.lists.any (x: x == "lib") dep.crateType then - " --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}.rlib" + let + extern = lib.strings.replaceStrings ["-"] ["_"] dep.libName; + name = if builtins.hasAttr dep.crateName crateRenames then + lib.strings.replaceStrings ["-"] ["_"] crateRenames.${dep.crateName} + else + extern; + in (if lib.lists.any (x: x == "lib") dep.crateType then + " --extern ${name}=${dep.out}/lib/lib${extern}-${dep.metadata}.rlib" else - " --extern ${extern}=${dep.out}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}") + " --extern ${name}=${dep.out}/lib/lib${extern}-${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}") ) dependencies); echo_build_heading = colors: '' @@ -60,7 +65,7 @@ let in crate_: lib.makeOverridable ({ rust, release, verbose, features, buildInputs, crateOverrides, - dependencies, buildDependencies, + dependencies, buildDependencies, crateRenames, extraRustcOpts, preUnpack, postUnpack, prePatch, patches, postPatch, preConfigure, postConfigure, preBuild, postBuild, preInstall, postInstall }: @@ -70,7 +75,7 @@ let crate = crate_ // (lib.attrByPath [ crate_.crateName ] (attr: {}) crateOverr buildDependencies_ = buildDependencies; processedAttrs = [ "src" "buildInputs" "crateBin" "crateLib" "libName" "libPath" - "buildDependencies" "dependencies" "features" + "buildDependencies" "dependencies" "features" "crateRenames" "crateName" "version" "build" "authors" "colors" "edition" ]; extraDerivationAttrs = lib.filterAttrs (n: v: ! lib.elem n processedAttrs) crate; @@ -143,13 +148,13 @@ stdenv.mkDerivation (rec { configurePhase = configureCrate { inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription - crateFeatures libName build workspace_member release libPath crateVersion + crateFeatures crateRenames libName build workspace_member release libPath crateVersion extraLinkFlags extraRustcOpts crateAuthors crateHomepage verbose colors target_os; }; buildPhase = buildCrate { inherit crateName dependencies - crateFeatures libName release libPath crateType + crateFeatures crateRenames libName release libPath crateType metadata crateBin hasCrateBin verbose colors extraRustcOpts; }; @@ -177,4 +182,5 @@ stdenv.mkDerivation (rec { postInstall = crate_.postInstall or ""; dependencies = crate_.dependencies or []; buildDependencies = crate_.buildDependencies or []; + crateRenames = crate_.crateRenames or {}; } diff --git a/pkgs/build-support/rust/build-rust-crate/test/brotli-crates.nix b/pkgs/build-support/rust/build-rust-crate/test/brotli-crates.nix index 068cc5a98843..ab9b0a13ae77 100644 --- a/pkgs/build-support/rust/build-rust-crate/test/brotli-crates.nix +++ b/pkgs/build-support/rust/build-rust-crate/test/brotli-crates.nix @@ -44,7 +44,7 @@ rec { alloc_no_stdlib_1_3_0 = { features?(alloc_no_stdlib_1_3_0_features {}) }: alloc_no_stdlib_1_3_0_ { features = mkFeatures (features.alloc_no_stdlib_1_3_0 or {}); }; - alloc_no_stdlib_1_3_0_features = f: updateFeatures f (rec { + alloc_no_stdlib_1_3_0_features = f: updateFeatures f ({ alloc_no_stdlib_1_3_0.default = (f.alloc_no_stdlib_1_3_0.default or true); }) []; brotli_2_5_0 = { features?(brotli_2_5_0_features {}) }: brotli_2_5_0_ { @@ -52,20 +52,20 @@ rec { features = mkFeatures (features.brotli_2_5_0 or {}); }; brotli_2_5_0_features = f: updateFeatures f (rec { - alloc_no_stdlib_1_3_0."no-stdlib" = - (f.alloc_no_stdlib_1_3_0."no-stdlib" or false) || - (brotli_2_5_0."no-stdlib" or false) || - (f.brotli_2_5_0."no-stdlib" or false); + alloc_no_stdlib_1_3_0.no-stdlib = + (f.alloc_no_stdlib_1_3_0.no-stdlib or false) || + (brotli_2_5_0.no-stdlib or false) || + (f.brotli_2_5_0.no-stdlib or false); alloc_no_stdlib_1_3_0.default = true; brotli_2_5_0.default = (f.brotli_2_5_0.default or true); - brotli_decompressor_1_3_1."disable-timer" = - (f.brotli_decompressor_1_3_1."disable-timer" or false) || - (brotli_2_5_0."disable-timer" or false) || - (f.brotli_2_5_0."disable-timer" or false); - brotli_decompressor_1_3_1."no-stdlib" = - (f.brotli_decompressor_1_3_1."no-stdlib" or false) || - (brotli_2_5_0."no-stdlib" or false) || - (f.brotli_2_5_0."no-stdlib" or false); + brotli_decompressor_1_3_1.disable-timer = + (f.brotli_decompressor_1_3_1.disable-timer or false) || + (brotli_2_5_0.disable-timer or false) || + (f.brotli_2_5_0.disable-timer or false); + brotli_decompressor_1_3_1.no-stdlib = + (f.brotli_decompressor_1_3_1.no-stdlib or false) || + (brotli_2_5_0.no-stdlib or false) || + (f.brotli_2_5_0.no-stdlib or false); brotli_decompressor_1_3_1.benchmark = (f.brotli_decompressor_1_3_1.benchmark or false) || (brotli_2_5_0.benchmark or false) || @@ -81,10 +81,10 @@ rec { features = mkFeatures (features.brotli_decompressor_1_3_1 or {}); }; brotli_decompressor_1_3_1_features = f: updateFeatures f (rec { - alloc_no_stdlib_1_3_0."no-stdlib" = - (f.alloc_no_stdlib_1_3_0."no-stdlib" or false) || - (brotli_decompressor_1_3_1."no-stdlib" or false) || - (f.brotli_decompressor_1_3_1."no-stdlib" or false); + alloc_no_stdlib_1_3_0.no-stdlib = + (f.alloc_no_stdlib_1_3_0.no-stdlib or false) || + (brotli_decompressor_1_3_1.no-stdlib or false) || + (f.brotli_decompressor_1_3_1.no-stdlib or false); alloc_no_stdlib_1_3_0.default = true; alloc_no_stdlib_1_3_0.unsafe = (f.alloc_no_stdlib_1_3_0.unsafe or false) || diff --git a/pkgs/build-support/rust/build-rust-crate/test/default.nix b/pkgs/build-support/rust/build-rust-crate/test/default.nix index f3f9ef377c8c..4a90cf442a4d 100644 --- a/pkgs/build-support/rust/build-rust-crate/test/default.nix +++ b/pkgs/build-support/rust/build-rust-crate/test/default.nix @@ -22,6 +22,13 @@ let } ''; + mkBinExtern = name: extern: mkFile name '' + extern crate ${extern}; + fn main() { + assert_eq!(${extern}::test(), 23); + } + ''; + mkLib = name: mkFile name "pub fn test() -> i32 { return 23; }"; mkTest = crateArgs: let @@ -34,12 +41,7 @@ let libTestBinary = if !isLib then null else mkCrate { crateName = "run-test-${crateName}"; dependencies = [ crate ]; - src = mkFile "src/main.rs" '' - extern crate ${libName}; - fn main() { - assert_eq!(${libName}::test(), 23); - } - ''; + src = mkBinExtern "src/main.rs" libName; }; in runCommand "run-buildRustCrate-${crateName}-test" { @@ -71,6 +73,18 @@ let }; crateBinNoPath3 = { crateBin = [{ name = "my-binary5"; }]; src = mkBin "src/bin/main.rs"; }; crateBinNoPath4 = { crateBin = [{ name = "my-binary6"; }]; src = mkBin "src/main.rs";}; + crateBinRename1 = { + crateBin = [{ name = "my-binary-rename1"; }]; + src = mkBinExtern "src/main.rs" "foo_renamed"; + dependencies = [ (mkCrate { crateName = "foo"; src = mkLib "src/lib.rs"; }) ]; + crateRenames = { "foo" = "foo_renamed"; }; + }; + crateBinRename2 = { + crateBin = [{ name = "my-binary-rename2"; }]; + src = mkBinExtern "src/main.rs" "foo_renamed"; + dependencies = [ (mkCrate { crateName = "foo"; libName = "foolib"; src = mkLib "src/lib.rs"; }) ]; + crateRenames = { "foo" = "foo_renamed"; }; + }; }; brotliCrates = (callPackage ./brotli-crates.nix {}); in lib.mapAttrs (key: value: mkTest (value // lib.optionalAttrs (!value?crateName) { crateName = key; })) cases // { diff --git a/pkgs/build-support/rust/cargo-vendor/cargo-vendor.nix b/pkgs/build-support/rust/cargo-vendor/cargo-vendor.nix deleted file mode 100644 index 9af5cbe652c3..000000000000 --- a/pkgs/build-support/rust/cargo-vendor/cargo-vendor.nix +++ /dev/null @@ -1,693 +0,0 @@ -# Generated by carnix 0.10.0: carnix generate-nix --src . -{ lib, buildPlatform, buildRustCrate, buildRustCrateHelpers, cratesIO, fetchgit }: -with buildRustCrateHelpers; -let inherit (lib.lists) fold; - inherit (lib.attrsets) recursiveUpdate; -in -rec { - crates = cratesIO // rec { -# cargo-vendor-0.1.23 - - crates.cargo_vendor."0.1.23" = deps: { features?(features_.cargo_vendor."0.1.23" deps {}) }: buildRustCrate { - crateName = "cargo-vendor"; - version = "0.1.23"; - description = "A Cargo subcommand to vendor all crates.io dependencies onto the local\nfilesystem.\n"; - authors = [ "Alex Crichton <alex@alexcrichton.com>" ]; - edition = "2018"; - src = exclude [ ".git" "target" ] ./.; - dependencies = mapFeatures features ([ - (cratesIO.crates."cargo"."${deps."cargo_vendor"."0.1.23"."cargo"}" deps) - (cratesIO.crates."docopt"."${deps."cargo_vendor"."0.1.23"."docopt"}" deps) - (cratesIO.crates."env_logger"."${deps."cargo_vendor"."0.1.23"."env_logger"}" deps) - (cratesIO.crates."failure"."${deps."cargo_vendor"."0.1.23"."failure"}" deps) - (cratesIO.crates."serde"."${deps."cargo_vendor"."0.1.23"."serde"}" deps) - (cratesIO.crates."serde_json"."${deps."cargo_vendor"."0.1.23"."serde_json"}" deps) - (cratesIO.crates."toml"."${deps."cargo_vendor"."0.1.23"."toml"}" deps) - ] - ++ (if features.cargo_vendor."0.1.23".openssl or false then [ (cratesIO.crates.openssl."${deps."cargo_vendor"."0.1.23".openssl}" deps) ] else [])); - features = mkFeatures (features."cargo_vendor"."0.1.23" or {}); - }; - features_.cargo_vendor."0.1.23" = deps: f: updateFeatures f (rec { - cargo."${deps.cargo_vendor."0.1.23".cargo}".default = true; - cargo_vendor."0.1.23".default = (f.cargo_vendor."0.1.23".default or true); - docopt."${deps.cargo_vendor."0.1.23".docopt}".default = true; - env_logger."${deps.cargo_vendor."0.1.23".env_logger}".default = true; - failure."${deps.cargo_vendor."0.1.23".failure}".default = true; - openssl = fold recursiveUpdate {} [ - { "${deps.cargo_vendor."0.1.23".openssl}"."vendored" = - (f.openssl."${deps.cargo_vendor."0.1.23".openssl}"."vendored" or false) || - (cargo_vendor."0.1.23"."vendored-openssl" or false) || - (f."cargo_vendor"."0.1.23"."vendored-openssl" or false); } - { "${deps.cargo_vendor."0.1.23".openssl}".default = true; } - ]; - serde = fold recursiveUpdate {} [ - { "${deps.cargo_vendor."0.1.23".serde}"."derive" = true; } - { "${deps.cargo_vendor."0.1.23".serde}".default = true; } - ]; - serde_json."${deps.cargo_vendor."0.1.23".serde_json}".default = true; - toml."${deps.cargo_vendor."0.1.23".toml}".default = true; - }) [ - (cratesIO.features_.cargo."${deps."cargo_vendor"."0.1.23"."cargo"}" deps) - (cratesIO.features_.docopt."${deps."cargo_vendor"."0.1.23"."docopt"}" deps) - (cratesIO.features_.env_logger."${deps."cargo_vendor"."0.1.23"."env_logger"}" deps) - (cratesIO.features_.failure."${deps."cargo_vendor"."0.1.23"."failure"}" deps) - (cratesIO.features_.openssl."${deps."cargo_vendor"."0.1.23"."openssl"}" deps) - (cratesIO.features_.serde."${deps."cargo_vendor"."0.1.23"."serde"}" deps) - (cratesIO.features_.serde_json."${deps."cargo_vendor"."0.1.23"."serde_json"}" deps) - (cratesIO.features_.toml."${deps."cargo_vendor"."0.1.23"."toml"}" deps) - ]; - - -# end - - }; - - cargo_vendor = crates.crates.cargo_vendor."0.1.23" deps; - __all = [ (cargo_vendor {}) ]; - deps.adler32."1.0.3" = {}; - deps.aho_corasick."0.7.3" = { - memchr = "2.2.0"; - }; - deps.ansi_term."0.11.0" = { - winapi = "0.3.7"; - }; - deps.atty."0.2.11" = { - termion = "1.5.1"; - libc = "0.2.51"; - winapi = "0.3.7"; - }; - deps.autocfg."0.1.2" = {}; - deps.backtrace."0.3.15" = { - cfg_if = "0.1.7"; - rustc_demangle = "0.1.14"; - autocfg = "0.1.2"; - backtrace_sys = "0.1.28"; - libc = "0.2.51"; - winapi = "0.3.7"; - }; - deps.backtrace_sys."0.1.28" = { - libc = "0.2.51"; - cc = "1.0.35"; - }; - deps.bitflags."1.0.4" = {}; - deps.bstr."0.1.2" = { - memchr = "2.2.0"; - }; - deps.build_const."0.2.1" = {}; - deps.byteorder."1.3.1" = {}; - deps.bytes."0.4.12" = { - byteorder = "1.3.1"; - iovec = "0.1.2"; - }; - deps.bytesize."1.0.0" = {}; - deps.cargo."0.35.0" = { - atty = "0.2.11"; - byteorder = "1.3.1"; - bytesize = "1.0.0"; - clap = "2.33.0"; - crates_io = "0.23.0"; - crossbeam_utils = "0.6.5"; - crypto_hash = "0.3.3"; - curl = "0.4.21"; - curl_sys = "0.4.18"; - env_logger = "0.6.1"; - failure = "0.1.5"; - filetime = "0.2.4"; - flate2 = "1.0.7"; - fs2 = "0.4.3"; - git2 = "0.8.0"; - git2_curl = "0.9.0"; - glob = "0.2.11"; - hex = "0.3.2"; - home = "0.3.4"; - ignore = "0.4.7"; - im_rc = "12.3.4"; - jobserver = "0.1.13"; - lazy_static = "1.3.0"; - lazycell = "1.2.1"; - libc = "0.2.51"; - libgit2_sys = "0.7.11"; - log = "0.4.6"; - num_cpus = "1.10.0"; - opener = "0.3.2"; - rustc_workspace_hack = "1.0.0"; - rustfix = "0.4.5"; - same_file = "1.0.4"; - semver = "0.9.0"; - serde = "1.0.90"; - serde_ignored = "0.0.4"; - serde_json = "1.0.39"; - shell_escape = "0.1.4"; - tar = "0.4.22"; - tempfile = "3.0.7"; - termcolor = "1.0.4"; - toml = "0.4.10"; - unicode_width = "0.1.5"; - url = "1.7.2"; - url_serde = "0.2.0"; - core_foundation = "0.6.4"; - fwdansi = "1.0.1"; - miow = "0.3.3"; - winapi = "0.3.7"; - }; - deps.cargo_vendor."0.1.23" = { - cargo = "0.35.0"; - docopt = "1.1.0"; - env_logger = "0.6.1"; - failure = "0.1.5"; - openssl = "0.10.20"; - serde = "1.0.90"; - serde_json = "1.0.39"; - toml = "0.5.0"; - }; - deps.cc."1.0.35" = {}; - deps.cfg_if."0.1.7" = {}; - deps.clap."2.33.0" = { - atty = "0.2.11"; - bitflags = "1.0.4"; - strsim = "0.8.0"; - textwrap = "0.11.0"; - unicode_width = "0.1.5"; - vec_map = "0.8.1"; - ansi_term = "0.11.0"; - }; - deps.cloudabi."0.0.3" = { - bitflags = "1.0.4"; - }; - deps.commoncrypto."0.2.0" = { - commoncrypto_sys = "0.2.0"; - }; - deps.commoncrypto_sys."0.2.0" = { - libc = "0.2.51"; - }; - deps.core_foundation."0.6.4" = { - core_foundation_sys = "0.6.2"; - libc = "0.2.51"; - }; - deps.core_foundation_sys."0.6.2" = {}; - deps.crates_io."0.23.0" = { - curl = "0.4.21"; - failure = "0.1.5"; - http = "0.1.17"; - serde = "1.0.90"; - serde_derive = "1.0.90"; - serde_json = "1.0.39"; - url = "1.7.2"; - }; - deps.crc."1.8.1" = { - build_const = "0.2.1"; - }; - deps.crc32fast."1.2.0" = { - cfg_if = "0.1.7"; - }; - deps.crossbeam_channel."0.3.8" = { - crossbeam_utils = "0.6.5"; - smallvec = "0.6.9"; - }; - deps.crossbeam_utils."0.6.5" = { - cfg_if = "0.1.7"; - lazy_static = "1.3.0"; - }; - deps.crypto_hash."0.3.3" = { - hex = "0.3.2"; - commoncrypto = "0.2.0"; - openssl = "0.10.20"; - winapi = "0.3.7"; - }; - deps.curl."0.4.21" = { - curl_sys = "0.4.18"; - libc = "0.2.51"; - socket2 = "0.3.8"; - openssl_probe = "0.1.2"; - openssl_sys = "0.9.43"; - kernel32_sys = "0.2.2"; - schannel = "0.1.15"; - winapi = "0.2.8"; - }; - deps.curl_sys."0.4.18" = { - libc = "0.2.51"; - libnghttp2_sys = "0.1.1"; - libz_sys = "1.0.25"; - cc = "1.0.35"; - pkg_config = "0.3.14"; - openssl_sys = "0.9.43"; - winapi = "0.3.7"; - }; - deps.docopt."1.1.0" = { - lazy_static = "1.3.0"; - regex = "1.1.6"; - serde = "1.0.90"; - strsim = "0.9.1"; - }; - deps.either."1.5.2" = {}; - deps.env_logger."0.6.1" = { - atty = "0.2.11"; - humantime = "1.2.0"; - log = "0.4.6"; - regex = "1.1.6"; - termcolor = "1.0.4"; - }; - deps.failure."0.1.5" = { - backtrace = "0.3.15"; - failure_derive = "0.1.5"; - }; - deps.failure_derive."0.1.5" = { - proc_macro2 = "0.4.27"; - quote = "0.6.12"; - syn = "0.15.32"; - synstructure = "0.10.1"; - }; - deps.filetime."0.2.4" = { - cfg_if = "0.1.7"; - redox_syscall = "0.1.54"; - libc = "0.2.51"; - }; - deps.flate2."1.0.7" = { - crc32fast = "1.2.0"; - libc = "0.2.51"; - libz_sys = "1.0.25"; - miniz_sys = "0.1.11"; - miniz_oxide_c_api = "0.2.1"; - }; - deps.fnv."1.0.6" = {}; - deps.foreign_types."0.3.2" = { - foreign_types_shared = "0.1.1"; - }; - deps.foreign_types_shared."0.1.1" = {}; - deps.fs2."0.4.3" = { - libc = "0.2.51"; - winapi = "0.3.7"; - }; - deps.fuchsia_cprng."0.1.1" = {}; - deps.fwdansi."1.0.1" = { - memchr = "2.2.0"; - termcolor = "1.0.4"; - }; - deps.git2."0.8.0" = { - bitflags = "1.0.4"; - libc = "0.2.51"; - libgit2_sys = "0.7.11"; - log = "0.4.6"; - url = "1.7.2"; - openssl_probe = "0.1.2"; - openssl_sys = "0.9.43"; - }; - deps.git2_curl."0.9.0" = { - curl = "0.4.21"; - git2 = "0.8.0"; - log = "0.4.6"; - url = "1.7.2"; - }; - deps.glob."0.2.11" = {}; - deps.globset."0.4.3" = { - aho_corasick = "0.7.3"; - bstr = "0.1.2"; - fnv = "1.0.6"; - log = "0.4.6"; - regex = "1.1.6"; - }; - deps.hashbrown."0.1.8" = { - byteorder = "1.3.1"; - scopeguard = "0.3.3"; - }; - deps.hex."0.3.2" = {}; - deps.home."0.3.4" = { - scopeguard = "0.3.3"; - winapi = "0.3.7"; - }; - deps.http."0.1.17" = { - bytes = "0.4.12"; - fnv = "1.0.6"; - itoa = "0.4.3"; - }; - deps.humantime."1.2.0" = { - quick_error = "1.2.2"; - }; - deps.idna."0.1.5" = { - matches = "0.1.8"; - unicode_bidi = "0.3.4"; - unicode_normalization = "0.1.8"; - }; - deps.ignore."0.4.7" = { - crossbeam_channel = "0.3.8"; - globset = "0.4.3"; - lazy_static = "1.3.0"; - log = "0.4.6"; - memchr = "2.2.0"; - regex = "1.1.6"; - same_file = "1.0.4"; - thread_local = "0.3.6"; - walkdir = "2.2.7"; - winapi_util = "0.1.2"; - }; - deps.im_rc."12.3.4" = { - sized_chunks = "0.1.3"; - typenum = "1.10.0"; - rustc_version = "0.2.3"; - }; - deps.iovec."0.1.2" = { - libc = "0.2.51"; - winapi = "0.2.8"; - }; - deps.itertools."0.7.11" = { - either = "1.5.2"; - }; - deps.itoa."0.4.3" = {}; - deps.jobserver."0.1.13" = { - log = "0.4.6"; - libc = "0.2.51"; - rand = "0.6.5"; - }; - deps.kernel32_sys."0.2.2" = { - winapi = "0.2.8"; - winapi_build = "0.1.1"; - }; - deps.lazy_static."1.3.0" = {}; - deps.lazycell."1.2.1" = {}; - deps.libc."0.2.51" = {}; - deps.libgit2_sys."0.7.11" = { - curl_sys = "0.4.18"; - libc = "0.2.51"; - libssh2_sys = "0.2.11"; - libz_sys = "1.0.25"; - cc = "1.0.35"; - pkg_config = "0.3.14"; - openssl_sys = "0.9.43"; - }; - deps.libnghttp2_sys."0.1.1" = { - libc = "0.2.51"; - cc = "1.0.35"; - }; - deps.libssh2_sys."0.2.11" = { - libc = "0.2.51"; - libz_sys = "1.0.25"; - cc = "1.0.35"; - pkg_config = "0.3.14"; - openssl_sys = "0.9.43"; - }; - deps.libz_sys."1.0.25" = { - libc = "0.2.51"; - cc = "1.0.35"; - pkg_config = "0.3.14"; - }; - deps.lock_api."0.1.5" = { - scopeguard = "0.3.3"; - }; - deps.log."0.4.6" = { - cfg_if = "0.1.7"; - }; - deps.matches."0.1.8" = {}; - deps.matrixmultiply."0.1.15" = { - rawpointer = "0.1.0"; - }; - deps.memchr."2.2.0" = {}; - deps.miniz_sys."0.1.11" = { - libc = "0.2.51"; - cc = "1.0.35"; - }; - deps.miniz_oxide."0.2.1" = { - adler32 = "1.0.3"; - }; - deps.miniz_oxide_c_api."0.2.1" = { - crc = "1.8.1"; - libc = "0.2.51"; - miniz_oxide = "0.2.1"; - cc = "1.0.35"; - }; - deps.miow."0.3.3" = { - socket2 = "0.3.8"; - winapi = "0.3.7"; - }; - deps.ndarray."0.12.1" = { - itertools = "0.7.11"; - matrixmultiply = "0.1.15"; - num_complex = "0.2.1"; - num_traits = "0.2.6"; - }; - deps.num_complex."0.2.1" = { - num_traits = "0.2.6"; - }; - deps.num_traits."0.2.6" = {}; - deps.num_cpus."1.10.0" = { - libc = "0.2.51"; - }; - deps.once_cell."0.1.8" = { - parking_lot = "0.7.1"; - }; - deps.opener."0.3.2" = { - failure = "0.1.5"; - failure_derive = "0.1.5"; - winapi = "0.3.7"; - }; - deps.openssl."0.10.20" = { - bitflags = "1.0.4"; - cfg_if = "0.1.7"; - foreign_types = "0.3.2"; - lazy_static = "1.3.0"; - libc = "0.2.51"; - openssl_sys = "0.9.43"; - }; - deps.openssl_probe."0.1.2" = {}; - deps.openssl_src."111.2.1+1.1.1b" = { - cc = "1.0.35"; - }; - deps.openssl_sys."0.9.43" = { - libc = "0.2.51"; - cc = "1.0.35"; - openssl_src = "111.2.1+1.1.1b"; - pkg_config = "0.3.14"; - rustc_version = "0.2.3"; - }; - deps.parking_lot."0.7.1" = { - lock_api = "0.1.5"; - parking_lot_core = "0.4.0"; - }; - deps.parking_lot_core."0.4.0" = { - rand = "0.6.5"; - smallvec = "0.6.9"; - rustc_version = "0.2.3"; - libc = "0.2.51"; - winapi = "0.3.7"; - }; - deps.percent_encoding."1.0.1" = {}; - deps.pkg_config."0.3.14" = {}; - deps.proc_macro2."0.4.27" = { - unicode_xid = "0.1.0"; - }; - deps.quick_error."1.2.2" = {}; - deps.quote."0.6.12" = { - proc_macro2 = "0.4.27"; - }; - deps.rand."0.6.5" = { - rand_chacha = "0.1.1"; - rand_core = "0.4.0"; - rand_hc = "0.1.0"; - rand_isaac = "0.1.1"; - rand_jitter = "0.1.3"; - rand_os = "0.1.3"; - rand_pcg = "0.1.2"; - rand_xorshift = "0.1.1"; - autocfg = "0.1.2"; - libc = "0.2.51"; - winapi = "0.3.7"; - }; - deps.rand_chacha."0.1.1" = { - rand_core = "0.3.1"; - autocfg = "0.1.2"; - }; - deps.rand_core."0.3.1" = { - rand_core = "0.4.0"; - }; - deps.rand_core."0.4.0" = {}; - deps.rand_hc."0.1.0" = { - rand_core = "0.3.1"; - }; - deps.rand_isaac."0.1.1" = { - rand_core = "0.3.1"; - }; - deps.rand_jitter."0.1.3" = { - rand_core = "0.4.0"; - libc = "0.2.51"; - winapi = "0.3.7"; - }; - deps.rand_os."0.1.3" = { - rand_core = "0.4.0"; - rdrand = "0.4.0"; - cloudabi = "0.0.3"; - fuchsia_cprng = "0.1.1"; - libc = "0.2.51"; - winapi = "0.3.7"; - }; - deps.rand_pcg."0.1.2" = { - rand_core = "0.4.0"; - autocfg = "0.1.2"; - }; - deps.rand_xorshift."0.1.1" = { - rand_core = "0.3.1"; - }; - deps.rawpointer."0.1.0" = {}; - deps.rdrand."0.4.0" = { - rand_core = "0.3.1"; - }; - deps.redox_syscall."0.1.54" = {}; - deps.redox_termios."0.1.1" = { - redox_syscall = "0.1.54"; - }; - deps.regex."1.1.6" = { - aho_corasick = "0.7.3"; - memchr = "2.2.0"; - regex_syntax = "0.6.6"; - thread_local = "0.3.6"; - utf8_ranges = "1.0.2"; - }; - deps.regex_syntax."0.6.6" = { - ucd_util = "0.1.3"; - }; - deps.remove_dir_all."0.5.1" = { - winapi = "0.3.7"; - }; - deps.rustc_demangle."0.1.14" = {}; - deps.rustc_workspace_hack."1.0.0" = {}; - deps.rustc_version."0.2.3" = { - semver = "0.9.0"; - }; - deps.rustfix."0.4.5" = { - failure = "0.1.5"; - log = "0.4.6"; - serde = "1.0.90"; - serde_derive = "1.0.90"; - serde_json = "1.0.39"; - }; - deps.ryu."0.2.7" = {}; - deps.same_file."1.0.4" = { - winapi_util = "0.1.2"; - }; - deps.schannel."0.1.15" = { - lazy_static = "1.3.0"; - winapi = "0.3.7"; - }; - deps.scopeguard."0.3.3" = {}; - deps.semver."0.9.0" = { - semver_parser = "0.7.0"; - serde = "1.0.90"; - }; - deps.semver_parser."0.7.0" = {}; - deps.serde."1.0.90" = { - serde_derive = "1.0.90"; - }; - deps.serde_derive."1.0.90" = { - proc_macro2 = "0.4.27"; - quote = "0.6.12"; - syn = "0.15.32"; - }; - deps.serde_ignored."0.0.4" = { - serde = "1.0.90"; - }; - deps.serde_json."1.0.39" = { - itoa = "0.4.3"; - ryu = "0.2.7"; - serde = "1.0.90"; - }; - deps.shell_escape."0.1.4" = {}; - deps.sized_chunks."0.1.3" = { - typenum = "1.10.0"; - }; - deps.smallvec."0.6.9" = {}; - deps.socket2."0.3.8" = { - cfg_if = "0.1.7"; - libc = "0.2.51"; - redox_syscall = "0.1.54"; - winapi = "0.3.7"; - }; - deps.strsim."0.8.0" = {}; - deps.strsim."0.9.1" = { - hashbrown = "0.1.8"; - ndarray = "0.12.1"; - }; - deps.syn."0.15.32" = { - proc_macro2 = "0.4.27"; - quote = "0.6.12"; - unicode_xid = "0.1.0"; - }; - deps.synstructure."0.10.1" = { - proc_macro2 = "0.4.27"; - quote = "0.6.12"; - syn = "0.15.32"; - unicode_xid = "0.1.0"; - }; - deps.tar."0.4.22" = { - filetime = "0.2.4"; - redox_syscall = "0.1.54"; - libc = "0.2.51"; - }; - deps.tempfile."3.0.7" = { - cfg_if = "0.1.7"; - rand = "0.6.5"; - remove_dir_all = "0.5.1"; - redox_syscall = "0.1.54"; - libc = "0.2.51"; - winapi = "0.3.7"; - }; - deps.termcolor."1.0.4" = { - wincolor = "1.0.1"; - }; - deps.termion."1.5.1" = { - libc = "0.2.51"; - redox_syscall = "0.1.54"; - redox_termios = "0.1.1"; - }; - deps.textwrap."0.11.0" = { - unicode_width = "0.1.5"; - }; - deps.thread_local."0.3.6" = { - lazy_static = "1.3.0"; - }; - deps.toml."0.4.10" = { - serde = "1.0.90"; - }; - deps.toml."0.5.0" = { - serde = "1.0.90"; - }; - deps.typenum."1.10.0" = {}; - deps.ucd_util."0.1.3" = {}; - deps.unicode_bidi."0.3.4" = { - matches = "0.1.8"; - }; - deps.unicode_normalization."0.1.8" = { - smallvec = "0.6.9"; - }; - 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.url_serde."0.2.0" = { - serde = "1.0.90"; - url = "1.7.2"; - }; - deps.utf8_ranges."1.0.2" = {}; - deps.vcpkg."0.2.6" = {}; - deps.vec_map."0.8.1" = {}; - deps.walkdir."2.2.7" = { - same_file = "1.0.4"; - winapi = "0.3.7"; - winapi_util = "0.1.2"; - }; - deps.winapi."0.2.8" = {}; - deps.winapi."0.3.7" = { - winapi_i686_pc_windows_gnu = "0.4.0"; - winapi_x86_64_pc_windows_gnu = "0.4.0"; - }; - deps.winapi_build."0.1.1" = {}; - deps.winapi_i686_pc_windows_gnu."0.4.0" = {}; - deps.winapi_util."0.1.2" = { - winapi = "0.3.7"; - }; - deps.winapi_x86_64_pc_windows_gnu."0.4.0" = {}; - deps.wincolor."1.0.1" = { - winapi = "0.3.7"; - winapi_util = "0.1.2"; - }; -} diff --git a/pkgs/build-support/rust/cargo-vendor/default.nix b/pkgs/build-support/rust/cargo-vendor/default.nix deleted file mode 100644 index f252c6a6cb1f..000000000000 --- a/pkgs/build-support/rust/cargo-vendor/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ callPackage, fetchFromGitHub }: - -((callPackage ./cargo-vendor.nix {}).cargo_vendor {}).overrideAttrs (attrs: { - src = fetchFromGitHub { - owner = "alexcrichton"; - repo = "cargo-vendor"; - rev = "9355661303ce2870d68a69d99953fce22581e31e"; - sha256 = "0d4j3r09am3ynwhczimzv39264f5xz37jxa9js123y46w5by3wd2"; - }; -}) diff --git a/pkgs/build-support/rust/crates-io.nix b/pkgs/build-support/rust/crates-io.nix index 9dd2da28ad5b..66f98cd99121 100644 --- a/pkgs/build-support/rust/crates-io.nix +++ b/pkgs/build-support/rust/crates-io.nix @@ -19,7 +19,7 @@ rec { (crates."memchr"."${deps."aho_corasick"."0.6.10"."memchr"}" deps) ]); }; - features_.aho_corasick."0.6.10" = deps: f: updateFeatures f (rec { + features_.aho_corasick."0.6.10" = deps: f: updateFeatures f ({ aho_corasick."0.6.10".default = (f.aho_corasick."0.6.10".default or true); memchr."${deps.aho_corasick."0.6.10".memchr}".default = true; }) [ @@ -42,7 +42,7 @@ rec { (crates."memchr"."${deps."aho_corasick"."0.6.8"."memchr"}" deps) ]); }; - features_.aho_corasick."0.6.8" = deps: f: updateFeatures f (rec { + features_.aho_corasick."0.6.8" = deps: f: updateFeatures f ({ aho_corasick."0.6.8".default = (f.aho_corasick."0.6.8".default or true); memchr."${deps.aho_corasick."0.6.8".memchr}".default = true; }) [ @@ -62,7 +62,7 @@ rec { (crates."winapi"."${deps."ansi_term"."0.11.0"."winapi"}" deps) ]) else []); }; - features_.ansi_term."0.11.0" = deps: f: updateFeatures f (rec { + features_.ansi_term."0.11.0" = deps: f: updateFeatures f ({ ansi_term."0.11.0".default = (f.ansi_term."0.11.0".default or true); winapi = fold recursiveUpdate {} [ { "${deps.ansi_term."0.11.0".winapi}"."consoleapi" = true; } @@ -186,7 +186,7 @@ rec { (crates."winapi"."${deps."atty"."0.2.11"."winapi"}" deps) ]) else []); }; - features_.atty."0.2.11" = deps: f: updateFeatures f (rec { + features_.atty."0.2.11" = deps: f: updateFeatures f ({ atty."0.2.11".default = (f.atty."0.2.11".default or true); libc."${deps.atty."0.2.11".libc}".default = (f.libc."${deps.atty."0.2.11".libc}".default or false); termion."${deps.atty."0.2.11".termion}".default = true; @@ -215,7 +215,7 @@ rec { authors = [ "Josh Stone <cuviper@gmail.com>" ]; sha256 = "0dv81dwnp1al3j4ffz007yrjv4w1c7hw09gnf0xs3icxiw6qqfs3"; }; - features_.autocfg."0.1.2" = deps: f: updateFeatures f (rec { + features_.autocfg."0.1.2" = deps: f: updateFeatures f ({ autocfg."0.1.2".default = (f.autocfg."0.1.2".default or true); }) []; @@ -461,7 +461,7 @@ rec { (crates."cc"."${deps."backtrace_sys"."0.1.24"."cc"}" deps) ]); }; - features_.backtrace_sys."0.1.24" = deps: f: updateFeatures f (rec { + features_.backtrace_sys."0.1.24" = deps: f: updateFeatures f ({ backtrace_sys."0.1.24".default = (f.backtrace_sys."0.1.24".default or true); cc."${deps.backtrace_sys."0.1.24".cc}".default = true; libc."${deps.backtrace_sys."0.1.24".libc}".default = true; @@ -489,7 +489,7 @@ rec { (crates."cc"."${deps."backtrace_sys"."0.1.28"."cc"}" deps) ]); }; - features_.backtrace_sys."0.1.28" = deps: f: updateFeatures f (rec { + features_.backtrace_sys."0.1.28" = deps: f: updateFeatures f ({ backtrace_sys."0.1.28".default = (f.backtrace_sys."0.1.28".default or true); cc."${deps.backtrace_sys."0.1.28".cc}".default = true; libc."${deps.backtrace_sys."0.1.28".libc}".default = (f.libc."${deps.backtrace_sys."0.1.28".libc}".default or false); @@ -509,7 +509,7 @@ rec { sha256 = "1g1wmz2001qmfrd37dnd5qiss5njrw26aywmg6yhkmkbyrhjxb08"; features = mkFeatures (features."bitflags"."1.0.4" or {}); }; - features_.bitflags."1.0.4" = deps: f: updateFeatures f (rec { + features_.bitflags."1.0.4" = deps: f: updateFeatures f ({ bitflags."1.0.4".default = (f.bitflags."1.0.4".default or true); }) []; @@ -582,7 +582,7 @@ rec { (crates."url"."${deps."carnix"."0.10.0"."url"}" deps) ]); }; - features_.carnix."0.10.0" = deps: f: updateFeatures f (rec { + features_.carnix."0.10.0" = deps: f: updateFeatures f ({ carnix."0.10.0".default = (f.carnix."0.10.0".default or true); clap."${deps.carnix."0.10.0".clap}".default = true; dirs."${deps.carnix."0.10.0".dirs}".default = true; @@ -645,7 +645,7 @@ rec { (crates."toml"."${deps."carnix"."0.9.1"."toml"}" deps) ]); }; - features_.carnix."0.9.1" = deps: f: updateFeatures f (rec { + features_.carnix."0.9.1" = deps: f: updateFeatures f ({ 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; @@ -704,7 +704,7 @@ rec { (crates."toml"."${deps."carnix"."0.9.2"."toml"}" deps) ]); }; - features_.carnix."0.9.2" = deps: f: updateFeatures f (rec { + features_.carnix."0.9.2" = deps: f: updateFeatures f ({ carnix."0.9.2".default = (f.carnix."0.9.2".default or true); clap."${deps.carnix."0.9.2".clap}".default = true; dirs."${deps.carnix."0.9.2".dirs}".default = true; @@ -764,7 +764,7 @@ rec { (crates."url"."${deps."carnix"."0.9.8"."url"}" deps) ]); }; - features_.carnix."0.9.8" = deps: f: updateFeatures f (rec { + features_.carnix."0.9.8" = deps: f: updateFeatures f ({ 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; @@ -854,7 +854,7 @@ rec { authors = [ "Alex Crichton <alex@alexcrichton.com>" ]; sha256 = "11qrix06wagkplyk908i3423ps9m9np6c4vbcq81s9fyl244xv3n"; }; - features_.cfg_if."0.1.6" = deps: f: updateFeatures f (rec { + features_.cfg_if."0.1.6" = deps: f: updateFeatures f ({ cfg_if."0.1.6".default = (f.cfg_if."0.1.6".default or true); }) []; @@ -869,7 +869,7 @@ rec { authors = [ "Alex Crichton <alex@alexcrichton.com>" ]; sha256 = "13gvcx1dxjq4mpmpj26hpg3yc97qffkx2zi58ykr1dwr8q2biiig"; }; - features_.cfg_if."0.1.7" = deps: f: updateFeatures f (rec { + features_.cfg_if."0.1.7" = deps: f: updateFeatures f ({ cfg_if."0.1.7".default = (f.cfg_if."0.1.7".default or true); }) []; @@ -1001,7 +1001,7 @@ rec { authors = [ "Cesar Eduardo Barros <cesarb@cesarb.eti.br>" ]; sha256 = "03qri9hjf049gwqg9q527lybpg918q6y5q4g9a5lma753nff49wd"; }; - features_.constant_time_eq."0.1.3" = deps: f: updateFeatures f (rec { + features_.constant_time_eq."0.1.3" = deps: f: updateFeatures f ({ constant_time_eq."0.1.3".default = (f.constant_time_eq."0.1.3".default or true); }) []; @@ -1024,7 +1024,7 @@ rec { (crates."winapi"."${deps."dirs"."1.0.4"."winapi"}" deps) ]) else []); }; - features_.dirs."1.0.4" = deps: f: updateFeatures f (rec { + features_.dirs."1.0.4" = deps: f: updateFeatures f ({ dirs."1.0.4".default = (f.dirs."1.0.4".default or true); libc."${deps.dirs."1.0.4".libc}".default = true; redox_users."${deps.dirs."1.0.4".redox_users}".default = true; @@ -1062,7 +1062,7 @@ rec { (crates."winapi"."${deps."dirs"."1.0.5"."winapi"}" deps) ]) else []); }; - features_.dirs."1.0.5" = deps: f: updateFeatures f (rec { + features_.dirs."1.0.5" = deps: f: updateFeatures f ({ dirs."1.0.5".default = (f.dirs."1.0.5".default or true); libc."${deps.dirs."1.0.5".libc}".default = true; redox_users."${deps.dirs."1.0.5".redox_users}".default = true; @@ -1359,7 +1359,7 @@ rec { ]); features = mkFeatures (features."failure_derive"."0.1.3" or {}); }; - features_.failure_derive."0.1.3" = deps: f: updateFeatures f (rec { + features_.failure_derive."0.1.3" = deps: f: updateFeatures f ({ failure_derive."0.1.3".default = (f.failure_derive."0.1.3".default or true); proc_macro2."${deps.failure_derive."0.1.3".proc_macro2}".default = true; quote."${deps.failure_derive."0.1.3".quote}".default = true; @@ -1392,7 +1392,7 @@ rec { ]); features = mkFeatures (features."failure_derive"."0.1.5" or {}); }; - features_.failure_derive."0.1.5" = deps: f: updateFeatures f (rec { + features_.failure_derive."0.1.5" = deps: f: updateFeatures f ({ failure_derive."0.1.5".default = (f.failure_derive."0.1.5".default or true); proc_macro2."${deps.failure_derive."0.1.5".proc_macro2}".default = true; quote."${deps.failure_derive."0.1.5".quote}".default = true; @@ -1417,7 +1417,7 @@ rec { edition = "2018"; sha256 = "07apwv9dj716yjlcj29p94vkqn5zmfh7hlrqvrjx3wzshphc95h9"; }; - features_.fuchsia_cprng."0.1.1" = deps: f: updateFeatures f (rec { + features_.fuchsia_cprng."0.1.1" = deps: f: updateFeatures f ({ fuchsia_cprng."0.1.1".default = (f.fuchsia_cprng."0.1.1".default or true); }) []; @@ -1435,7 +1435,7 @@ rec { (crates."fuchsia_zircon_sys"."${deps."fuchsia_zircon"."0.3.3"."fuchsia_zircon_sys"}" deps) ]); }; - features_.fuchsia_zircon."0.3.3" = deps: f: updateFeatures f (rec { + features_.fuchsia_zircon."0.3.3" = deps: f: updateFeatures f ({ bitflags."${deps.fuchsia_zircon."0.3.3".bitflags}".default = true; fuchsia_zircon."0.3.3".default = (f.fuchsia_zircon."0.3.3".default or true); fuchsia_zircon_sys."${deps.fuchsia_zircon."0.3.3".fuchsia_zircon_sys}".default = true; @@ -1454,7 +1454,7 @@ rec { authors = [ "Raph Levien <raph@google.com>" ]; sha256 = "08jp1zxrm9jbrr6l26bjal4dbm8bxfy57ickdgibsqxr1n9j3hf5"; }; - features_.fuchsia_zircon_sys."0.3.3" = deps: f: updateFeatures f (rec { + features_.fuchsia_zircon_sys."0.3.3" = deps: f: updateFeatures f ({ fuchsia_zircon_sys."0.3.3".default = (f.fuchsia_zircon_sys."0.3.3".default or true); }) []; @@ -1472,7 +1472,7 @@ rec { (crates."quick_error"."${deps."humantime"."1.1.1"."quick_error"}" deps) ]); }; - features_.humantime."1.1.1" = deps: f: updateFeatures f (rec { + features_.humantime."1.1.1" = deps: f: updateFeatures f ({ humantime."1.1.1".default = (f.humantime."1.1.1".default or true); quick_error."${deps.humantime."1.1.1".quick_error}".default = true; }) [ @@ -1494,7 +1494,7 @@ rec { (crates."quick_error"."${deps."humantime"."1.2.0"."quick_error"}" deps) ]); }; - features_.humantime."1.2.0" = deps: f: updateFeatures f (rec { + features_.humantime."1.2.0" = deps: f: updateFeatures f ({ humantime."1.2.0".default = (f.humantime."1.2.0".default or true); quick_error."${deps.humantime."1.2.0".quick_error}".default = true; }) [ @@ -1516,7 +1516,7 @@ rec { (crates."unicode_normalization"."${deps."idna"."0.1.5"."unicode_normalization"}" deps) ]); }; - features_.idna."0.1.5" = deps: f: updateFeatures f (rec { + features_.idna."0.1.5" = deps: f: updateFeatures f ({ 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; @@ -1730,7 +1730,7 @@ rec { ]); features = mkFeatures (features."log"."0.4.5" or {}); }; - features_.log."0.4.5" = deps: f: updateFeatures f (rec { + features_.log."0.4.5" = deps: f: updateFeatures f ({ cfg_if."${deps.log."0.4.5".cfg_if}".default = true; log."0.4.5".default = (f.log."0.4.5".default or true); }) [ @@ -1752,7 +1752,7 @@ rec { ]); features = mkFeatures (features."log"."0.4.6" or {}); }; - features_.log."0.4.6" = deps: f: updateFeatures f (rec { + features_.log."0.4.6" = deps: f: updateFeatures f ({ cfg_if."${deps.log."0.4.6".cfg_if}".default = true; log."0.4.6".default = (f.log."0.4.6".default or true); }) [ @@ -1770,7 +1770,7 @@ rec { sha256 = "03hl636fg6xggy0a26200xs74amk3k9n0908rga2szn68agyz3cv"; libPath = "lib.rs"; }; - features_.matches."0.1.8" = deps: f: updateFeatures f (rec { + features_.matches."0.1.8" = deps: f: updateFeatures f ({ matches."0.1.8".default = (f.matches."0.1.8".default or true); }) []; @@ -2004,7 +2004,7 @@ rec { sha256 = "04ahrp7aw4ip7fmadb0bknybmkfav0kk0gw4ps3ydq5w6hr0ib5i"; libPath = "lib.rs"; }; - features_.percent_encoding."1.0.1" = deps: f: updateFeatures f (rec { + features_.percent_encoding."1.0.1" = deps: f: updateFeatures f ({ percent_encoding."1.0.1".default = (f.percent_encoding."1.0.1".default or true); }) []; @@ -2077,7 +2077,7 @@ rec { authors = [ "Paul Colomiets <paul@colomiets.name>" "Colin Kiegel <kiegel@gmx.de>" ]; sha256 = "192a3adc5phgpibgqblsdx1b421l5yg9bjbmv552qqq9f37h60k5"; }; - features_.quick_error."1.2.2" = deps: f: updateFeatures f (rec { + features_.quick_error."1.2.2" = deps: f: updateFeatures f ({ quick_error."1.2.2".default = (f.quick_error."1.2.2".default or true); }) []; @@ -2362,7 +2362,7 @@ rec { ++ (if kernel == "wasm32-unknown-unknown" then mapFeatures features ([ ]) else []); }; - features_.rand_os."0.1.3" = deps: f: updateFeatures f (rec { + features_.rand_os."0.1.3" = deps: f: updateFeatures f ({ cloudabi."${deps.rand_os."0.1.3".cloudabi}".default = true; fuchsia_cprng."${deps.rand_os."0.1.3".fuchsia_cprng}".default = true; libc."${deps.rand_os."0.1.3".libc}".default = true; @@ -2426,7 +2426,7 @@ rec { sha256 = "132rnhrq49l3z7gjrwj2zfadgw6q0355s6a7id7x7c0d7sk72611"; libName = "syscall"; }; - features_.redox_syscall."0.1.40" = deps: f: updateFeatures f (rec { + features_.redox_syscall."0.1.40" = deps: f: updateFeatures f ({ redox_syscall."0.1.40".default = (f.redox_syscall."0.1.40".default or true); }) []; @@ -2442,7 +2442,7 @@ rec { sha256 = "1a61cv7yydx64vpyvzr0z0hwzdvy4gcvcnfc6k70zpkngj5sz3ip"; libName = "syscall"; }; - features_.redox_syscall."0.1.51" = deps: f: updateFeatures f (rec { + features_.redox_syscall."0.1.51" = deps: f: updateFeatures f ({ redox_syscall."0.1.51".default = (f.redox_syscall."0.1.51".default or true); }) []; @@ -2460,7 +2460,7 @@ rec { (crates."redox_syscall"."${deps."redox_termios"."0.1.1"."redox_syscall"}" deps) ]); }; - features_.redox_termios."0.1.1" = deps: f: updateFeatures f (rec { + features_.redox_termios."0.1.1" = deps: f: updateFeatures f ({ redox_syscall."${deps.redox_termios."0.1.1".redox_syscall}".default = true; redox_termios."0.1.1".default = (f.redox_termios."0.1.1".default or true); }) [ @@ -2483,7 +2483,7 @@ rec { (crates."redox_syscall"."${deps."redox_users"."0.2.0"."redox_syscall"}" deps) ]); }; - features_.redox_users."0.2.0" = deps: f: updateFeatures f (rec { + features_.redox_users."0.2.0" = deps: f: updateFeatures f ({ argon2rs."${deps.redox_users."0.2.0".argon2rs}".default = (f.argon2rs."${deps.redox_users."0.2.0".argon2rs}".default or false); failure."${deps.redox_users."0.2.0".failure}".default = true; rand."${deps.redox_users."0.2.0".rand}".default = true; @@ -2513,7 +2513,7 @@ rec { (crates."redox_syscall"."${deps."redox_users"."0.3.0"."redox_syscall"}" deps) ]); }; - features_.redox_users."0.3.0" = deps: f: updateFeatures f (rec { + features_.redox_users."0.3.0" = deps: f: updateFeatures f ({ argon2rs."${deps.redox_users."0.3.0".argon2rs}".default = (f.argon2rs."${deps.redox_users."0.3.0".argon2rs}".default or false); failure."${deps.redox_users."0.3.0".failure}".default = true; rand_os."${deps.redox_users."0.3.0".rand_os}".default = true; @@ -2626,7 +2626,7 @@ rec { (crates."ucd_util"."${deps."regex_syntax"."0.6.2"."ucd_util"}" deps) ]); }; - features_.regex_syntax."0.6.2" = deps: f: updateFeatures f (rec { + features_.regex_syntax."0.6.2" = deps: f: updateFeatures f ({ regex_syntax."0.6.2".default = (f.regex_syntax."0.6.2".default or true); ucd_util."${deps.regex_syntax."0.6.2".ucd_util}".default = true; }) [ @@ -2647,7 +2647,7 @@ rec { (crates."ucd_util"."${deps."regex_syntax"."0.6.5"."ucd_util"}" deps) ]); }; - features_.regex_syntax."0.6.5" = deps: f: updateFeatures f (rec { + features_.regex_syntax."0.6.5" = deps: f: updateFeatures f ({ regex_syntax."0.6.5".default = (f.regex_syntax."0.6.5".default or true); ucd_util."${deps.regex_syntax."0.6.5".ucd_util}".default = true; }) [ @@ -2667,7 +2667,7 @@ rec { (crates."winapi"."${deps."remove_dir_all"."0.5.1"."winapi"}" deps) ]) else []); }; - features_.remove_dir_all."0.5.1" = deps: f: updateFeatures f (rec { + features_.remove_dir_all."0.5.1" = deps: f: updateFeatures f ({ remove_dir_all."0.5.1".default = (f.remove_dir_all."0.5.1".default or true); winapi = fold recursiveUpdate {} [ { "${deps.remove_dir_all."0.5.1".winapi}"."errhandlingapi" = true; } @@ -2692,7 +2692,7 @@ rec { authors = [ "Alex Crichton <alex@alexcrichton.com>" ]; sha256 = "0sr6cr02araqnlqwc5ghvnafjmkw11vzjswqaz757lvyrcl8xcy6"; }; - features_.rustc_demangle."0.1.13" = deps: f: updateFeatures f (rec { + features_.rustc_demangle."0.1.13" = deps: f: updateFeatures f ({ rustc_demangle."0.1.13".default = (f.rustc_demangle."0.1.13".default or true); }) []; @@ -2706,7 +2706,7 @@ rec { authors = [ "Alex Crichton <alex@alexcrichton.com>" ]; sha256 = "00ma4r9haq0zv5krps617mym6y74056pfcivyld0kpci156vfaax"; }; - features_.rustc_demangle."0.1.9" = deps: f: updateFeatures f (rec { + features_.rustc_demangle."0.1.9" = deps: f: updateFeatures f ({ rustc_demangle."0.1.9".default = (f.rustc_demangle."0.1.9".default or true); }) []; @@ -2724,7 +2724,7 @@ rec { ]); features = mkFeatures (features."ryu"."0.2.6" or {}); }; - features_.ryu."0.2.6" = deps: f: updateFeatures f (rec { + features_.ryu."0.2.6" = deps: f: updateFeatures f ({ ryu."0.2.6".default = (f.ryu."0.2.6".default or true); }) []; @@ -2743,7 +2743,7 @@ rec { ]); features = mkFeatures (features."ryu"."0.2.7" or {}); }; - features_.ryu."0.2.7" = deps: f: updateFeatures f (rec { + features_.ryu."0.2.7" = deps: f: updateFeatures f ({ ryu."0.2.7".default = (f.ryu."0.2.7".default or true); }) []; @@ -2758,7 +2758,7 @@ rec { sha256 = "1arqj2skcfr46s1lcyvnlmfr5456kg5nhn8k90xyfjnxkp5yga2v"; features = mkFeatures (features."scoped_threadpool"."0.1.9" or {}); }; - features_.scoped_threadpool."0.1.9" = deps: f: updateFeatures f (rec { + features_.scoped_threadpool."0.1.9" = deps: f: updateFeatures f ({ scoped_threadpool."0.1.9".default = (f.scoped_threadpool."0.1.9".default or true); }) []; @@ -2876,7 +2876,7 @@ rec { ]); features = mkFeatures (features."serde_derive"."1.0.80" or {}); }; - features_.serde_derive."1.0.80" = deps: f: updateFeatures f (rec { + features_.serde_derive."1.0.80" = deps: f: updateFeatures f ({ proc_macro2."${deps.serde_derive."1.0.80".proc_macro2}".default = true; quote."${deps.serde_derive."1.0.80".quote}".default = true; serde_derive."1.0.80".default = (f.serde_derive."1.0.80".default or true); @@ -2908,7 +2908,7 @@ rec { ]); features = mkFeatures (features."serde_derive"."1.0.89" or {}); }; - features_.serde_derive."1.0.89" = deps: f: updateFeatures f (rec { + features_.serde_derive."1.0.89" = deps: f: updateFeatures f ({ proc_macro2."${deps.serde_derive."1.0.89".proc_macro2}".default = true; quote."${deps.serde_derive."1.0.89".quote}".default = true; serde_derive."1.0.89".default = (f.serde_derive."1.0.89".default or true); @@ -3024,7 +3024,7 @@ rec { authors = [ "Danny Guo <dannyguo91@gmail.com>" ]; sha256 = "0fy0k5f2705z73mb3x9459bpcvrx4ky8jpr4zikcbiwan4bnm0iv"; }; - features_.strsim."0.7.0" = deps: f: updateFeatures f (rec { + features_.strsim."0.7.0" = deps: f: updateFeatures f ({ strsim."0.7.0".default = (f.strsim."0.7.0".default or true); }) []; @@ -3176,7 +3176,7 @@ rec { ]); features = mkFeatures (features."synstructure"."0.10.0" or {}); }; - features_.synstructure."0.10.0" = deps: f: updateFeatures f (rec { + features_.synstructure."0.10.0" = deps: f: updateFeatures f ({ proc_macro2."${deps.synstructure."0.10.0".proc_macro2}".default = true; quote."${deps.synstructure."0.10.0".quote}".default = true; syn = fold recursiveUpdate {} [ @@ -3211,7 +3211,7 @@ rec { ]); features = mkFeatures (features."synstructure"."0.10.1" or {}); }; - features_.synstructure."0.10.1" = deps: f: updateFeatures f (rec { + features_.synstructure."0.10.1" = deps: f: updateFeatures f ({ proc_macro2."${deps.synstructure."0.10.1".proc_macro2}".default = true; quote."${deps.synstructure."0.10.1".quote}".default = true; syn = fold recursiveUpdate {} [ @@ -3242,7 +3242,7 @@ rec { (crates."remove_dir_all"."${deps."tempdir"."0.3.7"."remove_dir_all"}" deps) ]); }; - features_.tempdir."0.3.7" = deps: f: updateFeatures f (rec { + features_.tempdir."0.3.7" = deps: f: updateFeatures f ({ rand."${deps.tempdir."0.3.7".rand}".default = true; remove_dir_all."${deps.tempdir."0.3.7".remove_dir_all}".default = true; tempdir."0.3.7".default = (f.tempdir."0.3.7".default or true); @@ -3264,7 +3264,7 @@ rec { (crates."wincolor"."${deps."termcolor"."1.0.4"."wincolor"}" deps) ]) else []); }; - features_.termcolor."1.0.4" = deps: f: updateFeatures f (rec { + features_.termcolor."1.0.4" = deps: f: updateFeatures f ({ termcolor."1.0.4".default = (f.termcolor."1.0.4".default or true); wincolor."${deps.termcolor."1.0.4".wincolor}".default = true; }) [ @@ -3288,7 +3288,7 @@ rec { (crates."redox_termios"."${deps."termion"."1.5.1"."redox_termios"}" deps) ]) else []); }; - features_.termion."1.5.1" = deps: f: updateFeatures f (rec { + features_.termion."1.5.1" = deps: f: updateFeatures f ({ libc."${deps.termion."1.5.1".libc}".default = true; redox_syscall."${deps.termion."1.5.1".redox_syscall}".default = true; redox_termios."${deps.termion."1.5.1".redox_termios}".default = true; @@ -3312,7 +3312,7 @@ rec { (crates."unicode_width"."${deps."textwrap"."0.10.0"."unicode_width"}" deps) ]); }; - features_.textwrap."0.10.0" = deps: f: updateFeatures f (rec { + features_.textwrap."0.10.0" = deps: f: updateFeatures f ({ textwrap."0.10.0".default = (f.textwrap."0.10.0".default or true); unicode_width."${deps.textwrap."0.10.0".unicode_width}".default = true; }) [ @@ -3332,7 +3332,7 @@ rec { (crates."lazy_static"."${deps."thread_local"."0.3.6"."lazy_static"}" deps) ]); }; - features_.thread_local."0.3.6" = deps: f: updateFeatures f (rec { + features_.thread_local."0.3.6" = deps: f: updateFeatures f ({ lazy_static."${deps.thread_local."0.3.6".lazy_static}".default = true; thread_local."0.3.6".default = (f.thread_local."0.3.6".default or true); }) [ @@ -3352,7 +3352,7 @@ rec { (crates."serde"."${deps."toml"."0.4.10"."serde"}" deps) ]); }; - features_.toml."0.4.10" = deps: f: updateFeatures f (rec { + features_.toml."0.4.10" = deps: f: updateFeatures f ({ serde."${deps.toml."0.4.10".serde}".default = true; toml."0.4.10".default = (f.toml."0.4.10".default or true); }) [ @@ -3372,7 +3372,7 @@ rec { (crates."serde"."${deps."toml"."0.4.8"."serde"}" deps) ]); }; - features_.toml."0.4.8" = deps: f: updateFeatures f (rec { + features_.toml."0.4.8" = deps: f: updateFeatures f ({ serde."${deps.toml."0.4.8".serde}".default = true; toml."0.4.8".default = (f.toml."0.4.8".default or true); }) [ @@ -3420,7 +3420,7 @@ rec { (crates."toml"."${deps."toml2nix"."0.1.1"."toml"}" deps) ]); }; - features_.toml2nix."0.1.1" = deps: f: updateFeatures f (rec { + features_.toml2nix."0.1.1" = deps: f: updateFeatures f ({ toml."${deps.toml2nix."0.1.1".toml}".default = true; toml2nix."0.1.1".default = (f.toml2nix."0.1.1".default or true); }) [ @@ -3437,7 +3437,7 @@ rec { authors = [ "Andrew Gallant <jamslam@gmail.com>" ]; sha256 = "02a8h3siipx52b832xc8m8rwasj6nx9jpiwfldw8hp6k205hgkn0"; }; - features_.ucd_util."0.1.1" = deps: f: updateFeatures f (rec { + features_.ucd_util."0.1.1" = deps: f: updateFeatures f ({ ucd_util."0.1.1".default = (f.ucd_util."0.1.1".default or true); }) []; @@ -3452,7 +3452,7 @@ rec { authors = [ "Andrew Gallant <jamslam@gmail.com>" ]; sha256 = "1n1qi3jywq5syq90z9qd8qzbn58pcjgv1sx4sdmipm4jf9zanz15"; }; - features_.ucd_util."0.1.3" = deps: f: updateFeatures f (rec { + features_.ucd_util."0.1.3" = deps: f: updateFeatures f ({ ucd_util."0.1.3".default = (f.ucd_util."0.1.3".default or true); }) []; @@ -3502,7 +3502,7 @@ rec { authors = [ "kwantam <kwantam@gmail.com>" ]; sha256 = "1da2hv800pd0wilmn4idwpgv5p510hjxizjcfv6xzb40xcsjd8gs"; }; - features_.unicode_normalization."0.1.7" = deps: f: updateFeatures f (rec { + features_.unicode_normalization."0.1.7" = deps: f: updateFeatures f ({ unicode_normalization."0.1.7".default = (f.unicode_normalization."0.1.7".default or true); }) []; @@ -3520,7 +3520,7 @@ rec { (crates."smallvec"."${deps."unicode_normalization"."0.1.8"."smallvec"}" deps) ]); }; - features_.unicode_normalization."0.1.8" = deps: f: updateFeatures f (rec { + features_.unicode_normalization."0.1.8" = deps: f: updateFeatures f ({ smallvec."${deps.unicode_normalization."0.1.8".smallvec}".default = true; unicode_normalization."0.1.8".default = (f.unicode_normalization."0.1.8".default or true); }) [ @@ -3538,7 +3538,7 @@ rec { sha256 = "0886lc2aymwgy0lhavwn6s48ik3c61ykzzd3za6prgnw51j7bi4w"; features = mkFeatures (features."unicode_width"."0.1.5" or {}); }; - features_.unicode_width."0.1.5" = deps: f: updateFeatures f (rec { + features_.unicode_width."0.1.5" = deps: f: updateFeatures f ({ unicode_width."0.1.5".default = (f.unicode_width."0.1.5".default or true); }) []; @@ -3553,7 +3553,7 @@ rec { sha256 = "05wdmwlfzxhq3nhsxn6wx4q8dhxzzfb9szsz6wiw092m1rjj01zj"; features = mkFeatures (features."unicode_xid"."0.1.0" or {}); }; - features_.unicode_xid."0.1.0" = deps: f: updateFeatures f (rec { + features_.unicode_xid."0.1.0" = deps: f: updateFeatures f ({ unicode_xid."0.1.0".default = (f.unicode_xid."0.1.0".default or true); }) []; @@ -3604,7 +3604,7 @@ rec { authors = [ "Andrew Gallant <jamslam@gmail.com>" ]; sha256 = "1s56ihd2c8ba6191078wivvv59247szaiszrh8x2rxqfsxlfrnpp"; }; - features_.utf8_ranges."1.0.1" = deps: f: updateFeatures f (rec { + features_.utf8_ranges."1.0.1" = deps: f: updateFeatures f ({ utf8_ranges."1.0.1".default = (f.utf8_ranges."1.0.1".default or true); }) []; @@ -3619,7 +3619,7 @@ rec { authors = [ "Andrew Gallant <jamslam@gmail.com>" ]; sha256 = "1my02laqsgnd8ib4dvjgd4rilprqjad6pb9jj9vi67csi5qs2281"; }; - features_.utf8_ranges."1.0.2" = deps: f: updateFeatures f (rec { + features_.utf8_ranges."1.0.2" = deps: f: updateFeatures f ({ utf8_ranges."1.0.2".default = (f.utf8_ranges."1.0.2".default or true); }) []; @@ -3656,7 +3656,7 @@ rec { authors = [ "Sergio Benitez <sb@sergio.bz>" ]; sha256 = "1yrx9xblmwbafw2firxyqbj8f771kkzfd24n3q7xgwiqyhi0y8qd"; }; - features_.version_check."0.1.5" = deps: f: updateFeatures f (rec { + features_.version_check."0.1.5" = deps: f: updateFeatures f ({ version_check."0.1.5".default = (f.version_check."0.1.5".default or true); }) []; @@ -3678,7 +3678,7 @@ rec { ]) else []); features = mkFeatures (features."winapi"."0.3.6" or {}); }; - features_.winapi."0.3.6" = deps: f: updateFeatures f (rec { + features_.winapi."0.3.6" = deps: f: updateFeatures f ({ winapi."0.3.6".default = (f.winapi."0.3.6".default or true); winapi_i686_pc_windows_gnu."${deps.winapi."0.3.6".winapi_i686_pc_windows_gnu}".default = true; winapi_x86_64_pc_windows_gnu."${deps.winapi."0.3.6".winapi_x86_64_pc_windows_gnu}".default = true; @@ -3698,7 +3698,7 @@ rec { sha256 = "05ihkij18r4gamjpxj4gra24514can762imjzlmak5wlzidplzrp"; build = "build.rs"; }; - features_.winapi_i686_pc_windows_gnu."0.4.0" = deps: f: updateFeatures f (rec { + features_.winapi_i686_pc_windows_gnu."0.4.0" = deps: f: updateFeatures f ({ winapi_i686_pc_windows_gnu."0.4.0".default = (f.winapi_i686_pc_windows_gnu."0.4.0".default or true); }) []; @@ -3715,7 +3715,7 @@ rec { (crates."winapi"."${deps."winapi_util"."0.1.1"."winapi"}" deps) ]) else []); }; - features_.winapi_util."0.1.1" = deps: f: updateFeatures f (rec { + features_.winapi_util."0.1.1" = deps: f: updateFeatures f ({ winapi = fold recursiveUpdate {} [ { "${deps.winapi_util."0.1.1".winapi}"."consoleapi" = true; } { "${deps.winapi_util."0.1.1".winapi}"."errhandlingapi" = true; } @@ -3747,7 +3747,7 @@ rec { (crates."winapi"."${deps."winapi_util"."0.1.2"."winapi"}" deps) ]) else []); }; - features_.winapi_util."0.1.2" = deps: f: updateFeatures f (rec { + features_.winapi_util."0.1.2" = deps: f: updateFeatures f ({ winapi = fold recursiveUpdate {} [ { "${deps.winapi_util."0.1.2".winapi}"."consoleapi" = true; } { "${deps.winapi_util."0.1.2".winapi}"."errhandlingapi" = true; } @@ -3777,7 +3777,7 @@ rec { sha256 = "0n1ylmlsb8yg1v583i4xy0qmqg42275flvbc51hdqjjfjcl9vlbj"; build = "build.rs"; }; - features_.winapi_x86_64_pc_windows_gnu."0.4.0" = deps: f: updateFeatures f (rec { + features_.winapi_x86_64_pc_windows_gnu."0.4.0" = deps: f: updateFeatures f ({ winapi_x86_64_pc_windows_gnu."0.4.0".default = (f.winapi_x86_64_pc_windows_gnu."0.4.0".default or true); }) []; @@ -3795,7 +3795,7 @@ rec { (crates."winapi_util"."${deps."wincolor"."1.0.1"."winapi_util"}" deps) ]); }; - features_.wincolor."1.0.1" = deps: f: updateFeatures f (rec { + features_.wincolor."1.0.1" = deps: f: updateFeatures f ({ winapi = fold recursiveUpdate {} [ { "${deps.wincolor."1.0.1".winapi}"."minwindef" = true; } { "${deps.wincolor."1.0.1".winapi}"."wincon" = true; } @@ -4104,7 +4104,7 @@ rec { dependencies = mapFeatures features ([ ]); }; - features_.bytesize."1.0.0" = deps: f: updateFeatures f (rec { + features_.bytesize."1.0.0" = deps: f: updateFeatures f ({ bytesize."1.0.0".default = (f.bytesize."1.0.0".default or true); }) []; @@ -4549,7 +4549,7 @@ rec { build = "build.rs"; features = mkFeatures (features."core_foundation_sys"."0.6.2" or {}); }; - features_.core_foundation_sys."0.6.2" = deps: f: updateFeatures f (rec { + features_.core_foundation_sys."0.6.2" = deps: f: updateFeatures f ({ core_foundation_sys."0.6.2".default = (f.core_foundation_sys."0.6.2".default or true); }) []; @@ -4576,7 +4576,7 @@ rec { (crates."url"."${deps."crates_io"."0.23.0"."url"}" deps) ]); }; - features_.crates_io."0.23.0" = deps: f: updateFeatures f (rec { + features_.crates_io."0.23.0" = deps: f: updateFeatures f ({ crates_io."0.23.0".default = (f.crates_io."0.23.0".default or true); curl."${deps.crates_io."0.23.0".curl}".default = true; failure."${deps.crates_io."0.23.0".failure}".default = true; @@ -4670,7 +4670,7 @@ rec { (crates."smallvec"."${deps."crossbeam_channel"."0.3.8"."smallvec"}" deps) ]); }; - features_.crossbeam_channel."0.3.8" = deps: f: updateFeatures f (rec { + features_.crossbeam_channel."0.3.8" = deps: f: updateFeatures f ({ crossbeam_channel."0.3.8".default = (f.crossbeam_channel."0.3.8".default or true); crossbeam_utils."${deps.crossbeam_channel."0.3.8".crossbeam_utils}".default = true; smallvec."${deps.crossbeam_channel."0.3.8".smallvec}".default = true; @@ -4737,7 +4737,7 @@ rec { (crates."winapi"."${deps."crypto_hash"."0.3.3"."winapi"}" deps) ]) else []); }; - features_.crypto_hash."0.3.3" = deps: f: updateFeatures f (rec { + features_.crypto_hash."0.3.3" = deps: f: updateFeatures f ({ commoncrypto."${deps.crypto_hash."0.3.3".commoncrypto}".default = true; crypto_hash."0.3.3".default = (f.crypto_hash."0.3.3".default or true); hex."${deps.crypto_hash."0.3.3".hex}".default = true; @@ -4929,7 +4929,7 @@ rec { (crates."strsim"."${deps."docopt"."1.1.0"."strsim"}" deps) ]); }; - features_.docopt."1.1.0" = deps: f: updateFeatures f (rec { + features_.docopt."1.1.0" = deps: f: updateFeatures f ({ docopt."1.1.0".default = (f.docopt."1.1.0".default or true); lazy_static."${deps.docopt."1.1.0".lazy_static}".default = true; regex."${deps.docopt."1.1.0".regex}".default = true; @@ -4989,7 +4989,7 @@ rec { (crates."libc"."${deps."filetime"."0.2.4"."libc"}" deps) ]) else []); }; - features_.filetime."0.2.4" = deps: f: updateFeatures f (rec { + features_.filetime."0.2.4" = deps: f: updateFeatures f ({ cfg_if."${deps.filetime."0.2.4".cfg_if}".default = true; filetime."0.2.4".default = (f.filetime."0.2.4".default or true); libc."${deps.filetime."0.2.4".libc}".default = true; @@ -5078,7 +5078,7 @@ rec { sha256 = "128mlh23y3gg6ag5h8iiqlcbl59smisdzraqy88ldrf75kbw27ip"; libPath = "lib.rs"; }; - features_.fnv."1.0.6" = deps: f: updateFeatures f (rec { + features_.fnv."1.0.6" = deps: f: updateFeatures f ({ fnv."1.0.6".default = (f.fnv."1.0.6".default or true); }) []; @@ -5096,7 +5096,7 @@ rec { (crates."foreign_types_shared"."${deps."foreign_types"."0.3.2"."foreign_types_shared"}" deps) ]); }; - features_.foreign_types."0.3.2" = deps: f: updateFeatures f (rec { + features_.foreign_types."0.3.2" = deps: f: updateFeatures f ({ foreign_types."0.3.2".default = (f.foreign_types."0.3.2".default or true); foreign_types_shared."${deps.foreign_types."0.3.2".foreign_types_shared}".default = true; }) [ @@ -5114,7 +5114,7 @@ rec { authors = [ "Steven Fackler <sfackler@gmail.com>" ]; sha256 = "0b6cnvqbflws8dxywk4589vgbz80049lz4x1g9dfy4s1ppd3g4z5"; }; - features_.foreign_types_shared."0.1.1" = deps: f: updateFeatures f (rec { + features_.foreign_types_shared."0.1.1" = deps: f: updateFeatures f ({ foreign_types_shared."0.1.1".default = (f.foreign_types_shared."0.1.1".default or true); }) []; @@ -5135,7 +5135,7 @@ rec { (crates."winapi"."${deps."fs2"."0.4.3"."winapi"}" deps) ]) else []); }; - features_.fs2."0.4.3" = deps: f: updateFeatures f (rec { + features_.fs2."0.4.3" = deps: f: updateFeatures f ({ fs2."0.4.3".default = (f.fs2."0.4.3".default or true); libc."${deps.fs2."0.4.3".libc}".default = true; winapi = fold recursiveUpdate {} [ @@ -5167,7 +5167,7 @@ rec { (crates."termcolor"."${deps."fwdansi"."1.0.1"."termcolor"}" deps) ]); }; - features_.fwdansi."1.0.1" = deps: f: updateFeatures f (rec { + features_.fwdansi."1.0.1" = deps: f: updateFeatures f ({ fwdansi."1.0.1".default = (f.fwdansi."1.0.1".default or true); memchr."${deps.fwdansi."1.0.1".memchr}".default = true; termcolor."${deps.fwdansi."1.0.1".termcolor}".default = true; @@ -5279,7 +5279,7 @@ rec { (crates."url"."${deps."git2_curl"."0.9.0"."url"}" deps) ]); }; - features_.git2_curl."0.9.0" = deps: f: updateFeatures f (rec { + features_.git2_curl."0.9.0" = deps: f: updateFeatures f ({ curl."${deps.git2_curl."0.9.0".curl}".default = true; git2."${deps.git2_curl."0.9.0".git2}".default = (f.git2."${deps.git2_curl."0.9.0".git2}".default or false); git2_curl."0.9.0".default = (f.git2_curl."0.9.0".default or true); @@ -5303,7 +5303,7 @@ rec { authors = [ "The Rust Project Developers" ]; sha256 = "104389jjxs8r2f5cc9p0axhjmndgln60ih5x4f00ccgg9d3zarlf"; }; - features_.glob."0.2.11" = deps: f: updateFeatures f (rec { + features_.glob."0.2.11" = deps: f: updateFeatures f ({ glob."0.2.11".default = (f.glob."0.2.11".default or true); }) []; @@ -5326,7 +5326,7 @@ rec { ]); features = mkFeatures (features."globset"."0.4.3" or {}); }; - features_.globset."0.4.3" = deps: f: updateFeatures f (rec { + features_.globset."0.4.3" = deps: f: updateFeatures f ({ aho_corasick."${deps.globset."0.4.3".aho_corasick}".default = true; bstr = fold recursiveUpdate {} [ { "${deps.globset."0.4.3".bstr}"."std" = true; } @@ -5360,7 +5360,7 @@ rec { ]); features = mkFeatures (features."hashbrown"."0.1.8" or {}); }; - features_.hashbrown."0.1.8" = deps: f: updateFeatures f (rec { + features_.hashbrown."0.1.8" = deps: f: updateFeatures f ({ byteorder."${deps.hashbrown."0.1.8".byteorder}".default = (f.byteorder."${deps.hashbrown."0.1.8".byteorder}".default or false); hashbrown."0.1.8".default = (f.hashbrown."0.1.8".default or true); scopeguard."${deps.hashbrown."0.1.8".scopeguard}".default = (f.scopeguard."${deps.hashbrown."0.1.8".scopeguard}".default or false); @@ -5381,7 +5381,7 @@ rec { sha256 = "0hs0xfb4x67y4ss9mmbjmibkwakbn3xf23i21m409bw2zqk9b6kz"; features = mkFeatures (features."hex"."0.3.2" or {}); }; - features_.hex."0.3.2" = deps: f: updateFeatures f (rec { + features_.hex."0.3.2" = deps: f: updateFeatures f ({ hex."0.3.2".default = (f.hex."0.3.2".default or true); }) []; @@ -5400,7 +5400,7 @@ rec { (crates."winapi"."${deps."home"."0.3.4"."winapi"}" deps) ]) else []); }; - features_.home."0.3.4" = deps: f: updateFeatures f (rec { + features_.home."0.3.4" = deps: f: updateFeatures f ({ home."0.3.4".default = (f.home."0.3.4".default or true); scopeguard."${deps.home."0.3.4".scopeguard}".default = true; winapi = fold recursiveUpdate {} [ @@ -5434,7 +5434,7 @@ rec { (crates."itoa"."${deps."http"."0.1.17"."itoa"}" deps) ]); }; - features_.http."0.1.17" = deps: f: updateFeatures f (rec { + features_.http."0.1.17" = deps: f: updateFeatures f ({ bytes."${deps.http."0.1.17".bytes}".default = true; fnv."${deps.http."0.1.17".fnv}".default = true; http."0.1.17".default = (f.http."0.1.17".default or true); @@ -5524,7 +5524,7 @@ rec { (crates."rustc_version"."${deps."im_rc"."12.3.4"."rustc_version"}" deps) ]); }; - features_.im_rc."12.3.4" = deps: f: updateFeatures f (rec { + features_.im_rc."12.3.4" = deps: f: updateFeatures f ({ im_rc."12.3.4".default = (f.im_rc."12.3.4".default or true); rustc_version."${deps.im_rc."12.3.4".rustc_version}".default = true; sized_chunks."${deps.im_rc."12.3.4".sized_chunks}".default = true; @@ -5552,7 +5552,7 @@ rec { (crates."winapi"."${deps."iovec"."0.1.2"."winapi"}" deps) ]) else []); }; - features_.iovec."0.1.2" = deps: f: updateFeatures f (rec { + features_.iovec."0.1.2" = deps: f: updateFeatures f ({ iovec."0.1.2".default = (f.iovec."0.1.2".default or true); libc."${deps.iovec."0.1.2".libc}".default = true; winapi."${deps.iovec."0.1.2".winapi}".default = true; @@ -5609,7 +5609,7 @@ rec { (crates."rand"."${deps."jobserver"."0.1.13"."rand"}" deps) ]) else []); }; - features_.jobserver."0.1.13" = deps: f: updateFeatures f (rec { + features_.jobserver."0.1.13" = deps: f: updateFeatures f ({ jobserver."0.1.13".default = (f.jobserver."0.1.13".default or true); libc."${deps.jobserver."0.1.13".libc}".default = true; log."${deps.jobserver."0.1.13".log}".default = true; @@ -5640,7 +5640,7 @@ rec { (crates."winapi_build"."${deps."kernel32_sys"."0.2.2"."winapi_build"}" deps) ]); }; - features_.kernel32_sys."0.2.2" = deps: f: updateFeatures f (rec { + features_.kernel32_sys."0.2.2" = deps: f: updateFeatures f ({ kernel32_sys."0.2.2".default = (f.kernel32_sys."0.2.2".default or true); winapi."${deps.kernel32_sys."0.2.2".winapi}".default = true; winapi_build."${deps.kernel32_sys."0.2.2".winapi_build}".default = true; @@ -5790,7 +5790,7 @@ rec { (crates."cc"."${deps."libnghttp2_sys"."0.1.1"."cc"}" deps) ]); }; - features_.libnghttp2_sys."0.1.1" = deps: f: updateFeatures f (rec { + features_.libnghttp2_sys."0.1.1" = deps: f: updateFeatures f ({ cc."${deps.libnghttp2_sys."0.1.1".cc}".default = true; libc."${deps.libnghttp2_sys."0.1.1".libc}".default = true; libnghttp2_sys."0.1.1".default = (f.libnghttp2_sys."0.1.1".default or true); @@ -5827,7 +5827,7 @@ rec { (crates."pkg_config"."${deps."libssh2_sys"."0.2.11"."pkg_config"}" deps) ]); }; - features_.libssh2_sys."0.2.11" = deps: f: updateFeatures f (rec { + features_.libssh2_sys."0.2.11" = deps: f: updateFeatures f ({ cc."${deps.libssh2_sys."0.2.11".cc}".default = true; libc."${deps.libssh2_sys."0.2.11".libc}".default = true; libssh2_sys."0.2.11".default = (f.libssh2_sys."0.2.11".default or true); @@ -5865,7 +5865,7 @@ rec { ]); features = mkFeatures (features."libz_sys"."1.0.25" or {}); }; - features_.libz_sys."1.0.25" = deps: f: updateFeatures f (rec { + features_.libz_sys."1.0.25" = deps: f: updateFeatures f ({ cc."${deps.libz_sys."1.0.25".cc}".default = true; libc."${deps.libz_sys."1.0.25".libc}".default = true; libz_sys."1.0.25".default = (f.libz_sys."1.0.25".default or true); @@ -5891,7 +5891,7 @@ rec { ]); features = mkFeatures (features."lock_api"."0.1.5" or {}); }; - features_.lock_api."0.1.5" = deps: f: updateFeatures f (rec { + features_.lock_api."0.1.5" = deps: f: updateFeatures f ({ lock_api."0.1.5".default = (f.lock_api."0.1.5".default or true); scopeguard."${deps.lock_api."0.1.5".scopeguard}".default = (f.scopeguard."${deps.lock_api."0.1.5".scopeguard}".default or false); }) [ @@ -5913,7 +5913,7 @@ rec { (crates."rawpointer"."${deps."matrixmultiply"."0.1.15"."rawpointer"}" deps) ]); }; - features_.matrixmultiply."0.1.15" = deps: f: updateFeatures f (rec { + features_.matrixmultiply."0.1.15" = deps: f: updateFeatures f ({ matrixmultiply."0.1.15".default = (f.matrixmultiply."0.1.15".default or true); rawpointer."${deps.matrixmultiply."0.1.15".rawpointer}".default = true; }) [ @@ -5941,7 +5941,7 @@ rec { (crates."cc"."${deps."miniz_sys"."0.1.11"."cc"}" deps) ]); }; - features_.miniz_sys."0.1.11" = deps: f: updateFeatures f (rec { + features_.miniz_sys."0.1.11" = deps: f: updateFeatures f ({ cc."${deps.miniz_sys."0.1.11".cc}".default = true; libc."${deps.miniz_sys."0.1.11".libc}".default = true; miniz_sys."0.1.11".default = (f.miniz_sys."0.1.11".default or true); @@ -5964,7 +5964,7 @@ rec { (crates."adler32"."${deps."miniz_oxide"."0.2.1"."adler32"}" deps) ]); }; - features_.miniz_oxide."0.2.1" = deps: f: updateFeatures f (rec { + features_.miniz_oxide."0.2.1" = deps: f: updateFeatures f ({ adler32."${deps.miniz_oxide."0.2.1".adler32}".default = true; miniz_oxide."0.2.1".default = (f.miniz_oxide."0.2.1".default or true); }) [ @@ -6039,7 +6039,7 @@ rec { (crates."winapi"."${deps."miow"."0.3.3"."winapi"}" deps) ]); }; - features_.miow."0.3.3" = deps: f: updateFeatures f (rec { + features_.miow."0.3.3" = deps: f: updateFeatures f ({ miow."0.3.3".default = (f.miow."0.3.3".default or true); socket2."${deps.miow."0.3.3".socket2}".default = true; winapi = fold recursiveUpdate {} [ @@ -6200,7 +6200,7 @@ rec { (crates."libc"."${deps."num_cpus"."1.10.0"."libc"}" deps) ]); }; - features_.num_cpus."1.10.0" = deps: f: updateFeatures f (rec { + features_.num_cpus."1.10.0" = deps: f: updateFeatures f ({ libc."${deps.num_cpus."1.10.0".libc}".default = true; num_cpus."1.10.0".default = (f.num_cpus."1.10.0".default or true); }) [ @@ -6253,7 +6253,7 @@ rec { (crates."winapi"."${deps."opener"."0.3.2"."winapi"}" deps) ]) else []); }; - features_.opener."0.3.2" = deps: f: updateFeatures f (rec { + features_.opener."0.3.2" = deps: f: updateFeatures f ({ failure."${deps.opener."0.3.2".failure}".default = true; failure_derive."${deps.opener."0.3.2".failure_derive}".default = true; opener."0.3.2".default = (f.opener."0.3.2".default or true); @@ -6321,7 +6321,7 @@ rec { authors = [ "Alex Crichton <alex@alexcrichton.com>" ]; sha256 = "1a89fznx26vvaxyrxdvgf6iwai5xvs6xjvpjin68fgvrslv6n15a"; }; - features_.openssl_probe."0.1.2" = deps: f: updateFeatures f (rec { + features_.openssl_probe."0.1.2" = deps: f: updateFeatures f ({ openssl_probe."0.1.2".default = (f.openssl_probe."0.1.2".default or true); }) []; @@ -6339,7 +6339,7 @@ rec { (crates."cc"."${deps."openssl_src"."111.2.1+1.1.1b"."cc"}" deps) ]); }; - features_.openssl_src."111.2.1+1.1.1b" = deps: f: updateFeatures f (rec { + features_.openssl_src."111.2.1+1.1.1b" = deps: f: updateFeatures f ({ cc."${deps.openssl_src."111.2.1+1.1.1b".cc}".default = true; openssl_src."111.2.1+1.1.1b".default = (f.openssl_src."111.2.1+1.1.1b".default or true); }) [ @@ -6518,7 +6518,7 @@ rec { authors = [ "Alex Crichton <alex@alexcrichton.com>" ]; sha256 = "0207fsarrm412j0dh87lfcas72n8mxar7q3mgflsbsrqnb140sv6"; }; - features_.pkg_config."0.3.14" = deps: f: updateFeatures f (rec { + features_.pkg_config."0.3.14" = deps: f: updateFeatures f ({ pkg_config."0.3.14".default = (f.pkg_config."0.3.14".default or true); }) []; @@ -6705,7 +6705,7 @@ rec { (crates."autocfg"."${deps."rand_chacha"."0.1.1"."autocfg"}" deps) ]); }; - features_.rand_chacha."0.1.1" = deps: f: updateFeatures f (rec { + features_.rand_chacha."0.1.1" = deps: f: updateFeatures f ({ autocfg."${deps.rand_chacha."0.1.1".autocfg}".default = true; rand_chacha."0.1.1".default = (f.rand_chacha."0.1.1".default or true); rand_core."${deps.rand_chacha."0.1.1".rand_core}".default = (f.rand_core."${deps.rand_chacha."0.1.1".rand_core}".default or false); @@ -6728,7 +6728,7 @@ rec { (crates."rand_core"."${deps."rand_hc"."0.1.0"."rand_core"}" deps) ]); }; - features_.rand_hc."0.1.0" = deps: f: updateFeatures f (rec { + features_.rand_hc."0.1.0" = deps: f: updateFeatures f ({ rand_core."${deps.rand_hc."0.1.0".rand_core}".default = (f.rand_core."${deps.rand_hc."0.1.0".rand_core}".default or false); rand_hc."0.1.0".default = (f.rand_hc."0.1.0".default or true); }) [ @@ -6896,7 +6896,7 @@ rec { authors = [ "bluss" ]; sha256 = "0hblv2cv310ixf5f1jw4nk9w5pb95wh4dwqyjv07g2xrshbw6j04"; }; - features_.rawpointer."0.1.0" = deps: f: updateFeatures f (rec { + features_.rawpointer."0.1.0" = deps: f: updateFeatures f ({ rawpointer."0.1.0".default = (f.rawpointer."0.1.0".default or true); }) []; @@ -6912,7 +6912,7 @@ rec { sha256 = "1ndcp7brnvii87ndcd34fk846498r07iznphkslcy0shic9cp4rr"; libName = "syscall"; }; - features_.redox_syscall."0.1.54" = deps: f: updateFeatures f (rec { + features_.redox_syscall."0.1.54" = deps: f: updateFeatures f ({ redox_syscall."0.1.54".default = (f.redox_syscall."0.1.54".default or true); }) []; @@ -6974,7 +6974,7 @@ rec { (crates."ucd_util"."${deps."regex_syntax"."0.6.6"."ucd_util"}" deps) ]); }; - features_.regex_syntax."0.6.6" = deps: f: updateFeatures f (rec { + features_.regex_syntax."0.6.6" = deps: f: updateFeatures f ({ regex_syntax."0.6.6".default = (f.regex_syntax."0.6.6".default or true); ucd_util."${deps.regex_syntax."0.6.6".ucd_util}".default = true; }) [ @@ -7020,7 +7020,7 @@ rec { authors = [ "Alex Crichton <alex@alexcrichton.com>" ]; sha256 = "0arpdp472j4lrwxbmf4z21d8kh95rbbphnzccf605pqq2rvczv3p"; }; - features_.rustc_workspace_hack."1.0.0" = deps: f: updateFeatures f (rec { + features_.rustc_workspace_hack."1.0.0" = deps: f: updateFeatures f ({ rustc_workspace_hack."1.0.0".default = (f.rustc_workspace_hack."1.0.0".default or true); }) []; @@ -7038,7 +7038,7 @@ rec { (crates."semver"."${deps."rustc_version"."0.2.3"."semver"}" deps) ]); }; - features_.rustc_version."0.2.3" = deps: f: updateFeatures f (rec { + features_.rustc_version."0.2.3" = deps: f: updateFeatures f ({ rustc_version."0.2.3".default = (f.rustc_version."0.2.3".default or true); semver."${deps.rustc_version."0.2.3".semver}".default = true; }) [ @@ -7063,7 +7063,7 @@ rec { (crates."serde_json"."${deps."rustfix"."0.4.5"."serde_json"}" deps) ]); }; - features_.rustfix."0.4.5" = deps: f: updateFeatures f (rec { + features_.rustfix."0.4.5" = deps: f: updateFeatures f ({ failure."${deps.rustfix."0.4.5".failure}".default = true; log."${deps.rustfix."0.4.5".log}".default = true; rustfix."0.4.5".default = (f.rustfix."0.4.5".default or true); @@ -7092,7 +7092,7 @@ rec { (crates."winapi_util"."${deps."same_file"."1.0.4"."winapi_util"}" deps) ]) else []); }; - features_.same_file."1.0.4" = deps: f: updateFeatures f (rec { + features_.same_file."1.0.4" = deps: f: updateFeatures f ({ same_file."1.0.4".default = (f.same_file."1.0.4".default or true); winapi_util."${deps.same_file."1.0.4".winapi_util}".default = true; }) [ @@ -7114,7 +7114,7 @@ rec { (crates."winapi"."${deps."schannel"."0.1.15"."winapi"}" deps) ]); }; - features_.schannel."0.1.15" = deps: f: updateFeatures f (rec { + features_.schannel."0.1.15" = deps: f: updateFeatures f ({ lazy_static."${deps.schannel."0.1.15".lazy_static}".default = true; schannel."0.1.15".default = (f.schannel."0.1.15".default or true); winapi = fold recursiveUpdate {} [ @@ -7199,7 +7199,7 @@ rec { authors = [ "Steve Klabnik <steve@steveklabnik.com>" ]; sha256 = "1da66c8413yakx0y15k8c055yna5lyb6fr0fw9318kdwkrk5k12h"; }; - features_.semver_parser."0.7.0" = deps: f: updateFeatures f (rec { + features_.semver_parser."0.7.0" = deps: f: updateFeatures f ({ semver_parser."0.7.0".default = (f.semver_parser."0.7.0".default or true); }) []; @@ -7258,7 +7258,7 @@ rec { ]); features = mkFeatures (features."serde_derive"."1.0.90" or {}); }; - features_.serde_derive."1.0.90" = deps: f: updateFeatures f (rec { + features_.serde_derive."1.0.90" = deps: f: updateFeatures f ({ proc_macro2."${deps.serde_derive."1.0.90".proc_macro2}".default = true; quote."${deps.serde_derive."1.0.90".quote}".default = true; serde_derive."1.0.90".default = (f.serde_derive."1.0.90".default or true); @@ -7286,7 +7286,7 @@ rec { (crates."serde"."${deps."serde_ignored"."0.0.4"."serde"}" deps) ]); }; - features_.serde_ignored."0.0.4" = deps: f: updateFeatures f (rec { + features_.serde_ignored."0.0.4" = deps: f: updateFeatures f ({ serde."${deps.serde_ignored."0.0.4".serde}".default = true; serde_ignored."0.0.4".default = (f.serde_ignored."0.0.4".default or true); }) [ @@ -7304,7 +7304,7 @@ rec { authors = [ "Steven Fackler <sfackler@gmail.com>" ]; sha256 = "02ik28la039b8anx0sx8mbdp2yx66m64mjrjyy6x0dgpbmfxmc24"; }; - features_.shell_escape."0.1.4" = deps: f: updateFeatures f (rec { + features_.shell_escape."0.1.4" = deps: f: updateFeatures f ({ shell_escape."0.1.4".default = (f.shell_escape."0.1.4".default or true); }) []; @@ -7323,7 +7323,7 @@ rec { (crates."typenum"."${deps."sized_chunks"."0.1.3"."typenum"}" deps) ]); }; - features_.sized_chunks."0.1.3" = deps: f: updateFeatures f (rec { + features_.sized_chunks."0.1.3" = deps: f: updateFeatures f ({ sized_chunks."0.1.3".default = (f.sized_chunks."0.1.3".default or true); typenum."${deps.sized_chunks."0.1.3".typenum}".default = true; }) [ @@ -7352,7 +7352,7 @@ rec { ]) else []); features = mkFeatures (features."socket2"."0.3.8" or {}); }; - features_.socket2."0.3.8" = deps: f: updateFeatures f (rec { + features_.socket2."0.3.8" = deps: f: updateFeatures f ({ cfg_if."${deps.socket2."0.3.8".cfg_if}".default = true; libc."${deps.socket2."0.3.8".libc}".default = true; redox_syscall."${deps.socket2."0.3.8".redox_syscall}".default = true; @@ -7383,7 +7383,7 @@ rec { authors = [ "Danny Guo <dannyguo91@gmail.com>" ]; sha256 = "0d3jsdz22wgjyxdakqnvdgmwjdvkximz50d9zfk4qlalw635qcvy"; }; - features_.strsim."0.8.0" = deps: f: updateFeatures f (rec { + features_.strsim."0.8.0" = deps: f: updateFeatures f ({ strsim."0.8.0".default = (f.strsim."0.8.0".default or true); }) []; @@ -7402,7 +7402,7 @@ rec { (crates."ndarray"."${deps."strsim"."0.9.1"."ndarray"}" deps) ]); }; - features_.strsim."0.9.1" = deps: f: updateFeatures f (rec { + features_.strsim."0.9.1" = deps: f: updateFeatures f ({ hashbrown."${deps.strsim."0.9.1".hashbrown}".default = true; ndarray."${deps.strsim."0.9.1".ndarray}".default = true; strsim."0.9.1".default = (f.strsim."0.9.1".default or true); @@ -7539,7 +7539,7 @@ rec { (crates."winapi"."${deps."tempfile"."3.0.7"."winapi"}" deps) ]) else []); }; - features_.tempfile."3.0.7" = deps: f: updateFeatures f (rec { + features_.tempfile."3.0.7" = deps: f: updateFeatures f ({ cfg_if."${deps.tempfile."3.0.7".cfg_if}".default = true; libc."${deps.tempfile."3.0.7".libc}".default = true; rand."${deps.tempfile."3.0.7".rand}".default = true; @@ -7575,7 +7575,7 @@ rec { (crates."unicode_width"."${deps."textwrap"."0.11.0"."unicode_width"}" deps) ]); }; - features_.textwrap."0.11.0" = deps: f: updateFeatures f (rec { + features_.textwrap."0.11.0" = deps: f: updateFeatures f ({ textwrap."0.11.0".default = (f.textwrap."0.11.0".default or true); unicode_width."${deps.textwrap."0.11.0".unicode_width}".default = true; }) [ @@ -7595,7 +7595,7 @@ rec { build = "build/main.rs"; features = mkFeatures (features."typenum"."1.10.0" or {}); }; - features_.typenum."1.10.0" = deps: f: updateFeatures f (rec { + features_.typenum."1.10.0" = deps: f: updateFeatures f ({ typenum."1.10.0".default = (f.typenum."1.10.0".default or true); }) []; @@ -7614,7 +7614,7 @@ rec { (crates."url"."${deps."url_serde"."0.2.0"."url"}" deps) ]); }; - features_.url_serde."0.2.0" = deps: f: updateFeatures f (rec { + features_.url_serde."0.2.0" = deps: f: updateFeatures f ({ serde."${deps.url_serde."0.2.0".serde}".default = true; url."${deps.url_serde."0.2.0".url}".default = true; url_serde."0.2.0".default = (f.url_serde."0.2.0".default or true); @@ -7634,7 +7634,7 @@ rec { authors = [ "Jim McGrath <jimmc2@gmail.com>" ]; sha256 = "1ig6jqpzzl1z9vk4qywgpfr4hfbd8ny8frqsgm3r449wkc4n1i5x"; }; - features_.vcpkg."0.2.6" = deps: f: updateFeatures f (rec { + features_.vcpkg."0.2.6" = deps: f: updateFeatures f ({ vcpkg."0.2.6".default = (f.vcpkg."0.2.6".default or true); }) []; @@ -7656,7 +7656,7 @@ rec { (crates."winapi_util"."${deps."walkdir"."2.2.7"."winapi_util"}" deps) ]) else []); }; - features_.walkdir."2.2.7" = deps: f: updateFeatures f (rec { + features_.walkdir."2.2.7" = deps: f: updateFeatures f ({ same_file."${deps.walkdir."2.2.7".same_file}".default = true; walkdir."2.2.7".default = (f.walkdir."2.2.7".default or true); winapi = fold recursiveUpdate {} [ @@ -7682,7 +7682,7 @@ rec { authors = [ "Peter Atashian <retep998@gmail.com>" ]; sha256 = "0a45b58ywf12vb7gvj6h3j264nydynmzyqz8d8rqxsj6icqv82as"; }; - features_.winapi."0.2.8" = deps: f: updateFeatures f (rec { + features_.winapi."0.2.8" = deps: f: updateFeatures f ({ winapi."0.2.8".default = (f.winapi."0.2.8".default or true); }) []; @@ -7732,7 +7732,7 @@ rec { sha256 = "1lxlpi87rkhxcwp2ykf1ldw3p108hwm24nywf3jfrvmff4rjhqga"; libName = "build"; }; - features_.winapi_build."0.1.1" = deps: f: updateFeatures f (rec { + features_.winapi_build."0.1.1" = deps: f: updateFeatures f ({ winapi_build."0.1.1".default = (f.winapi_build."0.1.1".default or true); }) []; @@ -7747,7 +7747,7 @@ rec { authors = [ "Remi Rampin <remirampin@gmail.com>" ]; sha256 = "1z3mvjgw02mbqk98kizzibrca01d5wfkpazsrp3vkkv3i56pn6fb"; }; - features_.adler32."1.0.3" = deps: f: updateFeatures f (rec { + features_.adler32."1.0.3" = deps: f: updateFeatures f ({ adler32."1.0.3".default = (f.adler32."1.0.3".default or true); }) []; diff --git a/pkgs/build-support/rust/default-crate-overrides.nix b/pkgs/build-support/rust/default-crate-overrides.nix index b3ab9f5ba780..1c4fe9daeada 100644 --- a/pkgs/build-support/rust/default-crate-overrides.nix +++ b/pkgs/build-support/rust/default-crate-overrides.nix @@ -15,11 +15,6 @@ in ++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv ]; }; - cargo-vendor = attrs: { - buildInputs = [ openssl zlib curl ] - ++ stdenv.lib.optionals stdenv.isDarwin [ Security ]; - }; - libz-sys = attrs: { buildInputs = [ pkgconfig zlib ]; extraLinkFlags = ["-L${zlib.out}/lib"]; diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 09802d56d34c..4634d32f6ace 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -44,8 +44,8 @@ let hostConfig = stdenv.hostPlatform.config; rustHostConfig = { - "x86_64-pc-mingw32" = "x86_64-pc-windows-gnu"; - }."${hostConfig}" or hostConfig; + x86_64-pc-mingw32 = "x86_64-pc-windows-gnu"; + }.${hostConfig} or hostConfig; ccForBuild="${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"; cxxForBuild="${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}c++"; @@ -86,6 +86,10 @@ stdenv.mkDerivation (args // { ${stdenv.lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) '' [target."${rustHostConfig}"] "linker" = "${ccForHost}" + ${# https://github.com/rust-lang/rust/issues/46651#issuecomment-433611633 + stdenv.lib.optionalString (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isAarch64) '' + "rustflags" = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc" ] + ''} ''} EOF diff --git a/pkgs/build-support/rust/fetchcargo.nix b/pkgs/build-support/rust/fetchcargo.nix index 4e6058383d48..bc80db0947b0 100644 --- a/pkgs/build-support/rust/fetchcargo.nix +++ b/pkgs/build-support/rust/fetchcargo.nix @@ -1,4 +1,4 @@ -{ stdenv, cacert, git, cargo, cargo-vendor, python3 }: +{ stdenv, cacert, git, cargo, python3 }: let cargo-vendor-normalise = stdenv.mkDerivation { name = "cargo-vendor-normalise"; src = ./cargo-vendor-normalise.py; @@ -20,7 +20,7 @@ in { name ? "cargo-deps", src, srcs, patches, sourceRoot, sha256, cargoUpdateHook ? "" }: stdenv.mkDerivation { name = "${name}-vendor"; - nativeBuildInputs = [ cacert cargo-vendor git cargo-vendor-normalise cargo ]; + nativeBuildInputs = [ cacert git cargo-vendor-normalise cargo ]; inherit src srcs patches sourceRoot; phases = "unpackPhase patchPhase installPhase"; diff --git a/pkgs/build-support/setup-hooks/install-shell-files.sh b/pkgs/build-support/setup-hooks/install-shell-files.sh new file mode 100644 index 000000000000..e0ea1f7f30a7 --- /dev/null +++ b/pkgs/build-support/setup-hooks/install-shell-files.sh @@ -0,0 +1,165 @@ +#!/bin/bash +# Setup hook for the `installShellFiles` package. +# +# Example usage in a derivation: +# +# { …, installShellFiles, … }: +# stdenv.mkDerivation { +# … +# nativeBuildInputs = [ installShellFiles ]; +# postInstall = '' +# installManPage share/doc/foobar.1 +# installShellCompletion share/completions/foobar.{bash,fish,zsh} +# ''; +# … +# } +# +# See comments on each function for more details. + +# installManPage <path> [...<path>] +# +# Each argument is checked for its man section suffix and installed into the appropriate +# share/man<n>/ directory. The function returns an error if any paths don't have the man section +# suffix (with optional .gz compression). +installManPage() { + local path + for path in "$@"; do + if (( "${NIX_DEBUG:-0}" >= 1 )); then + echo "installManPage: installing $path" + fi + if test -z "$path"; then + echo "installManPage: error: path cannot be empty" >&2 + return 1 + fi + local basename + basename=$(stripHash "$path") # use stripHash in case it's a nix store path + local trimmed=${basename%.gz} # don't get fooled by compressed manpages + local suffix=${trimmed##*.} + if test -z "$suffix" -o "$suffix" = "$trimmed"; then + echo "installManPage: error: path missing manpage section suffix: $path" >&2 + return 1 + fi + local outRoot + if test "$suffix" = 3; then + outRoot=${!outputDevman:?} + else + outRoot=${!outputMan:?} + fi + install -Dm644 -T "$path" "${outRoot}/share/man/man$suffix/$basename" || return + done +} + +# installShellCompletion [--bash|--fish|--zsh] ([--name <name>] <path>)... +# +# Each path is installed into the appropriate directory for shell completions for the given shell. +# If one of `--bash`, `--fish`, or `--zsh` is given the path is assumed to belong to that shell. +# Otherwise the file extension will be examined to pick a shell. If the shell is unknown a warning +# will be logged and the command will return a non-zero status code after processing any remaining +# paths. Any of the shell flags will affect all subsequent paths (unless another shell flag is +# given). +# +# If the shell completion needs to be renamed before installing the optional `--name <name>` flag +# may be given. Any name provided with this flag only applies to the next path. +# +# For zsh completions, if the `--name` flag is not given, the path will be automatically renamed +# such that `foobar.zsh` becomes `_foobar`. +# +# This command accepts multiple shell flags in conjunction with multiple paths if you wish to +# install them all in one command: +# +# installShellCompletion share/completions/foobar.{bash,fish} --zsh share/completions/_foobar +# +# However it may be easier to read if each shell is split into its own invocation, especially when +# renaming is involved: +# +# installShellCompletion --bash --name foobar.bash share/completions.bash +# installShellCompletion --fish --name foobar.fish share/completions.fish +# installShellCompletion --zsh --name _foobar share/completions.zsh +# +# If any argument is `--` the remaining arguments will be treated as paths. +installShellCompletion() { + local shell='' name='' retval=0 parseArgs=1 arg + while { arg=$1; shift; }; do + # Parse arguments + if (( parseArgs )); then + case "$arg" in + --bash|--fish|--zsh) + shell=${arg#--} + continue;; + --name) + name=$1 + shift || { + echo 'installShellCompletion: error: --name flag expected an argument' >&2 + return 1 + } + continue;; + --name=*) + # treat `--name=foo` the same as `--name foo` + name=${arg#--name=} + continue;; + --?*) + echo "installShellCompletion: warning: unknown flag ${arg%%=*}" >&2 + retval=2 + continue;; + --) + # treat remaining args as paths + parseArgs=0 + continue;; + esac + fi + if (( "${NIX_DEBUG:-0}" >= 1 )); then + echo "installShellCompletion: installing $arg${name:+ as $name}" + fi + # if we get here, this is a path + # Identify shell + local basename + basename=$(stripHash "$arg") + local curShell=$shell + if [[ -z "$curShell" ]]; then + # auto-detect the shell + case "$basename" in + ?*.bash) curShell=bash;; + ?*.fish) curShell=fish;; + ?*.zsh) curShell=zsh;; + *) + if [[ "$basename" = _* && "$basename" != *.* ]]; then + # probably zsh + echo "installShellCompletion: warning: assuming path \`$arg' is zsh; please specify with --zsh" >&2 + curShell=zsh + else + echo "installShellCompletion: warning: unknown shell for path: $arg" >&2 + retval=2 + continue + fi;; + esac + fi + # Identify output path + local outName sharePath + outName=${name:-$basename} + case "$curShell" in + bash) sharePath=bash-completion/completions;; + fish) sharePath=fish/vendor_completions.d;; + zsh) + sharePath=zsh/site-functions + # only apply automatic renaming if we didn't have a manual rename + if test -z "$name"; then + # convert a name like `foo.zsh` into `_foo` + outName=${outName%.zsh} + outName=_${outName#_} + fi;; + *) + # Our list of shells is out of sync with the flags we accept or extensions we detect. + echo 'installShellCompletion: internal error' >&2 + return 1;; + esac + # Install file + install -Dm644 -T "$arg" "${!outputBin:?}/share/$sharePath/$outName" || return + # Clear the name, it only applies to one path + name= + done + if [[ -n "$name" ]]; then + echo 'installShellCompletion: error: --name flag given with no path' >&2 + return 1 + fi + return $retval +} diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh b/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh index 906b1db9d10e..717740f1f20f 100644 --- a/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh +++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh @@ -1,12 +1,19 @@ +# shellcheck shell=bash gappsWrapperArgs=() find_gio_modules() { - if [ -d "$1"/lib/gio/modules ] && [ -n "$(ls -A $1/lib/gio/modules)" ] ; then + if [ -d "$1/lib/gio/modules" ] && [ -n "$(ls -A "$1/lib/gio/modules")" ] ; then gappsWrapperArgs+=(--prefix GIO_EXTRA_MODULES : "$1/lib/gio/modules") fi } -addEnvHooks "$targetOffset" find_gio_modules +addEnvHooks "${targetOffset:?}" find_gio_modules + +wrapGApp() { + local program="$1" + shift 1 + wrapProgram "$program" "${gappsWrapperArgs[@]}" "$@" +} # Note: $gappsWrapperArgs still gets defined even if $dontWrapGApps is set. wrapGAppsHook() { @@ -26,20 +33,19 @@ wrapGAppsHook() { gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH") fi - if [ -d "$prefix/share" ]; then + if [ -d "${prefix:?}/share" ]; then gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$prefix/share") fi - if [ -d "$prefix/lib/gio/modules" ] && [ -n "$(ls -A $prefix/lib/gio/modules)" ] ; then + if [ -d "$prefix/lib/gio/modules" ] && [ -n "$(ls -A "$prefix/lib/gio/modules")" ] ; then gappsWrapperArgs+=(--prefix GIO_EXTRA_MODULES : "$prefix/lib/gio/modules") fi - for v in $wrapPrefixVariables GST_PLUGIN_SYSTEM_PATH_1_0 GI_TYPELIB_PATH GRL_PLUGIN_PATH; do - eval local dummy="\$$v" - gappsWrapperArgs+=(--prefix $v : "$dummy") + for v in ${wrapPrefixVariables:-} GST_PLUGIN_SYSTEM_PATH_1_0 GI_TYPELIB_PATH GRL_PLUGIN_PATH; do + gappsWrapperArgs+=(--prefix "$v" : "${!v}") done - if [[ -z "$dontWrapGApps" ]]; then + if [[ -z "${dontWrapGApps:-}" ]]; then targetDirsThatExist=() targetDirsRealPath=() @@ -52,7 +58,7 @@ wrapGAppsHook() { find "${targetDir}" -type f -executable -print0 \ | while IFS= read -r -d '' file; do echo "Wrapping program '${file}'" - wrapProgram "${file}" "${gappsWrapperArgs[@]}" + wrapGApp "${file}" done fi done @@ -71,7 +77,7 @@ wrapGAppsHook() { fi done echo "Wrapping link: '$linkPath'" - wrapProgram "${linkPath}" "${gappsWrapperArgs[@]}" + wrapGApp "${linkPath}" done fi fi diff --git a/pkgs/build-support/templaterpm/default.nix b/pkgs/build-support/templaterpm/default.nix index aca4e340e267..30465c740e53 100644 --- a/pkgs/build-support/templaterpm/default.nix +++ b/pkgs/build-support/templaterpm/default.nix @@ -1,7 +1,7 @@ {stdenv, makeWrapper, python, toposort, rpm}: -stdenv.mkDerivation rec { - name = "nix-template-rpm-${version}"; +stdenv.mkDerivation { + pname = "nix-template-rpm"; version = "0.1"; buildInputs = [ makeWrapper python toposort rpm ]; diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 0bfe14a85393..55df09121b42 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -381,4 +381,37 @@ rec { # Copy a list of paths to the Nix store. copyPathsToStore = builtins.map copyPathToStore; + /* Applies a list of patches to a source directory. + * + * Examples: + * + * # Patching nixpkgs: + * applyPatches { + * src = pkgs.path; + * patches = [ + * (pkgs.fetchpatch { + * url = "https://github.com/NixOS/nixpkgs/commit/1f770d20550a413e508e081ddc08464e9d08ba3d.patch"; + * sha256 = "1nlzx171y3r3jbk0qhvnl711kmdk57jlq4na8f8bs8wz2pbffymr"; + * }) + * ]; + * } + */ + applyPatches = + { src + , name ? (if builtins.typeOf src == "path" + then builtins.baseNameOf src + else + if builtins.isAttrs src && builtins.hasAttr "name" src + then src.name + else throw "applyPatches: please supply a `name` argument because a default name can only be computed when the `src` is a path or is an attribute set with a `name` attribute." + ) + "-patched" + , patches ? [] + , postPatch ? "" + }: stdenvNoCC.mkDerivation { + inherit name src patches postPatch; + preferLocalBuild = true; + allowSubstitutes = false; + phases = "unpackPhase patchPhase installPhase"; + installPhase = "cp -R ./ $out"; + }; } diff --git a/pkgs/build-support/upstream-updater/attrset-to-dir.nix b/pkgs/build-support/upstream-updater/attrset-to-dir.nix index bdf44b7a5bf3..24f7b735c2e2 100644 --- a/pkgs/build-support/upstream-updater/attrset-to-dir.nix +++ b/pkgs/build-support/upstream-updater/attrset-to-dir.nix @@ -1,5 +1,5 @@ a : -a.stdenv.mkDerivation rec { +a.stdenv.mkDerivation { buildCommand = '' mkdir -p "$out/attributes" diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index a59da3a8745b..335cab7c45e1 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -719,7 +719,7 @@ rec { { name, fullName, size ? 4096, urlPrefix , packagesList ? "", packagesLists ? [packagesList] , packages, extraPackages ? [], postInstall ? "" - , extraDebs ? [] + , extraDebs ? [], createRootFS ? defaultCreateRootFS , QEMU_OPTS ? "", memSize ? 512 }: let @@ -729,7 +729,7 @@ rec { }; in (fillDiskWithDebs { - inherit name fullName size postInstall QEMU_OPTS memSize; + inherit name fullName size postInstall createRootFS QEMU_OPTS memSize; debs = import expr {inherit fetchurl;} ++ extraDebs; }) // {inherit expr;}; @@ -741,7 +741,7 @@ rec { # Note: no i386 release for Fedora >= 26 fedora26x86_64 = let version = "26"; - in rec { + in { name = "fedora-${version}-x86_64"; fullName = "Fedora ${version} (x86_64)"; packagesList = fetchurl rec { @@ -756,7 +756,7 @@ rec { fedora27x86_64 = let version = "27"; - in rec { + in { name = "fedora-${version}-x86_64"; fullName = "Fedora ${version} (x86_64)"; packagesList = fetchurl rec { @@ -816,7 +816,7 @@ rec { /* The set of supported Dpkg-based distributions. */ - debDistros = rec { + debDistros = { # Interestingly, the SHA-256 hashes provided by Ubuntu in # http://nl.archive.ubuntu.com/ubuntu/dists/{gutsy,hardy}/Release are diff --git a/pkgs/build-support/vm/test.nix b/pkgs/build-support/vm/test.nix index d0d85fce3662..698503032671 100644 --- a/pkgs/build-support/vm/test.nix +++ b/pkgs/build-support/vm/test.nix @@ -1,7 +1,7 @@ with import ../../.. {}; with vmTools; -rec { +{ # Run the PatchELF derivation in a VM. diff --git a/pkgs/build-support/vm/windows/default.nix b/pkgs/build-support/vm/windows/default.nix index e5ff13f0da9d..48ee2713d1f6 100644 --- a/pkgs/build-support/vm/windows/default.nix +++ b/pkgs/build-support/vm/windows/default.nix @@ -25,7 +25,7 @@ in { bootstrap = bootstrapper attrs.windowsImage; in { requiredSystemFeatures = [ "kvm" ]; - builder = "${pkgs.stdenv.shell}"; + builder = pkgs.stdenv.shell; args = ["-e" (bootstrap.resumeAndRun builder)]; windowsImage = bootstrap.suspendedVM; origArgs = attrs.args; diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix index ae7b42449fb3..8dbe0dbdbd03 100644 --- a/pkgs/build-support/writers/default.nix +++ b/pkgs/build-support/writers/default.nix @@ -10,12 +10,12 @@ rec { # makeScriptWriter { interpreter = "${pkgs.dash}/bin/dash"; } "hello" "echo hello world" makeScriptWriter = { interpreter, check ? "" }: nameOrPath: content: assert lib.or (types.path.check nameOrPath) (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null); - assert lib.or (types.path.check content) (types.string.check content); + assert lib.or (types.path.check content) (types.str.check content); let name = last (builtins.split "/" nameOrPath); in - pkgs.runCommand name (if (types.string.check content) then { + pkgs.runCommand name (if (types.str.check content) then { inherit content interpreter; passAsFile = [ "content" ]; } else { @@ -42,11 +42,11 @@ rec { # writeSimpleC = makeBinWriter { compileScript = name: "gcc -o $out $contentPath"; } makeBinWriter = { compileScript }: nameOrPath: content: assert lib.or (types.path.check nameOrPath) (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null); - assert lib.or (types.path.check content) (types.string.check content); + assert lib.or (types.path.check content) (types.str.check content); let name = last (builtins.split "/" nameOrPath); in - pkgs.runCommand name (if (types.string.check content) then { + pkgs.runCommand name (if (types.str.check content) then { inherit content; passAsFile = [ "content" ]; } else { diff --git a/pkgs/build-support/writers/test.nix b/pkgs/build-support/writers/test.nix index 80e9543f9c85..d7c347a559ef 100644 --- a/pkgs/build-support/writers/test.nix +++ b/pkgs/build-support/writers/test.nix @@ -159,8 +159,8 @@ in runCommand "test-writers" { meta.platforms = stdenv.lib.platforms.all; } '' ${lib.concatMapStringsSep "\n" (test: writeTest "success" "${test}/bin/test_writers") (lib.attrValues bin)} - ${lib.concatMapStringsSep "\n" (test: writeTest "success" "${test}") (lib.attrValues simple)} - ${lib.concatMapStringsSep "\n" (test: writeTest "success" "${test}") (lib.attrValues path)} + ${lib.concatMapStringsSep "\n" (test: writeTest "success" test) (lib.attrValues simple)} + ${lib.concatMapStringsSep "\n" (test: writeTest "success" test) (lib.attrValues path)} echo 'nix-writers successfully tested' >&2 touch $out |