Unverified Commit bfbe5796 authored by Yohann Boniface's avatar Yohann Boniface Committed by GitHub
Browse files

dreamchess: fix default engine propagation (#448340)

parents f4741884 68c30fe1
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
  bison,
  flex,
  gettext,
  makeWrapper,
  SDL2,
  SDL2_image,
  SDL2_mixer,
@@ -48,6 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
    bison
    flex
    gettext
    makeWrapper
  ];
  cmakeFlags = [
    (lib.cmakeBool "CMAKE_VERBOSE_MAKEFILE" true)
@@ -55,10 +57,18 @@ stdenv.mkDerivation (finalAttrs: {
    (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;

  postInstallCheck = ''
    stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}"
    stat "''${!outputBin}/bin/dreamer"
  '';

  meta = {