From cc6a88501a5c4d5e884f729b6afdf6f06539f255 Mon Sep 17 00:00:00 2001 From: Olli Helenius Date: Fri, 3 Oct 2025 11:09:18 +0300 Subject: [PATCH] oxker: add a desktop file --- pkgs/by-name/ox/oxker/package.nix | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/pkgs/by-name/ox/oxker/package.nix b/pkgs/by-name/ox/oxker/package.nix index 4741fd5b4726..07037c28429a 100644 --- a/pkgs/by-name/ox/oxker/package.nix +++ b/pkgs/by-name/ox/oxker/package.nix @@ -4,6 +4,8 @@ fetchCrate, rustPlatform, nix-update-script, + makeDesktopItem, + copyDesktopItems, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -25,6 +27,36 @@ rustPlatform.buildRustPackage (finalAttrs: { passthru.updateScript = nix-update-script { }; + nativeBuildInputs = [ + copyDesktopItems + ]; + + desktopItems = [ + (makeDesktopItem { + name = finalAttrs.pname; + desktopName = "oxker"; + comment = finalAttrs.meta.description; + exec = finalAttrs.meta.mainProgram; + icon = "oxker"; + terminal = true; + categories = [ + "System" + "Utility" + "Monitor" + "ConsoleOnly" + ]; + keywords = [ + "docker" + "container" + ]; + }) + ]; + + postInstall = '' + mkdir --parents $out/share/icons/hicolor/scalable/apps + cp .github/logo.svg $out/share/icons/hicolor/scalable/apps/oxker.svg + ''; + meta = { description = "Simple TUI to view & control docker containers"; homepage = "https://github.com/mrjackwills/oxker";