diff options
author | John Ericson <git@JohnEricson.me> | 2019-03-10 13:30:54 -0400 |
---|---|---|
committer | John Ericson <git@JohnEricson.me> | 2019-03-10 13:52:55 -0400 |
commit | bfc72142e0b05ce103988baf4d8cff602c132a4d (patch) | |
tree | 24ea8fc0f310910cfbcdf3ac76b86b9fd170f57b /pkgs/tools/package-management | |
parent | a593f64cd7404666ac8364486773452cefa9baa9 (diff) | |
download | nixlib-bfc72142e0b05ce103988baf4d8cff602c132a4d.tar nixlib-bfc72142e0b05ce103988baf4d8cff602c132a4d.tar.gz nixlib-bfc72142e0b05ce103988baf4d8cff602c132a4d.tar.bz2 nixlib-bfc72142e0b05ce103988baf4d8cff602c132a4d.tar.lz nixlib-bfc72142e0b05ce103988baf4d8cff602c132a4d.tar.xz nixlib-bfc72142e0b05ce103988baf4d8cff602c132a4d.tar.zst nixlib-bfc72142e0b05ce103988baf4d8cff602c132a4d.zip |
nix*: Make .override work
Currently, .override is only on a temporary attrset that is thrown away, now it is also on the nix derivations we use.
Diffstat (limited to 'pkgs/tools/package-management')
-rw-r--r-- | pkgs/tools/package-management/nix/default.nix | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 76d11a03fc44..37c7cfa8f3b0 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -1,20 +1,29 @@ -{ lib, stdenv, fetchurl, fetchFromGitHub, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz -, pkgconfig, boehmgc, perlPackages, libsodium, brotli, boost, editline -, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns -, busybox-sandbox-shell +{ lib, fetchurl, fetchFromGitHub, callPackage , storeDir ? "/nix/store" , stateDir ? "/nix/var" , confDir ? "/etc" -, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp -, withAWS ? stdenv.isLinux || stdenv.isDarwin, aws-sdk-cpp +, boehmgc }: let - sh = busybox-sandbox-shell; - - common = { name, suffix ? "", src, includesPerl ? false, fromGit ? false }: - let nix = stdenv.mkDerivation rec { +common = + { lib, stdenv, fetchurl, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz + , pkgconfig, boehmgc, perlPackages, libsodium, brotli, boost, editline + , autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns + , busybox-sandbox-shell + , storeDir + , stateDir + , confDir + , withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp + , withAWS ? stdenv.isLinux || stdenv.isDarwin, aws-sdk-cpp + + , name, suffix ? "", src, includesPerl ? false, fromGit ? false + + }: + let + sh = busybox-sandbox-shell; + nix = stdenv.mkDerivation rec { inherit name src; version = lib.getVersion name; @@ -144,7 +153,7 @@ in rec { nix = nixStable; - nix1 = common rec { + nix1 = callPackage common rec { name = "nix-1.11.16"; src = fetchurl { url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz"; @@ -153,17 +162,21 @@ in rec { # Nix1 has the perl bindings by default, so no need to build the manually. includesPerl = true; + + inherit storeDir stateDir confDir boehmgc; }; - nixStable = common rec { + nixStable = callPackage common rec { name = "nix-2.2"; src = fetchurl { url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz"; sha256 = "63238d00d290b8a93925891fc9164439d3941e2ccc569bf7f7ca32f53c3ec0c7"; }; + + inherit storeDir stateDir confDir boehmgc; }; - nixUnstable = lib.lowPrio (common rec { + nixUnstable = lib.lowPrio (callPackage common rec { name = "nix-2.2${suffix}"; suffix = "pre6600_85488a93"; src = fetchFromGitHub { @@ -173,6 +186,8 @@ in rec { sha256 = "1n5dp7p2lzpnj7f834d25k020v16gnnsm56jz46y87v2x7b69ccm"; }; fromGit = true; + + inherit storeDir stateDir confDir boehmgc; }); } |