mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
edfc76c52e
the plausible.io tracker is removed from upstream radicle-explorer
4e78b23dfb
82 lines
1.9 KiB
Nix
82 lines
1.9 KiB
Nix
{
|
|
asciidoctor,
|
|
darwin,
|
|
fetchgit,
|
|
git,
|
|
installShellFiles,
|
|
lib,
|
|
makeWrapper,
|
|
man-db,
|
|
rustPlatform,
|
|
stdenv,
|
|
xdg-utils,
|
|
}:
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "radicle-httpd";
|
|
version = "0.17.1";
|
|
env.RADICLE_VERSION = version;
|
|
|
|
# You must update the radicle-explorer source hash when changing this.
|
|
src = fetchgit {
|
|
url = "https://seed.radicle.xyz/z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git";
|
|
rev = "refs/namespaces/z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5/refs/tags/v${version}";
|
|
hash = "sha256-AhiIpNVDL4XYIQ89aYu8Cp2nKhIPYCzyrcG5hw9xsmE=";
|
|
sparseCheckout = [ "radicle-httpd" ];
|
|
};
|
|
|
|
sourceRoot = "${src.name}/radicle-httpd";
|
|
cargoHash = "sha256-TwK2QsoKVWYXn4mZEERQCnMOY4F9+wzjLBtvhH69wAs=";
|
|
|
|
nativeBuildInputs = [
|
|
asciidoctor
|
|
installShellFiles
|
|
makeWrapper
|
|
];
|
|
nativeCheckInputs = [ git ];
|
|
buildInputs = lib.optionals stdenv.buildPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
|
|
|
doCheck = stdenv.hostPlatform.isLinux;
|
|
|
|
postInstall = ''
|
|
for page in $(find -name '*.adoc'); do
|
|
asciidoctor -d manpage -b manpage $page
|
|
installManPage ''${page::-5}
|
|
done
|
|
'';
|
|
|
|
postFixup = ''
|
|
for program in $out/bin/* ;
|
|
do
|
|
wrapProgram "$program" \
|
|
--prefix PATH : "${
|
|
lib.makeBinPath [
|
|
git
|
|
man-db
|
|
xdg-utils
|
|
]
|
|
}"
|
|
done
|
|
'';
|
|
|
|
meta = {
|
|
description = "Radicle JSON HTTP API Daemon";
|
|
longDescription = ''
|
|
A Radicle HTTP daemon exposing a JSON HTTP API that allows someone to browse local
|
|
repositories on a Radicle node via their web browser.
|
|
'';
|
|
homepage = "https://radicle.xyz";
|
|
# cargo.toml says MIT and asl20, LICENSE file says GPL3
|
|
license = with lib.licenses; [
|
|
gpl3Only
|
|
mit
|
|
asl20
|
|
];
|
|
platforms = lib.platforms.unix;
|
|
maintainers = with lib.maintainers; [
|
|
gador
|
|
lorenzleutgeb
|
|
];
|
|
mainProgram = "radicle-httpd";
|
|
};
|
|
}
|