dreamchess: fix default engine propagation

This commit is contained in:
Marcos Benevides
2025-10-03 17:03:52 -04:00
parent 5d8279161e
commit 68c30fe1c4

View File

@@ -6,6 +6,7 @@
bison, bison,
flex, flex,
gettext, gettext,
makeWrapper,
SDL2, SDL2,
SDL2_image, SDL2_image,
SDL2_mixer, SDL2_mixer,
@@ -48,6 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
bison bison
flex flex
gettext gettext
makeWrapper
]; ];
cmakeFlags = [ cmakeFlags = [
(lib.cmakeBool "CMAKE_VERBOSE_MAKEFILE" true) (lib.cmakeBool "CMAKE_VERBOSE_MAKEFILE" true)
@@ -55,10 +57,18 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeFeature "CMAKE_INSTALL_DATAROOTDIR" "${placeholder "out"}/share") (lib.cmakeFeature "CMAKE_INSTALL_DATAROOTDIR" "${placeholder "out"}/share")
]; ];
# This makes sure the default engine (dreamer) will be called from
# the /nix/store/ as well when starting a new game
postFixup = ''
wrapProgram $out/bin/dreamchess \
--prefix PATH : $out/bin
'';
doInstallCheck = true; doInstallCheck = true;
postInstallCheck = '' postInstallCheck = ''
stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}" stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}"
stat "''${!outputBin}/bin/dreamer"
''; '';
meta = { meta = {