diff options
Diffstat (limited to 'perl')
-rw-r--r-- | perl/default.nix | 127 |
1 files changed, 72 insertions, 55 deletions
diff --git a/perl/default.nix b/perl/default.nix index 53666716e..af700eabe 100644 --- a/perl/default.nix +++ b/perl/default.nix @@ -1,63 +1,80 @@ -{ lib, fileset -, stdenv -, perl, perlPackages -, autoconf-archive, autoreconfHook, pkg-config -, nix, curl, bzip2, xz, boost, libsodium, darwin -, meson -, ninja -, buildWithMeson ? false, +{ + lib, + fileset, + stdenv, + perl, + perlPackages, + autoconf-archive, + autoreconfHook, + pkg-config, + nix, + curl, + bzip2, + xz, + boost, + libsodium, + darwin, + meson, + ninja, + buildWithMeson ? false, }: -perl.pkgs.toPerlModule (stdenv.mkDerivation { - name = "nix-perl-${nix.version}"; +perl.pkgs.toPerlModule ( + stdenv.mkDerivation { + name = "nix-perl-${nix.version}"; - src = fileset.toSource { - root = ../.; - 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 - ./Makefile - ./Makefile.config.in - ./configure.ac - ./local.mk - ] ++ lib.optionals buildWithMeson [ - ./meson.build - ]); - }; + src = fileset.toSource { + root = ../.; + 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 + ./Makefile + ./Makefile.config.in + ./configure.ac + ./local.mk + ] + ++ lib.optionals buildWithMeson [ ./meson.build ] + ); + }; - nativeBuildInputs = [ - pkg-config - ] ++ lib.optionals (!buildWithMeson) [ - autoconf-archive - autoreconfHook - ] ++ lib.optionals buildWithMeson [ - meson - ninja - ]; + nativeBuildInputs = + [ pkg-config ] + ++ lib.optionals (!buildWithMeson) [ + autoconf-archive + autoreconfHook + ] + ++ lib.optionals buildWithMeson [ + meson + ninja + ]; - buildInputs = - [ nix - curl - bzip2 - xz - perl - boost - perlPackages.DBI - perlPackages.DBDSQLite - ] - ++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + buildInputs = + [ + nix + curl + bzip2 + xz + perl + boost + perlPackages.DBI + perlPackages.DBDSQLite + ] + ++ 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"; + # Nixpkgs' Meson hook likes to set this to "plain". + mesonBuildType = "debugoptimized"; - enableParallelBuilding = true; + enableParallelBuilding = true; - postUnpack = "sourceRoot=$sourceRoot/perl"; -}) + postUnpack = "sourceRoot=$sourceRoot/perl"; + } +) |