17 rustPlatform.buildRustPackage rec {
21 src = fetchFromGitHub {
24 rev = "cjdns-v${version}";
25 sha256 = "sha256-vI3uHZwmbFqxGasKqgCl0PLEEO8RNEhwkn5ZA8K7bxU=";
29 (replaceVars ./system-libsodium.patch {
30 libsodium_include_dir = "${libsodium.dev}/include";
35 lockFile = ./Cargo.lock;
37 "libsodium-sys-0.2.6" = "sha256-yr6wh0njbCFZViLROcqSSoRFj7ZAMYG5lo1g0j75SN0=";
50 lib.optional stdenv.hostPlatform.isLinux util-linux;
57 env.SODIUM_USE_PKG_CONFIG = 1;
58 env.NIX_CFLAGS_COMPILE = toString (
61 "-Wno-error=array-bounds"
62 "-Wno-error=stringop-overflow"
63 "-Wno-error=stringop-truncation"
65 ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") [
66 "-Wno-error=stringop-overread"
70 passthru.tests.basic = nixosTests.cjdns;
73 homepage = "https://github.com/cjdelisle/cjdns";
74 description = "Encrypted networking for regular people";
75 license = licenses.gpl3Plus;
76 maintainers = with maintainers; [ ehmry ];
77 platforms = platforms.linux;
78 broken = stdenv.hostPlatform.isAarch64;