diff options
author | Artturi <Artturin@artturin.com> | 2023-09-21 08:11:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-21 08:11:32 +0300 |
commit | 98e16e4c28d4a3ae6334b4e65e6607f3cf23da85 (patch) | |
tree | 2f0a031223cf26a6edb4f8bd5c24c3cf251da3a0 | |
parent | 28c306a5ce8910b9ed688d672d7224131ea34f94 (diff) | |
parent | fdf790bbe4449b8459a7ae3f3a3b5805782887f0 (diff) | |
download | nixpkgs-98e16e4c28d4a3ae6334b4e65e6607f3cf23da85.tar nixpkgs-98e16e4c28d4a3ae6334b4e65e6607f3cf23da85.tar.gz nixpkgs-98e16e4c28d4a3ae6334b4e65e6607f3cf23da85.tar.bz2 nixpkgs-98e16e4c28d4a3ae6334b4e65e6607f3cf23da85.tar.lz nixpkgs-98e16e4c28d4a3ae6334b4e65e6607f3cf23da85.tar.xz nixpkgs-98e16e4c28d4a3ae6334b4e65e6607f3cf23da85.tar.zst nixpkgs-98e16e4c28d4a3ae6334b4e65e6607f3cf23da85.zip |
Merge pull request #256334 from liff/fend-updates
-rw-r--r-- | pkgs/tools/misc/fend/default.nix | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/pkgs/tools/misc/fend/default.nix b/pkgs/tools/misc/fend/default.nix index e0f208c2a56..7caff952372 100644 --- a/pkgs/tools/misc/fend/default.nix +++ b/pkgs/tools/misc/fend/default.nix @@ -5,6 +5,9 @@ , darwin , pandoc , installShellFiles +, copyDesktopItems +, makeDesktopItem +, nix-update-script }: rustPlatform.buildRustPackage rec { @@ -20,7 +23,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-mRIwmZwO/uqfUJ12ZYKZFPoefvo055Tp+DrfKsoP9q4="; - nativeBuildInputs = [ pandoc installShellFiles ]; + nativeBuildInputs = [ pandoc installShellFiles copyDesktopItems ]; buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; postBuild = '' @@ -38,10 +41,30 @@ rustPlatform.buildRustPackage rec { [[ "$($out/bin/fend "1 km to m")" = "1000 m" ]] ''; + postInstall = '' + install -D -m 444 $src/icon/fend-icon-256.png $out/share/icons/hicolor/256x256/apps/fend.png + ''; + + desktopItems = [ + (makeDesktopItem { + name = "fend"; + desktopName = "fend"; + genericName = "Calculator"; + comment = "Arbitrary-precision unit-aware calculator"; + icon = "fend"; + exec = "fend"; + terminal = true; + categories = [ "Utility" "Calculator" "ConsoleOnly" ]; + }) + ]; + + passthru.updateScript = nix-update-script { }; + meta = with lib; { description = "Arbitrary-precision unit-aware calculator"; homepage = "https://github.com/printfn/fend"; license = licenses.mit; - maintainers = with maintainers; [ djanatyn ]; + maintainers = with maintainers; [ djanatyn liff ]; + mainProgram = "fend"; }; } |