nixpkgs/pkgs/by-name/rs/rsbkb/package.nix
2025-06-06 21:58:04 +02:00

44 lines
1.0 KiB
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
enableAppletSymlinks ? true,
}:
let
version = "1.4";
in
rustPlatform.buildRustPackage {
pname = "rsbkb";
inherit version;
src = fetchFromGitHub {
owner = "trou";
repo = "rsbkb";
rev = "release-${version}";
hash = "sha256-c5+Q/y2tZfhXQIAs1W67/xfB+qz1Xn33tKXRGDAi3qs=";
};
cargoPatches = [
./time.patch
];
useFetchCargoVendor = true;
cargoHash = "sha256-fg8LQXqmw5GXiQe7ZVciORWI/yhKAhywolpapNpHXZY=";
# Setup symlinks for all the utilities,
# busybox style
postInstall = lib.optionalString enableAppletSymlinks ''
cd $out/bin || exit 1
path="$(realpath --canonicalize-missing ./rsbkb)"
for i in $(./rsbkb list) ; do ln -s $path $i ; done
'';
meta = {
description = "Command line tools to encode/decode things";
homepage = "https://github.com/trou/rsbkb";
changelog = "https://github.com/trou/rsbkb/releases/tag/release-${version}";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ ProducerMatt ];
};
}