nexusmods-app: cleanup tests & mainProgram
refs
We still need to fix the tests to use `finalAttrs`, but that requires changes to `buildDotnetModule`.
This commit is contained in:
parent
7166d5242f
commit
e54e9fac95
@ -58,7 +58,7 @@ buildDotnetModule rec {
|
|||||||
|
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
"--prefix PATH : ${lib.makeBinPath [ desktop-file-utils ]}"
|
"--prefix PATH : ${lib.makeBinPath [ desktop-file-utils ]}"
|
||||||
"--set APPIMAGE $out/bin/${meta.mainProgram}" # Make associating with nxm links work on Linux
|
"--set APPIMAGE ${placeholder "out"}/bin/${meta.mainProgram}" # Make associating with nxm links work on Linux
|
||||||
];
|
];
|
||||||
|
|
||||||
runtimeDeps = [
|
runtimeDeps = [
|
||||||
@ -68,7 +68,7 @@ buildDotnetModule rec {
|
|||||||
libX11
|
libX11
|
||||||
];
|
];
|
||||||
|
|
||||||
executables = [ nexusmods-app.meta.mainProgram ];
|
executables = [ meta.mainProgram ];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
@ -92,24 +92,34 @@ buildDotnetModule rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
tests = {
|
tests =
|
||||||
serve = runCommand "${pname}-test-serve" { } ''
|
let
|
||||||
${nexusmods-app}/bin/${nexusmods-app.meta.mainProgram}
|
runTest =
|
||||||
touch $out
|
name: script:
|
||||||
'';
|
runCommand "${pname}-test-${name}"
|
||||||
help = runCommand "${pname}-test-help" { } ''
|
{
|
||||||
${nexusmods-app}/bin/${nexusmods-app.meta.mainProgram} --help
|
# TODO: use finalAttrs when buildDotnetModule has support
|
||||||
touch $out
|
nativeBuildInputs = [ nexusmods-app ];
|
||||||
'';
|
}
|
||||||
associate-nxm = runCommand "${pname}-test-associate-nxm" { } ''
|
''
|
||||||
${nexusmods-app}/bin/${nexusmods-app.meta.mainProgram} associate-nxm
|
${script}
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
list-tools = runCommand "${pname}-test-list-tools" { } ''
|
in
|
||||||
${nexusmods-app}/bin/${nexusmods-app.meta.mainProgram} list-tools
|
{
|
||||||
touch $out
|
serve = runTest "serve" ''
|
||||||
'';
|
NexusMods.App
|
||||||
};
|
'';
|
||||||
|
help = runTest "help" ''
|
||||||
|
NexusMods.App --help
|
||||||
|
'';
|
||||||
|
associate-nxm = runTest "associate-nxm" ''
|
||||||
|
NexusMods.App associate-nxm
|
||||||
|
'';
|
||||||
|
list-tools = runTest "list-tools" ''
|
||||||
|
NexusMods.App list-tools
|
||||||
|
'';
|
||||||
|
};
|
||||||
updateScript = ./update.bash;
|
updateScript = ./update.bash;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user