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