Skip to content

Commit

Permalink
nixUnstable: 1.12pre5350_7689181e -> 1.12pre5413_b4b1f452
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Jun 6, 2017
1 parent 66e0595 commit 3d4a8e1
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions pkgs/tools/package-management/nix/default.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,46 @@
{ lib, stdenv, fetchurl, fetchFromGitHub, perl, curl, bzip2, sqlite, openssl ? null, xz
, pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli, readline
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook5_xsl
, libseccomp, busybox
, storeDir ? "/nix/store"
, stateDir ? "/nix/var"
, confDir ? "/etc"
}:

let

sh = busybox.override {
useMusl = true;
enableStatic = true;
enableMinimal = true;
extraConfig = ''
CONFIG_ASH y
CONFIG_ASH_BUILTIN_ECHO y
CONFIG_ASH_BUILTIN_TEST y
CONFIG_ASH_OPTIMIZE_FOR_SIZE y
'';
};

common = { name, suffix ? "", src, fromGit ? false }: stdenv.mkDerivation rec {
inherit name src;
version = lib.getVersion name;

is112 = lib.versionAtLeast version "1.12pre";

VERSION_SUFFIX = lib.optionalString fromGit suffix;

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

nativeBuildInputs =
[ pkgconfig ]
++ lib.optionals (!lib.versionAtLeast version "1.12pre") [ perl ]
++ lib.optionals (!is112) [ perl ]
++ lib.optionals fromGit [ autoreconfHook autoconf-archive bison flex libxml2 libxslt docbook5 docbook5_xsl ];

buildInputs = [ curl openssl sqlite xz ]
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
++ lib.optionals fromGit [ brotli readline ] # Since 1.12
++ lib.optional ((stdenv.isLinux || stdenv.isDarwin) && lib.versionAtLeast version "1.12pre")
++ lib.optional (stdenv.isLinux && is112) libseccomp
++ lib.optional ((stdenv.isLinux || stdenv.isDarwin) && is112)
(aws-sdk-cpp.override {
apis = ["s3"];
customMemoryManagement = false;
Expand All @@ -48,10 +64,12 @@ let
"--disable-init-state"
"--enable-gc"
]
++ lib.optionals (!lib.versionAtLeast version "1.12pre") [
++ lib.optionals (!is112) [
"--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
"--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
"--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}"
] ++ lib.optionals (is112 && stdenv.isLinux) [
"--with-sandbox-shell=${sh}/bin/busybox"
];

makeFlags = "profiledir=$(out)/etc/profile.d";
Expand Down Expand Up @@ -139,12 +157,12 @@ in rec {

nixUnstable = (lib.lowPrio (common rec {
name = "nix-1.12${suffix}";
suffix = "pre5350_7689181e";
suffix = "pre5413_b4b1f452";
src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "7689181e4f5921d3356736996079ec0310e834c6";
sha256 = "08daxcpj18dffsbqs3fckahq06gzs8kl6xr4b4jgijwdl5vqwiri";
rev = "b4b1f4525f8dc8f320d666c208bff5cb36777580";
sha256 = "0qb18k2rp6bbg8g50754srl95dq0lr96i297856yhrx1hh1ja37z";
};
fromGit = true;
})) // { perl-bindings = perl-bindings { nix = nixUnstable; }; };
Expand Down

2 comments on commit 3d4a8e1

@Mic92
Copy link
Member

@Mic92 Mic92 commented on 3d4a8e1 Jun 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason I now get an infinite recursion error, when evaluating the following nixos configuration:

# configuration.nix
nix.package = pkgs.nixUnstable;

Can somebody else confirm or decline that?

sudo nixos-rebuild switch --show-trace
building Nix...                   
building the system configuration...                                
error: stack overflow (possible infinite recursion)

@edolstra
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mic92 I can't reproduce that...

Please sign in to comment.