]> Git — Sourcephile - julm/julm-nix.git/blob - nixpkgs/by-name/ra/radicle-httpd/package.nix
courge: update to nixos-24.05
[julm/julm-nix.git] / nixpkgs / by-name / ra / radicle-httpd / package.nix
1 { asciidoctor
2 , darwin
3 , fetchgit
4 , git
5 , installShellFiles
6 , lib
7 , makeWrapper
8 , man-db
9 , rustPlatform
10 , stdenv
11 , xdg-utils
12 ,
13 }:
14 rustPlatform.buildRustPackage rec {
15 pname = "radicle-httpd";
16 version = "0.11.0";
17 env.RADICLE_VERSION = version;
18
19 src = fetchgit {
20 url = "https://seed.radicle.xyz/z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git";
21 rev = "refs/namespaces/z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5/refs/tags/v${version}";
22 hash = "sha256-XMEO+L362uaPUr25YUkMh41a2BcKEy8bgXfwKlvBtnQ=";
23 sparseCheckout = [ "radicle-httpd" ];
24 };
25 sourceRoot = "${src.name}/radicle-httpd";
26 cargoHash = "sha256-WdgPL6X3FMxHW6OVoTkrbo0azAxp35UzGMcTJ5pNnkI=";
27
28 nativeBuildInputs = [
29 asciidoctor
30 installShellFiles
31 makeWrapper
32 ];
33 nativeCheckInputs = [ git ];
34 buildInputs = lib.optionals stdenv.buildPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ];
35
36 doCheck = stdenv.hostPlatform.isLinux;
37
38 postInstall = ''
39 for page in $(find -name '*.adoc'); do
40 asciidoctor -d manpage -b manpage $page
41 installManPage ''${page::-5}
42 done
43 '';
44
45 postFixup = ''
46 for program in $out/bin/* ;
47 do
48 wrapProgram "$program" \
49 --prefix PATH : "${
50 lib.makeBinPath [
51 git
52 man-db
53 xdg-utils
54 ]
55 }"
56 done
57 '';
58
59 meta = {
60 description = "Radicle JSON HTTP API Daemon";
61 longDescription = ''
62 A Radicle HTTP daemon exposing a JSON HTTP API that allows someone to browse local
63 repositories on a Radicle node via their web browser.
64 '';
65 homepage = "https://radicle.xyz";
66 # cargo.toml says MIT and asl20, LICENSE file says GPL3
67 license = with lib.licenses; [
68 gpl3Only
69 mit
70 asl20
71 ];
72 platforms = lib.platforms.unix;
73 maintainers = with lib.maintainers; [
74 gador
75 lorenzleutgeb
76 ];
77 mainProgram = "radicle-httpd";
78 };
79 }