git.iko.soy/typeable/nixpkgs
on master help sign in
Add nixUnstable.perl-bindings
commit29b415dcdb9bca8655f09f7fee46be268bb9af87 authorEelco Dolstra <edolstra@gmail.com> dateTue 11 Apr 2017, 15:36 (10 years ago) parent3dd66ec
1 file changed+29−8
pkgs/tools/package-management/nix/default.nix+29−8
pkgs/tools/package-management/nix/default.nix+29−8
@@ -16,7 +16,8 @@ let
1616 outputs = [ "out" "dev" "man" "doc" ];
1717
1818 nativeBuildInputs =
19− [ perl pkgconfig ]
19+ [ pkgconfig ]
20+ ++ lib.optionals (!lib.versionAtLeast version "1.12pre") [ perl ]
2021 ++ lib.optionals fromGit [ autoreconfHook autoconf-archive bison flex libxml2 libxslt docbook5 docbook5_xsl ];
2122
2223 buildInputs = [ curl openssl sqlite xz ]
@@ -43,12 +44,12 @@ let
4344 [ "--with-store-dir=${storeDir}"
4445 "--localstatedir=${stateDir}"
4546 "--sysconfdir=/etc"
46− "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
47− "--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
4847 "--disable-init-state"
4948 "--enable-gc"
5049 ]
51− ++ lib.optional (!lib.versionAtLeast version "1.12pre") [
50+ ++ lib.optionals (!lib.versionAtLeast version "1.12pre") [
51+ "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
52+ "--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
5253 "--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}"
5354 ];
5455
@@ -97,13 +98,33 @@ let
9798 maintainers = [ stdenv.lib.maintainers.eelco ];
9899 platforms = stdenv.lib.platforms.all;
99100 };
101+
102+ passthru = { inherit fromGit; };
103+ };
104+
105+ perl-bindings = { nix }: stdenv.mkDerivation {
106+ name = "nix-perl-" + nix.version;
107+
108+ inherit (nix) src;
109+
110+ postUnpack = "sourceRoot=$sourceRoot/perl";
111+
112+ nativeBuildInputs =
113+ [ perl pkgconfig curl nix libsodium ]
114+ ++ lib.optionals nix.fromGit [ autoreconfHook autoconf-archive ];
115+
116+ configureFlags =
117+ [ "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
118+ "--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
119+ "--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}"
120+ ];
100121 };
101122
102123in rec {
103124
104125 nix = nixStable;
105126
106− nixStable = common rec {
127+ nixStable = (common rec {
107128 name = "nix-1.11.8";
108129 src = fetchurl {
109130 url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz";
@@ -117,9 +138,9 @@ in rec {
117138 --replace 'std::less<Symbol>, gc_allocator<Value *>' \
118139 'std::less<Symbol>, gc_allocator<std::pair<const Symbol, Value *> >'
119140 '';
120− };
141+ }) // { perl-bindings = nixStable; };
121142
122− nixUnstable = lib.lowPrio (common rec {
143+ nixUnstable = (lib.lowPrio (common rec {
123144 name = "nix-1.12${suffix}";
124145 suffix = "pre5152_915f62fa";
125146 src = fetchFromGitHub {
@@ -129,6 +150,6 @@ in rec {
129150 sha256 = "0mf7y7hvzw2x5dp482qy8774djr3vzcjaqq58cp82zdil8l7kwjd";
130151 };
131152 fromGit = true;
132− });
153+ })) // { perl-bindings = perl-bindings { nix = nixUnstable; }; };
133154
134155}