2023-08-14 05:55:23 +02:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, enableAppletSymlinks ? true
|
2023-01-19 01:24:40 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rsbkb";
|
2024-01-25 12:53:01 +01:00
|
|
|
version = "1.3";
|
2023-01-19 01:24:40 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trou";
|
|
|
|
repo = "rsbkb";
|
|
|
|
rev = "release-${version}";
|
2024-01-25 12:53:01 +01:00
|
|
|
hash = "sha256-SGV7ovaOVnOFlCSyxKrd4Tg8Ak71BzvLgEvCneHhx0w=";
|
2023-01-19 01:24:40 +01:00
|
|
|
};
|
2023-08-14 05:55:23 +02:00
|
|
|
|
2024-01-25 12:53:01 +01:00
|
|
|
cargoHash = "sha256-UC9i1rPdQ4YLQoMQYXyL0j6EUhMwyKuD+vk4z5XLLAk=";
|
2023-01-19 01:24:40 +01:00
|
|
|
|
|
|
|
# Setup symlinks for all the utilities,
|
|
|
|
# busybox style
|
2023-08-14 05:55:23 +02:00
|
|
|
postInstall = lib.optionalString enableAppletSymlinks ''
|
2023-01-19 01:24:40 +01:00
|
|
|
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
|
|
|
'';
|
2023-01-19 01:24:40 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|