mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 18:23:09 +00:00
e3fb7c3314
Plus Anderson's suggestions Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
36 lines
962 B
Nix
36 lines
962 B
Nix
{ lib,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
enableAppletSymlinks ? true,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "rsbkb";
|
|
version = "1.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "trou";
|
|
repo = "rsbkb";
|
|
rev = "release-${version}";
|
|
hash = "sha256-SqjeH0eOo+upSfPWh2IW75p1VHMqmzAbCchDrXhvMxs=";
|
|
};
|
|
cargoSha256 = "N3Xlw2JzTjqWLiVNCZaomsWQl330kGVlwdz4Gf05TGU=";
|
|
|
|
# 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 = 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 ];
|
|
};
|
|
}
|