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