Make postInstall a function
This commit is contained in:
parent
bace7270f9
commit
39ecba2214
|
@ -61,7 +61,7 @@
|
||||||
# Build a rust flake with a single crate
|
# Build a rust flake with a single crate
|
||||||
single = { src, crateName, sharedDeps ? (system: [ ])
|
single = { src, crateName, sharedDeps ? (system: [ ])
|
||||||
, sharedNativeDeps ? (system: [ ]), copyBins ? true, copyLibs ? false
|
, sharedNativeDeps ? (system: [ ]), copyBins ? true, copyLibs ? false
|
||||||
, postInstall ? false, }:
|
, postInstall ? (pkgs: false), }:
|
||||||
utils.lib.eachDefaultSystem (system:
|
utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
|
@ -107,8 +107,8 @@
|
||||||
# Main binary
|
# Main binary
|
||||||
packages.${crateName} = naersk-lib.buildPackage {
|
packages.${crateName} = naersk-lib.buildPackage {
|
||||||
pname = "${crateName}";
|
pname = "${crateName}";
|
||||||
inherit buildInputs nativeBuildInputs copyBins copyLibs
|
inherit buildInputs nativeBuildInputs copyBins copyLibs;
|
||||||
postInstall;
|
postInstall = postInstall pkgs;
|
||||||
root = src;
|
root = src;
|
||||||
};
|
};
|
||||||
# binary + tests
|
# binary + tests
|
||||||
|
|
Loading…
Reference in New Issue