treewide: Fetchers should use stdenvNoCC.

This commit is contained in:
John Ericson 2018-01-09 18:38:19 -05:00
parent 7a3a8b8529
commit 940c4fa3f5
17 changed files with 43 additions and 43 deletions

View file

@ -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 = ''

View file

@ -1,7 +1,7 @@
{ stdenv, bazaar }:
{ stdenvNoCC, bazaar }:
{ url, rev, sha256 }:
stdenv.mkDerivation {
stdenvNoCC.mkDerivation {
name = "bzr-export";
builder = ./builder.sh;

View file

@ -3,11 +3,11 @@
# tag="<tagname>" (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];

View file

@ -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;

View file

@ -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;
}

View file

@ -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"
];

View file

@ -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;

View file

@ -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 "";

View file

@ -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;
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, buildDotnetPackage, unzip }:
{ stdenvNoCC, fetchurl, buildDotnetPackage, unzip }:
attrs @
{ baseName

View file

@ -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

View file

@ -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;

View file

@ -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;
}

View file

@ -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];

View file

@ -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

View file

@ -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

View file

@ -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; });