diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2022-05-20 11:51:34 +0200 |
---|---|---|
committer | Matthieu Coudron <teto@users.noreply.github.com> | 2022-05-21 15:13:28 +0200 |
commit | 8a1f275216d9979b58f772e59d62cb8aa3c8b822 (patch) | |
tree | ab56706c1d93562a1a4cdb7976d9b843f8018121 /pkgs/games/domination | |
parent | 705f5cf21e727052455bc2eee831e718404059a9 (diff) |
domination: fix desktop items installation
Use copyDesktopItems instead of copying them manually
Diffstat (limited to 'pkgs/games/domination')
-rw-r--r-- | pkgs/games/domination/default.nix | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/pkgs/games/domination/default.nix b/pkgs/games/domination/default.nix index 8ef45b850198..18153dec0fb0 100644 --- a/pkgs/games/domination/default.nix +++ b/pkgs/games/domination/default.nix @@ -6,6 +6,7 @@ , ant , makeWrapper , makeDesktopItem +, copyDesktopItems , nixosTests }: @@ -41,14 +42,23 @@ in stdenv.mkDerivation { jdk8 ant makeWrapper + copyDesktopItems ]; buildPhase = '' + runHook preBuild cd swingUI ant + runHook postBuild ''; + desktopItems = [ + desktopItem + editorDesktopItem + ]; + installPhase = '' + runHook preInstall # Remove unnecessary files and launchers (they'd need to be wrapped anyway) rm -r \ build/game/src.zip \ @@ -69,13 +79,8 @@ in stdenv.mkDerivation { --chdir "$out/share/domination" \ --add-flags "-cp $out/share/domination/Domination.jar net.yura.domination.ui.swinggui.SwingGUIFrame" - install -Dm644 \ - ${desktopItem}/share/applications/Domination.desktop \ - $out/share/applications/Domination.desktop - install -Dm644 \ - "${editorDesktopItem}/share/applications/Domination Map Editor.desktop" \ - "$out/share/applications/Domination Map Editor.desktop" install -Dm644 build/game/resources/icon.png $out/share/pixmaps/domination.png + runHook postInstall ''; passthru.tests = { |