aboutsummaryrefslogtreecommitdiff
path: root/perl/default.nix
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-04-01 14:06:44 -0600
committerQyriad <qyriad@qyriad.me>2024-04-02 11:22:42 -0600
commit4f5e532b8bf6196c19e1ca37c450c3635882269a (patch)
tree25def138acef1cc44a074ca855fc251ba102a37d /perl/default.nix
parentd2aca15f31f39ab1548ae8410932293504d0eb36 (diff)
meson: implement perl bindings
Change-Id: Ie1bfb0aa784e6136a82d518a652d0ae60c4b047a
Diffstat (limited to 'perl/default.nix')
-rw-r--r--perl/default.nix33
1 files changed, 24 insertions, 9 deletions
diff --git a/perl/default.nix b/perl/default.nix
index a1940402e..53666716e 100644
--- a/perl/default.nix
+++ b/perl/default.nix
@@ -3,6 +3,9 @@
, perl, perlPackages
, autoconf-archive, autoreconfHook, pkg-config
, nix, curl, bzip2, xz, boost, libsodium, darwin
+, meson
+, ninja
+, buildWithMeson ? false,
}:
perl.pkgs.toPerlModule (stdenv.mkDerivation {
@@ -10,24 +13,33 @@ perl.pkgs.toPerlModule (stdenv.mkDerivation {
src = fileset.toSource {
root = ../.;
- fileset = fileset.unions [
+ fileset = fileset.unions ([
../.version
+ ./lib
+ ] ++ lib.optionals (!buildWithMeson) [
+ # FIXME(Qyriad): What the hell is this?
+ # What is it used for and do we still need it?
+ ./MANIFEST
../m4
../mk
- ./MANIFEST
./Makefile
./Makefile.config.in
./configure.ac
- ./lib
./local.mk
- ];
+ ] ++ lib.optionals buildWithMeson [
+ ./meson.build
+ ]);
};
- nativeBuildInputs =
- [ autoconf-archive
- autoreconfHook
- pkg-config
- ];
+ nativeBuildInputs = [
+ pkg-config
+ ] ++ lib.optionals (!buildWithMeson) [
+ autoconf-archive
+ autoreconfHook
+ ] ++ lib.optionals buildWithMeson [
+ meson
+ ninja
+ ];
buildInputs =
[ nix
@@ -42,6 +54,9 @@ perl.pkgs.toPerlModule (stdenv.mkDerivation {
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
+ # Nixpkgs' Meson hook likes to set this to "plain".
+ mesonBuildType = "debugoptimized";
+
enableParallelBuilding = true;
postUnpack = "sourceRoot=$sourceRoot/perl";