2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, enableAppletSymlinks ? true
|
2023-01-20 10:41:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rsbkb";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.4";
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trou";
|
|
|
|
repo = "rsbkb";
|
|
|
|
rev = "release-${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-c5+Q/y2tZfhXQIAs1W67/xfB+qz1Xn33tKXRGDAi3qs=";
|
2023-01-20 10:41:00 +00:00
|
|
|
};
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
cargoHash = "sha256-kGxYH3frBcmvBCFeF2oxAS4FALcmnRyCH1fi0NF0wSo=";
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
# Setup symlinks for all the utilities,
|
|
|
|
# busybox style
|
2023-08-22 20:05:09 +00:00
|
|
|
postInstall = lib.optionalString enableAppletSymlinks ''
|
2023-01-20 10:41:00 +00:00
|
|
|
cd $out/bin || exit 1
|
|
|
|
path="$(realpath --canonicalize-missing ./rsbkb)"
|
|
|
|
for i in $(./rsbkb list) ; do ln -s $path $i ; done
|
2023-08-22 20:05:09 +00:00
|
|
|
'';
|
2023-01-20 10:41:00 +00: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 ];
|
|
|
|
};
|
|
|
|
}
|