add mkNteDerivation helper function
This commit is contained in:
parent
a022e735b0
commit
66b86d7c25
2 changed files with 20 additions and 1 deletions
|
@ -13,8 +13,9 @@
|
||||||
functions = forEachSystem (
|
functions = forEachSystem (
|
||||||
system: let
|
system: let
|
||||||
pkgs = pkgsForEach.${system};
|
pkgs = pkgsForEach.${system};
|
||||||
in {
|
in rec {
|
||||||
engine = import ./engine.nix pkgs;
|
engine = import ./engine.nix pkgs;
|
||||||
|
mkNteDerivation = import ./nte-drv.nix pkgs engine;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
18
nte-drv.nix
Normal file
18
nte-drv.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
pkgs: engine: {
|
||||||
|
name,
|
||||||
|
version,
|
||||||
|
src,
|
||||||
|
extraArgs ? {},
|
||||||
|
entries ? [],
|
||||||
|
templates ? [],
|
||||||
|
}: pkgs.stdenv.mkDerivation {
|
||||||
|
inherit name version src;
|
||||||
|
|
||||||
|
buildPhase = /*sh*/''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
|
${engine src {inherit extraArgs entries templates;}}
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue