nixpkgs-suyu/pkgs/applications/version-management/radicle-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

77 lines
1.4 KiB
Nix
Raw Normal View History

2022-05-10 22:43:35 +02:00
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
, cmake
, installShellFiles
, asciidoctor
, DarwinTools
, openssl
, libusb1
, AppKit
, git
2022-05-10 22:43:35 +02:00
, openssh
2023-02-13 23:03:42 +01:00
, testers
, radicle-cli
2022-05-10 22:43:35 +02:00
}:
rustPlatform.buildRustPackage rec {
pname = "radicle-cli";
version = "0.6.1";
src = fetchFromGitHub {
owner = "radicle-dev";
repo = pname;
rev = "v${version}";
sha256 = "sha256-LS6zYpMg0LanRL2M8ioGG8Ys07TPT/3hP7geEGehwxg=";
};
cargoSha256 = "sha256-o7ahnV7NnvzKxXb7HdNqKcxekshOtKanYKb0Sy15mhs=";
nativeBuildInputs = [
pkg-config
cmake
installShellFiles
asciidoctor
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
DarwinTools
];
buildInputs = [
openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
libusb1
AppKit
];
postInstall = ''
for f in $(find . -name '*.adoc'); do
mf=''${f%.*}
asciidoctor --doctype manpage --backend manpage $f -o $mf
installManPage $mf
done
'';
nativeCheckInputs = [
git
openssh
];
2022-05-10 22:43:35 +02:00
preCheck = ''
eval $(ssh-agent)
'';
2023-02-13 23:03:42 +01:00
passthru.tests = {
version = testers.testVersion { package = radicle-cli; };
};
2022-05-10 22:43:35 +02:00
meta = {
description = "Command-line tooling for Radicle, a decentralized code collaboration network";
homepage = "https://radicle.xyz";
license = lib.licenses.gpl3Plus;
2022-05-10 22:43:35 +02:00
maintainers = with lib.maintainers; [ amesgen ];
platforms = lib.platforms.unix;
mainProgram = "rad";
};
}