radicle-httpd: 0.20.0 -> 0.22.0, modernize, adopt (#476850)

This commit is contained in:
Felix Bargfeldt
2026-01-09 09:59:57 +00:00
committed by GitHub
3 changed files with 30 additions and 10 deletions
+2 -1
View File
@@ -75,7 +75,7 @@ lib.fix (
# radicle-httpd using a more limited sparse checkout we need to carry a
# separate hash.
src = radicle-httpd.src.override {
hash = "sha256-1OhZ0x21NlZIiTPCRpvdUsx5UmeLecTjVzH8DWllPr8=";
hash = "sha256-PzokSJkcyFDAaih5gekp4GCQMm0sfF7fAK7iZbX1/S4=";
sparseCheckout = [ ];
};
@@ -114,6 +114,7 @@ lib.fix (
maintainers = with lib.maintainers; [
tazjin
lorenzleutgeb
defelo
];
};
}
+22 -9
View File
@@ -9,25 +9,28 @@
rustPlatform,
stdenv,
xdg-utils,
versionCheckHook,
nixosTests,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "radicle-httpd";
version = "0.20.0";
env.RADICLE_VERSION = version;
version = "0.22.0";
env.RADICLE_VERSION = finalAttrs.version;
# You must update the radicle-explorer source hash when changing this.
src = fetchFromRadicle {
seed = "seed.radicle.xyz";
repo = "z4V1sjrXqjvFdnCUbxPFqd5p4DtH5";
node = "z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM";
tag = "v${version}";
tag = "releases/${finalAttrs.version}";
sparseCheckout = [ "radicle-httpd" ];
hash = "sha256-9rJH4ECqOJ9wnYxCbEFHXo3PlhbPdeOnF+Pf1MzX25c=";
hash = "sha256-NA5U+Ac6imbtNabvaeYATfUbbmT48uqWAcbJ+ukJcDs=";
};
sourceRoot = "${src.name}/radicle-httpd";
sourceRoot = "${finalAttrs.src.name}/radicle-httpd";
cargoHash = "sha256-1GWWtrSYzTXUAgjeWaxyOuDqTDuTMWleug8SmxTHXbI=";
cargoHash = "sha256-9xyuoOuoFWu7oItQporJuGA8EIfEMrCvPaRPnwYMzmM=";
nativeBuildInputs = [
asciidoctor
@@ -59,6 +62,15 @@ rustPlatform.buildRustPackage rec {
done
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
tests = { inherit (nixosTests) radicle; };
updateScript = ./update.sh;
};
meta = {
description = "Radicle JSON HTTP API Daemon";
longDescription = ''
@@ -76,7 +88,8 @@ rustPlatform.buildRustPackage rec {
maintainers = with lib.maintainers; [
gador
lorenzleutgeb
defelo
];
mainProgram = "radicle-httpd";
};
}
})
+6
View File
@@ -0,0 +1,6 @@
#!/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" radicle-httpd
nix-update --version=skip radicle-explorer