Make postInstall a function

This commit is contained in:
Nathan McCarty 2023-10-21 18:53:39 -04:00
parent bace7270f9
commit 39ecba2214
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
1 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@
# Build a rust flake with a single crate
single = { src, crateName, sharedDeps ? (system: [ ])
, sharedNativeDeps ? (system: [ ]), copyBins ? true, copyLibs ? false
, postInstall ? false, }:
, postInstall ? (pkgs: false), }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
@ -107,8 +107,8 @@
# Main binary
packages.${crateName} = naersk-lib.buildPackage {
pname = "${crateName}";
inherit buildInputs nativeBuildInputs copyBins copyLibs
postInstall;
inherit buildInputs nativeBuildInputs copyBins copyLibs;
postInstall = postInstall pkgs;
root = src;
};
# binary + tests