Unverified Commit 5fc1c226 authored by Rishab Garg's avatar Rishab Garg
Browse files

doomrunner: fix postInstall on darwin

parent e8831cfd
Loading
Loading
Loading
Loading
+14 −7
Original line number Diff line number Diff line
@@ -27,11 +27,18 @@ stdenv.mkDerivation (finalAttrs: {
    "INSTALL_ROOT=${placeholder "out"}"
  ];

  postInstall = ''
  postInstall =
    lib.optionalString stdenv.hostPlatform.isDarwin ''
      mkdir -p $out/Applications
      mv $out/usr/bin/DoomRunner.app $out/Applications/
    ''
    + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
      mkdir -p $out/{bin,share/applications,share/icons/hicolor/128x128/apps}
      install -Dm444 $src/Install/XDG/DoomRunner.128x128.png $out/share/icons/hicolor/128x128/apps/DoomRunner.png
      install -Dm444 $src/Install/XDG/DoomRunner.desktop $out/share/applications/DoomRunner.desktop
      install -Dm755 $out/usr/bin/DoomRunner $out/bin/DoomRunner
    ''
    + ''
      rm -rf $out/usr
    '';