aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 04:37:44 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 04:37:44 +0100
commit7d8b34475aa94b607995df7f4b94c9042dd57058 (patch)
tree000f348e55b02a79d6aa61bf8c624a2cbd9618b8 /flake.nix
parente12e9f2452681a3036884e9e778154b35246d39e (diff)
Merge pull request #9152 from obsidiansystems/split-out-perl-nix
Factor out Perl bindings Nix package (cherry picked from commit d12c614ac75171421844f3706d89913c3d841460) Change-Id: Ie75ccfec8cc815ea95ae9848cb03e33aa8cee5ae
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix43
1 files changed, 4 insertions, 39 deletions
diff --git a/flake.nix b/flake.nix
index a22964023..beaeabcd2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -475,45 +475,10 @@
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
- passthru.perl-bindings = with final; perl.pkgs.toPerlModule (currentStdenv.mkDerivation {
- name = "nix-perl-${version}";
-
- src = fileset.toSource {
- root = ./.;
- fileset = fileset.intersect baseFiles (fileset.unions [
- ./perl
- ./.version
- ./m4
- ./mk
- ]);
- };
-
- nativeBuildInputs =
- [ buildPackages.autoconf-archive
- buildPackages.autoreconfHook
- buildPackages.pkg-config
- ];
-
- buildInputs =
- [ nix
- curl
- bzip2
- xz
- pkgs.perl
- boost
- ]
- ++ lib.optional (currentStdenv.isLinux || currentStdenv.isDarwin) libsodium
- ++ lib.optional currentStdenv.isDarwin darwin.apple_sdk.frameworks.Security;
-
- configureFlags = [
- "--with-dbi=${perlPackages.DBI}/${pkgs.perl.libPrefix}"
- "--with-dbd-sqlite=${perlPackages.DBDSQLite}/${pkgs.perl.libPrefix}"
- ];
-
- enableParallelBuilding = true;
-
- postUnpack = "sourceRoot=$sourceRoot/perl";
- });
+ passthru.perl-bindings = final.callPackage ./perl {
+ inherit fileset;
+ stdenv = currentStdenv;
+ };
meta.platforms = lib.platforms.unix;
});