571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
41 lines
1021 B
Nix
41 lines
1021 B
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, enableAppletSymlinks ? true
|
|
}:
|
|
|
|
let
|
|
version = "1.4";
|
|
in rustPlatform.buildRustPackage {
|
|
pname = "rsbkb";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "trou";
|
|
repo = "rsbkb";
|
|
rev = "release-${version}";
|
|
hash = "sha256-c5+Q/y2tZfhXQIAs1W67/xfB+qz1Xn33tKXRGDAi3qs=";
|
|
};
|
|
|
|
cargoPatches = [
|
|
./time.patch
|
|
];
|
|
cargoHash = "sha256-jRkwfIEB9DEzoV5xogTDz1cHfdsvLM6E27E7hQBa9JY=";
|
|
|
|
# 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 ];
|
|
};
|
|
}
|