diff --git a/pkgs/build-support/fetchbower/default.nix b/pkgs/build-support/fetchbower/default.nix index 596b4d6ef520..04b2a969a36d 100644 --- a/pkgs/build-support/fetchbower/default.nix +++ b/pkgs/build-support/fetchbower/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, bower2nix, cacert }: +{ stdenvNoCC, lib, bower2nix, cacert }: let bowerVersion = version: let @@ -9,7 +9,7 @@ let cleanName = name: lib.replaceStrings ["/" ":"] ["-" "-"] name; - fetchbower = name: version: target: outputHash: stdenv.mkDerivation { + fetchbower = name: version: target: outputHash: stdenvNoCC.mkDerivation { name = "${cleanName name}-${bowerVersion version}"; SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; buildCommand = '' diff --git a/pkgs/build-support/fetchbzr/default.nix b/pkgs/build-support/fetchbzr/default.nix index 08e67fa0d66f..f9250de4ee07 100644 --- a/pkgs/build-support/fetchbzr/default.nix +++ b/pkgs/build-support/fetchbzr/default.nix @@ -1,7 +1,7 @@ -{ stdenv, bazaar }: +{ stdenvNoCC, bazaar }: { url, rev, sha256 }: -stdenv.mkDerivation { +stdenvNoCC.mkDerivation { name = "bzr-export"; builder = ./builder.sh; diff --git a/pkgs/build-support/fetchcvs/default.nix b/pkgs/build-support/fetchcvs/default.nix index 3debf53c1d36..9d9deb3f629e 100644 --- a/pkgs/build-support/fetchcvs/default.nix +++ b/pkgs/build-support/fetchcvs/default.nix @@ -3,11 +3,11 @@ # tag="" (get version by tag name) # If you don't specify neither one date="NOW" will be used (get latest) -{stdenv, cvs}: +{stdenvNoCC, cvs}: {cvsRoot, module, tag ? null, date ? null, sha256}: -stdenv.mkDerivation { +stdenvNoCC.mkDerivation { name = "cvs-export"; builder = ./builder.sh; nativeBuildInputs = [cvs]; diff --git a/pkgs/build-support/fetchdarcs/default.nix b/pkgs/build-support/fetchdarcs/default.nix index 60b374e343b9..b2b0c364a130 100644 --- a/pkgs/build-support/fetchdarcs/default.nix +++ b/pkgs/build-support/fetchdarcs/default.nix @@ -1,11 +1,11 @@ -{stdenv, darcs, nix, cacert}: +{stdenvNoCC, darcs, nix, cacert}: {url, rev ? null, context ? null, md5 ? "", sha256 ? ""}: if md5 != "" then throw "fetchdarcs does not support md5 anymore, please use sha256" else -stdenv.mkDerivation { +stdenvNoCC.mkDerivation { name = "fetchdarcs"; NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; builder = ./builder.sh; diff --git a/pkgs/build-support/fetchegg/default.nix b/pkgs/build-support/fetchegg/default.nix index a4bcca65f9be..746af9e27375 100644 --- a/pkgs/build-support/fetchegg/default.nix +++ b/pkgs/build-support/fetchegg/default.nix @@ -1,13 +1,13 @@ # Fetches a chicken egg from henrietta using `chicken-install -r' # See: http://wiki.call-cc.org/chicken-projects/egg-index-4.html -{ stdenv, chicken }: +{ stdenvNoCC, chicken }: { name, version, md5 ? "", sha256 ? "" }: if md5 != "" then throw "fetchegg does not support md5 anymore, please use sha256" else -stdenv.mkDerivation { +stdenvNoCC.mkDerivation { name = "chicken-${name}-export"; builder = ./builder.sh; nativeBuildInputs = [ chicken ]; @@ -20,6 +20,6 @@ stdenv.mkDerivation { eggName = name; - impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars; + impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars; } diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix index 16da52294bd9..9fccc27ef632 100644 --- a/pkgs/build-support/fetchgit/default.nix +++ b/pkgs/build-support/fetchgit/default.nix @@ -1,6 +1,6 @@ -{stdenv, git, cacert}: let +{stdenvNoCC, git, cacert}: let urlToName = url: rev: let - inherit (stdenv.lib) removeSuffix splitString last; + inherit (stdenvNoCC.lib) removeSuffix splitString last; base = last (splitString ":" (baseNameOf (removeSuffix "/" url))); matched = builtins.match "(.*).git" base; @@ -48,7 +48,7 @@ assert deepClone -> leaveDotGit; if md5 != "" then throw "fetchgit does not support md5 anymore, please use sha256" else -stdenv.mkDerivation { +stdenvNoCC.mkDerivation { inherit name; builder = ./builder.sh; fetcher = "${./nix-prefetch-git}"; # This must be a string to ensure it's called with bash. @@ -62,7 +62,7 @@ stdenv.mkDerivation { GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt"; - impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars ++ [ + impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars ++ [ "GIT_PROXY_COMMAND" "SOCKS_SERVER" ]; diff --git a/pkgs/build-support/fetchgx/default.nix b/pkgs/build-support/fetchgx/default.nix index 6930ca6734a0..c8c643182231 100644 --- a/pkgs/build-support/fetchgx/default.nix +++ b/pkgs/build-support/fetchgx/default.nix @@ -1,8 +1,8 @@ -{ stdenv, gx, gx-go, go, cacert }: +{ stdenvNoCC, gx, gx-go, go, cacert }: { name, src, sha256 }: -stdenv.mkDerivation { +stdenvNoCC.mkDerivation { name = "${name}-gxdeps"; inherit src; diff --git a/pkgs/build-support/fetchhg/default.nix b/pkgs/build-support/fetchhg/default.nix index 2516f79f65b1..36a48ce9f170 100644 --- a/pkgs/build-support/fetchhg/default.nix +++ b/pkgs/build-support/fetchhg/default.nix @@ -1,15 +1,15 @@ -{stdenv, mercurial, nix}: {name ? null, url, rev ? null, md5 ? null, sha256 ? null, fetchSubrepos ? false}: +{stdenvNoCC, mercurial, nix}: {name ? null, url, rev ? null, md5 ? null, sha256 ? null, fetchSubrepos ? false}: if md5 != null then throw "fetchhg does not support md5 anymore, please use sha256" else # TODO: statically check if mercurial as the https support if the url starts woth https. -stdenv.mkDerivation { +stdenvNoCC.mkDerivation { name = "hg-archive" + (if name != null then "-${name}" else ""); builder = ./builder.sh; nativeBuildInputs = [mercurial]; - impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars; + impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars; subrepoClause = if fetchSubrepos then "S" else ""; diff --git a/pkgs/build-support/fetchmtn/default.nix b/pkgs/build-support/fetchmtn/default.nix index 1dc14e8cab13..7ce67453d698 100644 --- a/pkgs/build-support/fetchmtn/default.nix +++ b/pkgs/build-support/fetchmtn/default.nix @@ -1,5 +1,5 @@ # You can specify some extra mirrors and a cache DB via options -{stdenv, monotone, defaultDBMirrors ? [], cacheDB ? "./mtn-checkout.db"}: +{stdenvNoCC, monotone, defaultDBMirrors ? [], cacheDB ? "./mtn-checkout.db"}: # dbs is a list of strings # each is an url for sync @@ -8,7 +8,7 @@ {name ? "mtn-checkout", dbs ? [], sha256 , selector ? "h:" + branch, branch}: -stdenv.mkDerivation { +stdenvNoCC.mkDerivation { builder = ./builder.sh; nativeBuildInputs = [monotone]; @@ -19,7 +19,7 @@ stdenv.mkDerivation { dbs = defaultDBMirrors ++ dbs; inherit branch cacheDB name selector; - impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars; + impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars; } diff --git a/pkgs/build-support/fetchnuget/default.nix b/pkgs/build-support/fetchnuget/default.nix index 62b700dd81b5..40ba79ec4353 100644 --- a/pkgs/build-support/fetchnuget/default.nix +++ b/pkgs/build-support/fetchnuget/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, buildDotnetPackage, unzip }: +{ stdenvNoCC, fetchurl, buildDotnetPackage, unzip }: attrs @ { baseName diff --git a/pkgs/build-support/fetchrepoproject/default.nix b/pkgs/build-support/fetchrepoproject/default.nix index 85c64550d686..f8793dbac950 100644 --- a/pkgs/build-support/fetchrepoproject/default.nix +++ b/pkgs/build-support/fetchrepoproject/default.nix @@ -1,4 +1,4 @@ -{ stdenv, gitRepo, cacert, copyPathsToStore }: +{ stdenvNoCC, gitRepo, cacert, copyPathsToStore }: { name, manifest, rev ? "HEAD", sha256 # Optional parameters: @@ -9,7 +9,7 @@ assert repoRepoRev != "" -> repoRepoURL != ""; assert createMirror -> !useArchive; -with stdenv.lib; +with stdenvNoCC.lib; let extraRepoInitFlags = [ @@ -28,7 +28,7 @@ let local_manifests = copyPathsToStore localManifests; -in stdenv.mkDerivation { +in stdenvNoCC.mkDerivation { inherit name; inherit cacert manifest rev repoRepoURL repoRepoRev referenceDir; # TODO diff --git a/pkgs/build-support/fetchs3/default.nix b/pkgs/build-support/fetchs3/default.nix index b3b6aed9c551..e6b7a3418c0c 100644 --- a/pkgs/build-support/fetchs3/default.nix +++ b/pkgs/build-support/fetchs3/default.nix @@ -1,4 +1,4 @@ -{ stdenv, runCommand, awscli }: +{ stdenvNoCC, runCommand, awscli }: { s3url , sha256 @@ -10,7 +10,7 @@ }: let - credentialAttrs = stdenv.lib.optionalAttrs (credentials != null) { + credentialAttrs = stdenvNoCC.lib.optionalAttrs (credentials != null) { AWS_ACCESS_KEY_ID = credentials.access_key_id; AWS_SECRET_ACCESS_KEY = credentials.secret_access_key; AWS_SESSION_TOKEN = credentials.session_token ? null; diff --git a/pkgs/build-support/fetchsvn/default.nix b/pkgs/build-support/fetchsvn/default.nix index 45d9d4d95ddd..da57d581dadd 100644 --- a/pkgs/build-support/fetchsvn/default.nix +++ b/pkgs/build-support/fetchsvn/default.nix @@ -1,9 +1,9 @@ -{stdenv, subversion, glibcLocales, sshSupport ? false, openssh ? null}: +{stdenvNoCC, subversion, glibcLocales, sshSupport ? false, openssh ? null}: {url, rev ? "HEAD", md5 ? "", sha256 ? "", ignoreExternals ? false, ignoreKeywords ? false, name ? null}: let - repoName = with stdenv.lib; + repoName = with stdenvNoCC.lib; let fst = head; snd = l: head (tail l); @@ -28,7 +28,7 @@ in if md5 != "" then throw "fetchsvn does not support md5 anymore, please use sha256" else -stdenv.mkDerivation { +stdenvNoCC.mkDerivation { name = name_; builder = ./builder.sh; nativeBuildInputs = [ subversion glibcLocales ]; @@ -39,6 +39,6 @@ stdenv.mkDerivation { inherit url rev sshSupport openssh ignoreExternals ignoreKeywords; - impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars; + impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars; preferLocalBuild = true; } diff --git a/pkgs/build-support/fetchsvnssh/default.nix b/pkgs/build-support/fetchsvnssh/default.nix index 1e5559f14bb5..f76bd10247ba 100644 --- a/pkgs/build-support/fetchsvnssh/default.nix +++ b/pkgs/build-support/fetchsvnssh/default.nix @@ -1,11 +1,11 @@ -{stdenv, subversion, sshSupport ? false, openssh ? null, expect}: +{stdenvNoCC, subversion, sshSupport ? false, openssh ? null, expect}: {username, password, url, rev ? "HEAD", md5 ? "", sha256 ? ""}: if md5 != "" then throw "fetchsvnssh does not support md5 anymore, please use sha256" else -stdenv.mkDerivation { +stdenvNoCC.mkDerivation { name = "svn-export-ssh"; builder = ./builder.sh; nativeBuildInputs = [subversion expect]; diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index af453b933919..3e47d4a4b683 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -1,4 +1,4 @@ -{ stdenv, curl }: # Note that `curl' may be `null', in case of the native stdenv. +{ stdenvNoCC, curl }: # Note that `curl' may be `null', in case of the native stdenvNoCC. let @@ -10,7 +10,7 @@ let # resulting store derivations (.drv files) much smaller, which in # turn makes nix-env/nix-instantiate faster. mirrorsFile = - stdenv.mkDerivation ({ + stdenvNoCC.mkDerivation ({ name = "mirrors-list"; builder = ./write-mirror-list.sh; preferLocalBuild = true; @@ -20,7 +20,7 @@ let # "gnu", etc.). sites = builtins.attrNames mirrors; - impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars ++ [ + impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars ++ [ # This variable allows the user to pass additional options to curl "NIX_CURL_FLAGS" @@ -103,8 +103,8 @@ let in if md5 != "" then throw "fetchurl does not support md5 anymore, please use sha256 or sha512" -else if (!hasHash) then throw "Specify hash for fetchurl fixed-output derivation: ${stdenv.lib.concatStringsSep ", " urls_}" -else stdenv.mkDerivation { +else if (!hasHash) then throw "Specify hash for fetchurl fixed-output derivation: ${stdenvNoCC.lib.concatStringsSep ", " urls_}" +else stdenvNoCC.mkDerivation { name = if showURLs then "urls" else if name != "" then name diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 2542d2428859..afbade7c73a4 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -118,8 +118,8 @@ in rec { initialPath = [ bootstrapTools ]; fetchurlBoot = import ../../build-support/fetchurl { - stdenv = stage0.stdenv; - curl = bootstrapTools; + stdenvNoCC = stage0.stdenv; + curl = bootstrapTools; }; # The stdenvs themselves don't use mkDerivation, so I need to specify this here diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f3d54104fbd2..c189cef1645d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -180,7 +180,7 @@ with pkgs; # `fetchurl' downloads a file from the network. fetchurl = import ../build-support/fetchurl { - inherit stdenv; + inherit stdenvNoCC; # On darwin, libkrb5 needs bootstrap_cmds which would require # converting many packages to fetchurl_boot to avoid evaluation cycles. curl = buildPackages.curl.override (lib.optionalAttrs stdenv.isDarwin { gssSupport = false; });