diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-27 18:40:33 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-27 18:40:41 +0000 |
commit | 030c5028b07afcedce7c5956015c629486cc79d9 (patch) | |
tree | 4c3cb9c6cff0e30919a97fc0c1d3203446696f4e /pkgs/tools/misc/fend/default.nix | |
parent | 4b852f7ef3cb92277f212ba7dc168da1073e65cc (diff) | |
parent | 04c0744afbab2369baf4f134c544db3f24164d80 (diff) | |
download | nixpkgs-030c5028b07afcedce7c5956015c629486cc79d9.tar nixpkgs-030c5028b07afcedce7c5956015c629486cc79d9.tar.gz nixpkgs-030c5028b07afcedce7c5956015c629486cc79d9.tar.bz2 nixpkgs-030c5028b07afcedce7c5956015c629486cc79d9.tar.lz nixpkgs-030c5028b07afcedce7c5956015c629486cc79d9.tar.xz nixpkgs-030c5028b07afcedce7c5956015c629486cc79d9.tar.zst nixpkgs-030c5028b07afcedce7c5956015c629486cc79d9.zip |
Rebase onto c1a53897ad4290a1cbfa02fbe6f3869577b93744
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/tools/misc/fend/default.nix')
-rw-r--r-- | pkgs/tools/misc/fend/default.nix | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/pkgs/tools/misc/fend/default.nix b/pkgs/tools/misc/fend/default.nix index ad65708b435..7caff952372 100644 --- a/pkgs/tools/misc/fend/default.nix +++ b/pkgs/tools/misc/fend/default.nix @@ -5,22 +5,25 @@ , darwin , pandoc , installShellFiles +, copyDesktopItems +, makeDesktopItem +, nix-update-script }: rustPlatform.buildRustPackage rec { pname = "fend"; - version = "1.2.0"; + version = "1.2.2"; src = fetchFromGitHub { owner = "printfn"; repo = pname; rev = "v${version}"; - sha256 = "sha256-vV7P2e6kv6CCHbI5Roz9WElntl3t/5ySXUw3XXEXMv4="; + sha256 = "sha256-9O+2vCi3CagpIU5pZPA8tLVhyC7KHn93trYdNhsT4n4="; }; - cargoHash = "sha256-oAkZHx33YrwRUUIoooqpy72QCq0ZkAgBZ8W8XDe2fNE="; + 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"; }; } |