From 3b2ea169f1adc4a03ac93f9f917fc570bf167651 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 23 Dec 2022 22:11:18 +0000 Subject: [PATCH] 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. --- pkgs/applications/emulators/retroarch/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/emulators/retroarch/default.nix b/pkgs/applications/emulators/retroarch/default.nix index 442d7caa2e1a..5c18d47daa8a 100644 --- a/pkgs/applications/emulators/retroarch/default.nix +++ b/pkgs/applications/emulators/retroarch/default.nix @@ -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;