depot/third_party/nixpkgs/pkgs/tools/package-management/nix/nix-perl.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

45 lines
808 B
Nix

{ stdenv
, lib
, perl
, pkg-config
, curl
, nix
, libsodium
, boost
, autoreconfHook
, autoconf-archive
, nlohmann_json
, Security
}:
stdenv.mkDerivation {
pname = "nix-perl";
inherit (nix) version src;
postUnpack = "sourceRoot=$sourceRoot/perl";
buildInputs = lib.optional (stdenv.isDarwin) Security;
# This is not cross-compile safe, don't have time to fix right now
# but noting for future travellers.
nativeBuildInputs = [
autoconf-archive
autoreconfHook
boost
curl
libsodium
nix
nlohmann_json
perl
pkg-config
];
configureFlags = [
"--with-dbi=${perl.pkgs.DBI}/${perl.libPrefix}"
"--with-dbd-sqlite=${perl.pkgs.DBDSQLite}/${perl.libPrefix}"
];
preConfigure = "export NIX_STATE_DIR=$TMPDIR";
preBuild = "unset NIX_INDENT_MAKE";
}