mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
4ad56caded
this was not building, though it wasn't marked as such. upstream now requires Rust. python310 causes things to complain and fail, so we are specifiying python39. nodejs, python and now rust to compile a mostly C99 project. kids these days...
57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, nodejs
|
|
, which
|
|
, python39
|
|
, libuv
|
|
, util-linux
|
|
, nixosTests
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cjdns";
|
|
version = "21.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cjdelisle";
|
|
repo = "cjdns";
|
|
rev = "cjdns-v${version}";
|
|
sha256 = "sha256-vI3uHZwmbFqxGasKqgCl0PLEEO8RNEhwkn5ZA8K7bxU=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-x3LxGOhGXrheqdke0eYiQVo/IqgWgcDrDNupdLjRPjA=";
|
|
|
|
nativeBuildInputs = [
|
|
which
|
|
python39
|
|
nodejs
|
|
] ++
|
|
# for flock
|
|
lib.optional stdenv.isLinux util-linux;
|
|
|
|
buildInputs = [
|
|
libuv
|
|
];
|
|
|
|
NIX_CFLAGS_COMPILE = [
|
|
"-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"
|
|
];
|
|
|
|
passthru.tests.basic = nixosTests.cjdns;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/cjdelisle/cjdns";
|
|
description = "Encrypted networking for regular people";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ ehmry ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|