Skip to content

Commit

Permalink
nixUnstable: 3.0pre20200829_f156513 -> 3.0pre20201020_e0ca98c
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Oct 21, 2020
1 parent c12e017 commit f25bb56
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions pkgs/tools/package-management/nix/default.nix
Expand Up @@ -11,8 +11,9 @@ common =
{ lib, stdenv, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz
, bash, coreutils, gzip, gnutar
, pkgconfig, boehmgc, perlPackages, libsodium, brotli, boost, editline, nlohmann_json
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns
, autoreconfHook, autoconf-archive, bison, flex
, jq, libarchive
, lowdown, mdbook
# Used by tests
, gmock
, busybox-sandbox-shell
Expand All @@ -31,24 +32,29 @@ common =
inherit name src;
version = lib.getVersion name;

is24 = lib.versionAtLeast version "2.4pre";
isExactly23 = lib.versionAtLeast version "2.3" && lib.versionOlder version "2.4";
is30 = lib.versionAtLeast version "3.0pre";
isExactly30 = lib.versionAtLeast version "2.3" && lib.versionOlder version "3.0";

VERSION_SUFFIX = suffix;

outputs = [ "out" "dev" "man" "doc" ];

nativeBuildInputs =
[ pkgconfig ]
++ lib.optionals is24 [ autoreconfHook autoconf-archive bison flex libxml2 libxslt
docbook5 docbook_xsl_ns jq ];
++ lib.optionals is30
[ autoreconfHook
autoconf-archive
bison flex
lowdown mdbook
jq
];

buildInputs =
[ curl openssl sqlite xz bzip2 nlohmann_json
brotli boost editline
]
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
++ lib.optionals is24 [ libarchive gmock ]
++ lib.optionals is30 [ libarchive gmock ]
++ lib.optional withLibseccomp libseccomp
++ lib.optional withAWS
((aws-sdk-cpp.override {
Expand Down Expand Up @@ -87,9 +93,9 @@ common =
patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.*
''}
'' +
# For Nix-2.3, patch around an issue where the Nix configure step pulls in the
# For Nix 3.0, patch around an issue where the Nix configure step pulls in the
# build system's bash and other utilities when cross-compiling
lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform && isExactly23) ''
lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform && isExactly30) ''
mkdir tmp/
substitute corepkgs/config.nix.in tmp/config.nix.in \
--subst-var-by bash ${bash}/bin/bash \
Expand Down Expand Up @@ -162,7 +168,7 @@ common =
# This is not cross-compile safe, don't have time to fix right now
# but noting for future travellers.
nativeBuildInputs =
[ perl pkgconfig curl nix libsodium boost autoreconfHook autoconf-archive ];
[ perl pkgconfig curl nix libsodium boost autoreconfHook autoconf-archive nlohmann_json ];

configureFlags =
[ "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
Expand Down Expand Up @@ -193,13 +199,13 @@ in rec {

nixUnstable = lib.lowPrio (callPackage common rec {
name = "nix-3.0${suffix}";
suffix = "pre20200829_f156513";
suffix = "pre20201020_e0ca98c";

src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "f15651303f8596bf34c67fc8d536b1e9e7843a87";
hash = "sha256-HqM3Z4DLdMrf+0PPZL9ysctGg+K+i3S/IHA1GsJj0Ro=";
rev = "e0ca98c2071b815578470e280df8fdb750c7e23b";
hash = "sha256-KVS/Z6FzMBOl5XCyOLwfiVoX7G2LQRa9HMGNnJRPCoo=";
};

inherit storeDir stateDir confDir boehmgc;
Expand Down

0 comments on commit f25bb56

Please sign in to comment.