aboutsummaryrefslogtreecommitdiff
path: root/perl/default.nix
diff options
context:
space:
mode:
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";