Merge pull request #57267 from obsidiansystems/override-unstable-nix
nix*: Make .override work
This commit is contained in:
commit
83e3aff78d
@ -1,20 +1,29 @@
|
|||||||
{ lib, stdenv, fetchurl, fetchFromGitHub, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz
|
{ lib, fetchurl, fetchFromGitHub, callPackage
|
||||||
, pkgconfig, boehmgc, perlPackages, libsodium, brotli, boost, editline
|
|
||||||
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns
|
|
||||||
, busybox-sandbox-shell
|
|
||||||
, storeDir ? "/nix/store"
|
, storeDir ? "/nix/store"
|
||||||
, stateDir ? "/nix/var"
|
, stateDir ? "/nix/var"
|
||||||
, confDir ? "/etc"
|
, confDir ? "/etc"
|
||||||
, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp
|
, boehmgc
|
||||||
, withAWS ? stdenv.isLinux || stdenv.isDarwin, aws-sdk-cpp
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
sh = busybox-sandbox-shell;
|
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
|
||||||
|
|
||||||
common = { name, suffix ? "", src, includesPerl ? false, fromGit ? false }:
|
, name, suffix ? "", src, includesPerl ? false, fromGit ? false
|
||||||
let nix = stdenv.mkDerivation rec {
|
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
sh = busybox-sandbox-shell;
|
||||||
|
nix = stdenv.mkDerivation rec {
|
||||||
inherit name src;
|
inherit name src;
|
||||||
version = lib.getVersion name;
|
version = lib.getVersion name;
|
||||||
|
|
||||||
@ -144,7 +153,7 @@ in rec {
|
|||||||
|
|
||||||
nix = nixStable;
|
nix = nixStable;
|
||||||
|
|
||||||
nix1 = common rec {
|
nix1 = callPackage common rec {
|
||||||
name = "nix-1.11.16";
|
name = "nix-1.11.16";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz";
|
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.
|
# Nix1 has the perl bindings by default, so no need to build the manually.
|
||||||
includesPerl = true;
|
includesPerl = true;
|
||||||
|
|
||||||
|
inherit storeDir stateDir confDir boehmgc;
|
||||||
};
|
};
|
||||||
|
|
||||||
nixStable = common rec {
|
nixStable = callPackage common rec {
|
||||||
name = "nix-2.2";
|
name = "nix-2.2";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz";
|
url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz";
|
||||||
sha256 = "63238d00d290b8a93925891fc9164439d3941e2ccc569bf7f7ca32f53c3ec0c7";
|
sha256 = "63238d00d290b8a93925891fc9164439d3941e2ccc569bf7f7ca32f53c3ec0c7";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inherit storeDir stateDir confDir boehmgc;
|
||||||
};
|
};
|
||||||
|
|
||||||
nixUnstable = lib.lowPrio (common rec {
|
nixUnstable = lib.lowPrio (callPackage common rec {
|
||||||
name = "nix-2.3${suffix}";
|
name = "nix-2.3${suffix}";
|
||||||
suffix = "pre6631_e58a7144";
|
suffix = "pre6631_e58a7144";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -173,6 +186,8 @@ in rec {
|
|||||||
sha256 = "1hbjhnvjbh8bi8cjjgyrj4z1gw03ws12m2wi5azzj3rmhnh4c802";
|
sha256 = "1hbjhnvjbh8bi8cjjgyrj4z1gw03ws12m2wi5azzj3rmhnh4c802";
|
||||||
};
|
};
|
||||||
fromGit = true;
|
fromGit = true;
|
||||||
|
|
||||||
|
inherit storeDir stateDir confDir boehmgc;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22524,7 +22524,7 @@ in
|
|||||||
|
|
||||||
mynewt-newt = callPackage ../tools/package-management/mynewt-newt { };
|
mynewt-newt = callPackage ../tools/package-management/mynewt-newt { };
|
||||||
|
|
||||||
inherit (callPackages ../tools/package-management/nix {
|
inherit (callPackage ../tools/package-management/nix {
|
||||||
storeDir = config.nix.storeDir or "/nix/store";
|
storeDir = config.nix.storeDir or "/nix/store";
|
||||||
stateDir = config.nix.stateDir or "/nix/var";
|
stateDir = config.nix.stateDir or "/nix/var";
|
||||||
boehmgc = boehmgc.override { enableLargeConfig = true; };
|
boehmgc = boehmgc.override { enableLargeConfig = true; };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user