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