retroarch: fix retroarch-cg2glsl script

Patch script so it loads `cgc` from the correct place when
`enableNvidiaCgToolkit` is set to `true`.

Also, in case `enableNvidiaCgToolkit` is set to `false`, also remove the
manual for the script.
This commit is contained in:
Thiago Kenji Okada 2022-12-23 22:11:18 +00:00
parent 1aacb258cb
commit 3b2ea169f1

View File

@ -131,9 +131,16 @@ stdenv.mkDerivation rec {
postInstall = lib.optionalString (runtimeLibs != [ ]) ''
wrapProgram $out/bin/retroarch \
--prefix LD_LIBRARY_PATH ':' ${lib.makeLibraryPath runtimeLibs}
'' +
lib.optionalString enableNvidiaCgToolkit ''
wrapProgram $out/bin/retroarch-cg2glsl \
--prefix PATH ':' ${lib.makeBinPath [ nvidia_cg_toolkit ]}
'';
preFixup = "rm $out/bin/retroarch-cg2glsl";
preFixup = lib.optionalString (!enableNvidiaCgToolkit) ''
rm $out/bin/retroarch-cg2glsl
rm $out/share/man/man6/retroarch-cg2glsl.6*
'';
passthru.tests = nixosTests.retroarch;