nixpkgs/pkgs/tools/text/rsbkb/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
960 B
Nix
Raw Normal View History

2023-08-14 05:55:23 +02:00
{ lib
, fetchFromGitHub
, rustPlatform
, enableAppletSymlinks ? true
}:
rustPlatform.buildRustPackage rec {
pname = "rsbkb";
2023-10-19 04:17:16 +02:00
version = "1.2.1";
src = fetchFromGitHub {
owner = "trou";
repo = "rsbkb";
rev = "release-${version}";
2023-10-19 04:17:16 +02:00
hash = "sha256-+plf7BoYpEFPRsGKNrvLF8TAU3Z7nyx6Td6uRBoNGiE=";
};
2023-08-14 05:55:23 +02:00
2023-10-19 04:17:16 +02:00
cargoHash = "sha256-HyosR/5tZCRU2CNnnGITEuESW30Zq3s33UFNcLmEWIA=";
# Setup symlinks for all the utilities,
# busybox style
2023-08-14 05:55:23 +02:00
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
2023-08-14 05:55:23 +02:00
'';
meta = with lib; {
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 = licenses.gpl3Plus;
maintainers = with maintainers; [ ProducerMatt ];
};
}