rad-key: init at 0.1.1

This commit is contained in:
Defelo 2026-05-18 23:00:33 +02:00
commit 874aea6fcf
No known key found for this signature in database
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,34 @@
{
lib,
rustPlatform,
fetchFromRadicle,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rad-key";
version = "0.1.1";
__structuredAttrs = true;
src = fetchFromRadicle {
seed = "radicle.defelo.de";
repo = "zFF3JpT1VrrsDYogDPtVZMHw6P4x";
tag = "releases/${finalAttrs.version}";
hash = "sha256-0lPVkgBHfIG4fF/JuEnRznnHR9VaX91UBjmHqoFj2rk=";
};
cargoHash = "sha256-W/4h+hvsmydZim4HrylLWADINRcwP8cOgoBtPbuSxKY=";
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru.updateScript = ./update.sh;
meta = {
description = "Convert between Radicle identities and public SSH keys";
homepage = "https://radicle.defelo.de/nodes/radicle.defelo.de/rad:zFF3JpT1VrrsDYogDPtVZMHw6P4x";
license = lib.licenses.mit;
teams = [ lib.teams.radicle ];
mainProgram = "rad-key";
};
})

View file

@ -0,0 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils gnugrep common-updater-scripts nix-update
version=$(list-git-tags | grep -oP '^releases/\K\d+\.\d+\.\d+$' | sort -rV | head -1)
nix-update --version="$version" rad-key