Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, 2 fetchFromGitHub, 3 rustPlatform, 4 enableAppletSymlinks ? true, 5}: 6 7rustPlatform.buildRustPackage rec { 8 pname = "rsbkb"; 9 version = "1.1"; 10 11 src = fetchFromGitHub { 12 owner = "trou"; 13 repo = "rsbkb"; 14 rev = "release-${version}"; 15 hash = "sha256-SqjeH0eOo+upSfPWh2IW75p1VHMqmzAbCchDrXhvMxs="; 16 }; 17 cargoSha256 = "N3Xlw2JzTjqWLiVNCZaomsWQl330kGVlwdz4Gf05TGU="; 18 19 # Setup symlinks for all the utilities, 20 # busybox style 21 postInstall = lib.optionalString enableAppletSymlinks 22 '' 23 cd $out/bin || exit 1 24 path="$(realpath --canonicalize-missing ./rsbkb)" 25 for i in $(./rsbkb list) ; do ln -s $path $i ; done 26 ''; 27 28 meta = with lib; { 29 description = "Command line tools to encode/decode things"; 30 homepage = "https://github.com/trou/rsbkb"; 31 changelog = "https://github.com/trou/rsbkb/releases/tag/release-${version}"; 32 license = licenses.gpl3Plus; 33 maintainers = with maintainers; [ ProducerMatt ]; 34 }; 35}