mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-13 18:54:30 +02:00
modules/test: switch to runCommand
This commit is contained in:
parent
1085bcd7cc
commit
af31063538
1 changed files with 42 additions and 47 deletions
|
@ -46,15 +46,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
test.derivation = pkgs.stdenv.mkDerivation {
|
||||
inherit (cfg) name;
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ config.finalPackage ];
|
||||
|
||||
# First check warnings/assertions, then run nvim
|
||||
buildPhase =
|
||||
config =
|
||||
let
|
||||
showErr =
|
||||
name: lines:
|
||||
|
@ -72,6 +64,11 @@ in
|
|||
err + showErr name lines
|
||||
) "" toCheck;
|
||||
in
|
||||
{
|
||||
test.derivation =
|
||||
pkgs.runCommandNoCCLocal cfg.name { nativeBuildInputs = [ config.finalPackage ]; }
|
||||
(
|
||||
# First check warnings/assertions, then run nvim
|
||||
lib.optionalString (errors != "") ''
|
||||
echo -n ${lib.escapeShellArg errors}
|
||||
exit 1
|
||||
|
@ -88,12 +85,10 @@ in
|
|||
echo "ERROR: $output"
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
|
||||
# If we don't do this nix is not happy
|
||||
installPhase = ''
|
||||
''
|
||||
+ ''
|
||||
touch $out
|
||||
'';
|
||||
};
|
||||
''
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue