nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 enableAppletSymlinks ? true,
6}:
7
8let
9 version = "1.4";
10in
11rustPlatform.buildRustPackage {
12 pname = "rsbkb";
13 inherit version;
14
15 src = fetchFromGitHub {
16 owner = "trou";
17 repo = "rsbkb";
18 rev = "release-${version}";
19 hash = "sha256-c5+Q/y2tZfhXQIAs1W67/xfB+qz1Xn33tKXRGDAi3qs=";
20 };
21
22 cargoPatches = [
23 ./time.patch
24 ];
25
26 cargoHash = "sha256-fg8LQXqmw5GXiQe7ZVciORWI/yhKAhywolpapNpHXZY=";
27
28 # Setup symlinks for all the utilities,
29 # busybox style
30 postInstall = lib.optionalString enableAppletSymlinks ''
31 cd $out/bin || exit 1
32 path="$(realpath --canonicalize-missing ./rsbkb)"
33 for i in $(./rsbkb list) ; do ln -s $path $i ; done
34 '';
35
36 meta = {
37 description = "Command line tools to encode/decode things";
38 homepage = "https://github.com/trou/rsbkb";
39 changelog = "https://github.com/trou/rsbkb/releases/tag/release-${version}";
40 license = lib.licenses.gpl3Plus;
41 maintainers = with lib.maintainers; [ ProducerMatt ];
42 };
43}