2022-11-04 12:27:35 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, nodejs
|
|
|
|
, which
|
|
|
|
, python39
|
|
|
|
, libuv
|
|
|
|
, util-linux
|
|
|
|
, nixosTests
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-07-18 16:06:22 +00:00
|
|
|
pname = "cjdns";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "21.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cjdelisle";
|
|
|
|
repo = "cjdns";
|
|
|
|
rev = "cjdns-v${version}";
|
2022-11-04 12:27:35 +00:00
|
|
|
sha256 = "sha256-vI3uHZwmbFqxGasKqgCl0PLEEO8RNEhwkn5ZA8K7bxU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
cargoSha256 = "sha256-x3LxGOhGXrheqdke0eYiQVo/IqgWgcDrDNupdLjRPjA=";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
which
|
|
|
|
python39
|
|
|
|
nodejs
|
|
|
|
] ++
|
2020-04-24 23:36:52 +00:00
|
|
|
# for flock
|
2021-01-15 22:18:51 +00:00
|
|
|
lib.optional stdenv.isLinux util-linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
buildInputs = [
|
|
|
|
libuv
|
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString ([
|
2022-04-27 09:35:20 +00:00
|
|
|
"-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"
|
2023-03-04 12:14:45 +00:00
|
|
|
]);
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
passthru.tests.basic = nixosTests.cjdns;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/cjdelisle/cjdns";
|
|
|
|
description = "Encrypted networking for regular people";
|
2020-12-29 15:07:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ ehmry ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|