19 }: rustPlatform.buildRustPackage rec {
20 pname = "radicle-node";
21 version = "1.0.0-rc.11";
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-P1Gg2uk87ppco7CAPjEqN0uqgb0K8apOSC7cfdgaT0Y=";
29 cargoHash = "sha256-M01NjqvMSaa3+YPb4vDtIucBeF5BYx3cpmMoLJOwRsI=";
31 nativeBuildInputs = [ asciidoctor installShellFiles makeWrapper ];
32 nativeCheckInputs = [ git ];
33 buildInputs = lib.optionals stdenv.buildPlatform.isDarwin [
34 darwin.apple_sdk.frameworks.Security
37 doCheck = stdenv.hostPlatform.isLinux;
40 export PATH=$PATH:$PWD/target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release
41 # Tests want to open many files.
45 "--skip=service::message::tests::test_node_announcement_validate"
46 "--skip=tests::test_announcement_relay"
47 # https://radicle.zulipchat.com/#narrow/stream/369277-heartwood/topic/Flaky.20tests/near/438352360
48 "--skip=tests::e2e::test_connection_crossing"
52 for page in $(find -name '*.adoc'); do
53 asciidoctor -d manpage -b manpage $page
54 installManPage ''${page::-5}
59 for program in $out/bin/* ;
61 wrapProgram "$program" \
62 --prefix PATH : "${lib.makeBinPath [ git man-db openssh xdg-utils ]}"
68 package = radicle-node;
71 version = testers.testVersion { inherit package; };
72 basic = runCommand "${package.name}-basic-test"
74 nativeBuildInputs = [ jq openssh radicle-node ];
77 export RAD_HOME="$PWD/.radicle"
78 mkdir -p "$RAD_HOME/keys"
79 ssh-keygen -t ed25519 -N "" -f "$RAD_HOME/keys/radicle" > /dev/null
80 jq -n '.node.alias |= "nix"' > "$RAD_HOME/config.json"
82 rad config > /dev/null
84 (.sshVersion | contains("${openssh.version}"))
86 (.gitVersion | contains("${git.version}"))
91 nixos-build = lib.recurseIntoAttrs {
92 checkConfig-success = (nixos {
93 services.radicle.settings = {
96 }).config.services.radicle.configFile;
97 checkConfig-failure = testers.testBuildFailure (nixos {
98 services.radicle.settings = {
101 }).config.services.radicle.configFile;
103 nixos-run = nixosTests.radicle;
107 description = "Radicle node and CLI for decentralized code collaboration";
109 Radicle is an open source, peer-to-peer code collaboration stack built on Git.
110 Unlike centralized code hosting platforms, there is no single entity controlling the network.
111 Repositories are replicated across peers in a decentralized manner, and users are in full control of their data and workflow.
113 homepage = "https://radicle.xyz";
114 license = with lib.licenses; [ asl20 mit ];
115 platforms = lib.platforms.unix;
116 maintainers = with lib.maintainers; [ amesgen lorenzleutgeb ];