diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-04-14 18:59:36 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-04-14 18:59:36 +0200 |
commit | 6617c8bd87e185ece1762c22ed4521adebd7c65b (patch) | |
tree | bae26b8f66fa14c858f20ae409594e4abe7bc9b9 /pkgs/tools | |
parent | 0d86c0692fcf353bb8fd12d213db292ebb7651e4 (diff) | |
parent | ce4c9c4d863b41a879a32734b09a090eaaab5280 (diff) |
A fixed version of commit eb750f9a7b2
For detailed explanation see: https://github.com/NixOS/nixpkgs/commit/24444513fb5#commitcomment-21767916
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/package-management/nix/default.nix | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 93463509b7912..629c9b685360f 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -16,7 +16,8 @@ let outputs = [ "out" "dev" "man" "doc" ]; nativeBuildInputs = - [ perl pkgconfig ] + [ pkgconfig ] + ++ lib.optionals (!lib.versionAtLeast version "1.12pre") [ perl ] ++ lib.optionals fromGit [ autoreconfHook autoconf-archive bison flex libxml2 libxslt docbook5 docbook5_xsl ]; buildInputs = [ curl openssl sqlite xz ] @@ -43,12 +44,12 @@ let [ "--with-store-dir=${storeDir}" "--localstatedir=${stateDir}" "--sysconfdir=/etc" - "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}" - "--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}" "--disable-init-state" "--enable-gc" ] - ++ lib.optional (!lib.versionAtLeast version "1.12pre") [ + ++ lib.optionals (!lib.versionAtLeast version "1.12pre") [ + "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}" + "--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}" "--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}" ]; @@ -97,13 +98,33 @@ let maintainers = [ stdenv.lib.maintainers.eelco ]; platforms = stdenv.lib.platforms.all; }; + + passthru = { inherit fromGit; }; + }; + + perl-bindings = { nix }: stdenv.mkDerivation { + name = "nix-perl-" + nix.version; + + inherit (nix) src; + + postUnpack = "sourceRoot=$sourceRoot/perl"; + + nativeBuildInputs = + [ perl pkgconfig curl nix libsodium ] + ++ lib.optionals nix.fromGit [ autoreconfHook autoconf-archive ]; + + configureFlags = + [ "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}" + "--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}" + "--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}" + ]; }; in rec { nix = nixStable; - nixStable = common rec { + nixStable = (common rec { name = "nix-1.11.8"; src = fetchurl { url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz"; @@ -117,18 +138,18 @@ in rec { --replace 'std::less<Symbol>, gc_allocator<Value *>' \ 'std::less<Symbol>, gc_allocator<std::pair<const Symbol, Value *> >' ''; - }; + }) // { perl-bindings = nixStable; }; - nixUnstable = lib.lowPrio (common rec { + nixUnstable = (lib.lowPrio (common rec { name = "nix-1.12${suffix}"; - suffix = "pre5122_c60715e"; + suffix = "pre5152_915f62fa"; src = fetchFromGitHub { owner = "NixOS"; repo = "nix"; - rev = "c60715e937e3773bbb8a114fc9b9c6577f8c5cb5"; - sha256 = "0hkc4g7i3z06y3rsdxqzdnx5rz77jb8ij1j13bdskbvpp7vfm60p"; + rev = "915f62fa19790d8f826aeb4dd3d2bb5bde2f67e9"; + sha256 = "0mf7y7hvzw2x5dp482qy8774djr3vzcjaqq58cp82zdil8l7kwjd"; }; fromGit = true; - }); + })) // { perl-bindings = perl-bindings { nix = nixUnstable; }; }; } |