nixpkgs/pkgs/tools/networking/cjdns/default.nix

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

76 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, nodejs
, which
, python39
, libuv
, util-linux
, nixosTests
2023-03-18 18:03:42 +00:00
, libsodium
, pkg-config
, substituteAll
}:
rustPlatform.buildRustPackage rec {
2020-06-25 05:50:35 +00:00
pname = "cjdns";
version = "21.4";
src = fetchFromGitHub {
owner = "cjdelisle";
repo = "cjdns";
rev = "cjdns-v${version}";
sha256 = "sha256-vI3uHZwmbFqxGasKqgCl0PLEEO8RNEhwkn5ZA8K7bxU=";
};
2023-03-18 18:03:42 +00:00
patches = [
(substituteAll {
src = ./system-libsodium.patch;
libsodium_include_dir = "${libsodium.dev}/include";
})
];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"libsodium-sys-0.2.6" = "sha256-yr6wh0njbCFZViLROcqSSoRFj7ZAMYG5lo1g0j75SN0=";
};
};
nativeBuildInputs = [
which
python39
nodejs
2023-03-18 18:03:42 +00:00
pkg-config
] ++
# for flock
2021-01-15 09:19:50 +00:00
lib.optional stdenv.isLinux util-linux;
buildInputs = [
libuv
2023-03-18 18:03:42 +00:00
libsodium
];
2023-03-18 18:03:42 +00:00
env.SODIUM_USE_PKG_CONFIG = 1;
env.NIX_CFLAGS_COMPILE = toString ([
"-O2"
"-Wno-error=array-bounds"
"-Wno-error=stringop-overflow"
"-Wno-error=stringop-truncation"
] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") [
"-Wno-error=stringop-overread"
]);
2020-04-16 07:02:32 +00:00
passthru.tests.basic = nixosTests.cjdns;
meta = with lib; {
homepage = "https://github.com/cjdelisle/cjdns";
description = "Encrypted networking for regular people";
2020-12-27 18:49:30 +00:00
license = licenses.gpl3Plus;
2016-04-08 13:52:08 +00:00
maintainers = with maintainers; [ ehmry ];
platforms = platforms.linux;
broken = stdenv.isAarch64;
};
}