nixpkgs/pkgs/tools/package-management/nix/nix-perl.nix
Ben Wolsieffer 9f7e505dd7 nix: make Perl bindings use matching Nix version
Previously, 'nix_2_6.perl-bindings' (for example) was built from the Nix 2.6
but linked against 'nix' (the latest version). This usually causes the build
to fail.
2022-03-20 13:49:59 -04:00

41 lines
733 B
Nix

{ stdenv
, perl
, pkg-config
, curl
, nix
, libsodium
, boost
, autoreconfHook
, autoconf-archive
, nlohmann_json
}:
stdenv.mkDerivation {
pname = "nix-perl";
inherit (nix) version src;
postUnpack = "sourceRoot=$sourceRoot/perl";
# 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";
}