diff --git a/pkgs/by-name/ar/archi/package.nix b/pkgs/by-name/ar/archi/package.nix index 8bf9c5806541..02238be0e7a7 100644 --- a/pkgs/by-name/ar/archi/package.nix +++ b/pkgs/by-name/ar/archi/package.nix @@ -11,6 +11,8 @@ wrapGAppsHook3, _7zz, nixosTests, + copyDesktopItems, + makeDesktopItem, }: stdenv.mkDerivation rec { @@ -48,6 +50,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook + copyDesktopItems ]; sourceRoot = if stdenv.hostPlatform.isDarwin then "." else null; @@ -55,6 +58,8 @@ stdenv.mkDerivation rec { installPhase = if stdenv.hostPlatform.system == "x86_64-linux" then '' + runHook preInstall + mkdir -p $out/bin $out/libexec for f in configuration features p2 plugins Archi.ini; do cp -r $f $out/libexec @@ -70,13 +75,35 @@ stdenv.mkDerivation rec { } \ --set WEBKIT_DISABLE_DMABUF_RENDERER 1 \ --prefix PATH : ${jdk}/bin + + install -Dm444 icon.xpm $out/share/icons/hicolor/256x256/apps/archi.xpm + + runHook postInstall '' else '' + runHook preInstall + mkdir -p "$out/Applications" mv Archi.app "$out/Applications/" + + runHook postInstall ''; + desktopItems = [ + (makeDesktopItem { + name = "archi"; + desktopName = "Archi"; + exec = "Archi"; + type = "Application"; + comment = meta.description; + icon = "archi"; + categories = [ + "Development" + ]; + }) + ]; + passthru.updateScript = ./update.sh; passthru.tests = { inherit (nixosTests) archi; };