Merge pull request #256334 from liff/fend-updates
This commit is contained in:
commit
98e16e4c28
|
@ -5,6 +5,9 @@
|
||||||
, darwin
|
, darwin
|
||||||
, pandoc
|
, pandoc
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
|
, copyDesktopItems
|
||||||
|
, makeDesktopItem
|
||||||
|
, nix-update-script
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
@ -20,7 +23,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
cargoHash = "sha256-mRIwmZwO/uqfUJ12ZYKZFPoefvo055Tp+DrfKsoP9q4=";
|
cargoHash = "sha256-mRIwmZwO/uqfUJ12ZYKZFPoefvo055Tp+DrfKsoP9q4=";
|
||||||
|
|
||||||
nativeBuildInputs = [ pandoc installShellFiles ];
|
nativeBuildInputs = [ pandoc installShellFiles copyDesktopItems ];
|
||||||
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
|
@ -38,10 +41,30 @@ rustPlatform.buildRustPackage rec {
|
||||||
[[ "$($out/bin/fend "1 km to m")" = "1000 m" ]]
|
[[ "$($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; {
|
meta = with lib; {
|
||||||
description = "Arbitrary-precision unit-aware calculator";
|
description = "Arbitrary-precision unit-aware calculator";
|
||||||
homepage = "https://github.com/printfn/fend";
|
homepage = "https://github.com/printfn/fend";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ djanatyn ];
|
maintainers = with maintainers; [ djanatyn liff ];
|
||||||
|
mainProgram = "fend";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue