nixUnstable, nixFlakes: Update to latest

Note that we need to build from a tarball now to get the vendored
crates. A bit ugly to fetch tarballs from Hydra...
This commit is contained in:
Eelco Dolstra 2020-02-11 16:33:18 +01:00
parent 2a773b1506
commit dd7f6b0c6b

View file

@ -1,4 +1,4 @@
{ lib, fetchurl, fetchFromGitHub, callPackage
{ lib, fetchurl, callPackage
, storeDir ? "/nix/store"
, stateDir ? "/nix/var"
, confDir ? "/etc"
@ -11,7 +11,7 @@ let
common =
{ lib, stdenv, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz
, pkgconfig, boehmgc, perlPackages, libsodium, brotli, boost, editline, nlohmann_json
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns, jq
, jq, libarchive, rustc, cargo
, busybox-sandbox-shell
, storeDir
, stateDir
@ -19,7 +19,7 @@ common =
, 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
, name, suffix ? "", src, includesPerl ? false
}:
let
@ -29,19 +29,21 @@ common =
version = lib.getVersion name;
is20 = lib.versionAtLeast version "2.0pre";
is24 = lib.versionAtLeast version "2.4pre";
VERSION_SUFFIX = lib.optionalString fromGit suffix;
VERSION_SUFFIX = suffix;
outputs = [ "out" "dev" "man" "doc" ];
nativeBuildInputs =
[ pkgconfig ]
++ lib.optionals (!is20) [ curl perl ]
++ lib.optionals fromGit [ autoreconfHook autoconf-archive bison flex libxml2 libxslt docbook5 docbook_xsl_ns jq ];
++ lib.optionals is24 [ jq ];
buildInputs = [ curl openssl sqlite xz bzip2 nlohmann_json ]
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
++ lib.optionals is20 [ brotli boost editline ]
++ lib.optionals is24 [ libarchive rustc cargo ]
++ lib.optional withLibseccomp libseccomp
++ lib.optional (withAWS && is20)
((aws-sdk-cpp.override {
@ -126,8 +128,6 @@ common =
};
passthru = {
inherit fromGit;
perl-bindings = if includesPerl then nix else stdenv.mkDerivation {
pname = "nix-perl";
inherit version;
@ -140,7 +140,6 @@ common =
# but noting for future travellers.
nativeBuildInputs =
[ perl pkgconfig curl nix libsodium ]
++ lib.optionals fromGit [ autoreconfHook autoconf-archive ]
++ lib.optional is20 boost;
configureFlags =
@ -186,29 +185,23 @@ in rec {
});
nixUnstable = lib.lowPrio (callPackage common rec {
name = "nix-2.3${suffix}";
suffix = "pre6895_84de821";
src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "84de8210040580ce7189332b43038d52c56a9689";
sha256 = "062pdly0m2hk8ly8li5psvpbj1mi7m1a15k8wyzf79q7294l5li3";
name = "nix-2.4${suffix}";
suffix = "pre7250_94c93437";
src = fetchurl {
url = "https://hydra.nixos.org/build/112193977/download/3/nix-2.4${suffix}.tar.xz";
sha256 = "f9baf241c9449c1e3e5c9610adbcd2ce9e5fbcab16aff3ba3030d2fad7b34d7b";
};
fromGit = true;
inherit storeDir stateDir confDir boehmgc;
});
nixFlakes = lib.lowPrio (callPackage common rec {
name = "nix-2.4${suffix}";
suffix = "pre20191022_9cac895";
src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "9cac895406724e0304dff140379783c4d786e855";
hash = "sha256-Y1cdnCNoJmjqyC/a+Nt2N+5L3Ttg7K7zOD7gmtg1QzA=";
suffix = "pre20200207_d2032ed";
src = fetchurl {
url = "https://hydra.nixos.org/build/111815420/download/3/nix-2.4${suffix}.tar.xz";
sha256 = "e72a20efeee4ccc704cca3a06de9185fb8742bc7ef1a62af5896ec0f379b9ceb";
};
fromGit = true;
inherit storeDir stateDir confDir boehmgc;
});