19 }: rustPlatform.buildRustPackage rec {
20 pname = "radicle-node";
22 env.RADICLE_VERSION = version;
25 url = "https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git";
26 rev = "refs/namespaces/z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/refs/tags/v${version}";
27 hash = "sha256-sb0GroWfZWC9YCGby88eiPnhFCdDA9EUhVpoyuAA+Mk=";
29 cargoHash = "sha256-+VjYX1gGf5aIGSQRMtvK6JI118X50HaxFwg5H14Vq7g=";
31 nativeBuildInputs = [ asciidoctor installShellFiles makeWrapper ];
32 nativeCheckInputs = [ git ];
33 buildInputs = lib.optionals stdenv.buildPlatform.isDarwin [
34 darwin.apple_sdk.frameworks.Security
37 # tests regularly time out on aarch64
38 #doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86;
42 export PATH=$PATH:$PWD/target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release
43 # Tests want to open many files.
47 "--skip=service::message::tests::test_node_announcement_validate"
48 "--skip=tests::test_announcement_relay"
49 # https://radicle.zulipchat.com/#narrow/stream/369277-heartwood/topic/Flaky.20tests/near/438352360
50 "--skip=tests::e2e::test_connection_crossing"
51 # https://radicle.zulipchat.com/#narrow/stream/369277-heartwood/topic/Clone.20Partial.20Fail.20Flake
52 "--skip=rad_clone_partial_fail"
56 for page in $(find -name '*.adoc'); do
57 asciidoctor -d manpage -b manpage $page
58 installManPage ''${page::-5}
63 for program in $out/bin/* ;
65 wrapProgram "$program" \
66 --prefix PATH : "${lib.makeBinPath [ git man-db openssh xdg-utils ]}"
72 package = radicle-node;
75 version = testers.testVersion { inherit package; };
76 basic = runCommand "${package.name}-basic-test"
78 nativeBuildInputs = [ jq openssh radicle-node ];
81 export RAD_HOME="$PWD/.radicle"
82 mkdir -p "$RAD_HOME/keys"
83 ssh-keygen -t ed25519 -N "" -f "$RAD_HOME/keys/radicle" > /dev/null
84 jq -n '.node.alias |= "nix"' > "$RAD_HOME/config.json"
86 rad config > /dev/null
88 (.sshVersion | contains("${openssh.version}"))
90 (.gitVersion | contains("${git.version}"))
95 nixos-build = lib.recurseIntoAttrs {
96 checkConfig-success = (nixos {
97 services.radicle.settings = {
100 }).config.services.radicle.configFile;
101 checkConfig-failure = testers.testBuildFailure (nixos {
102 services.radicle.settings = {
105 }).config.services.radicle.configFile;
107 nixos-run = nixosTests.radicle;
111 description = "Radicle node and CLI for decentralized code collaboration";
113 Radicle is an open source, peer-to-peer code collaboration stack built on Git.
114 Unlike centralized code hosting platforms, there is no single entity controlling the network.
115 Repositories are replicated across peers in a decentralized manner, and users are in full control of their data and workflow.
117 homepage = "https://radicle.xyz";
118 license = with lib.licenses; [ asl20 mit ];
119 platforms = lib.platforms.unix;
120 maintainers = with lib.maintainers; [ amesgen lorenzleutgeb ];