cjdns: fix package and update

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...
This commit is contained in:
Devan Carpenter 2022-11-05 16:15:21 +01:00 committed by ehmry
parent 6a36558f52
commit 4ad56caded

View file

@ -1,20 +1,40 @@
{ lib, stdenv, fetchFromGitHub, nodejs, which, python3, util-linux, nixosTests }: { lib
, stdenv
, fetchFromGitHub
, rustPlatform
, nodejs
, which
, python39
, libuv
, util-linux
, nixosTests
}:
stdenv.mkDerivation rec { rustPlatform.buildRustPackage rec {
pname = "cjdns"; pname = "cjdns";
version = "21.1"; version = "21.4";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cjdelisle"; owner = "cjdelisle";
repo = "cjdns"; repo = "cjdns";
rev = "cjdns-v${version}"; rev = "cjdns-v${version}";
sha256 = "NOmk+vMZ8i0E2MjrUzksk+tkJ9XVVNEXlE5OOTNa+Y0="; sha256 = "sha256-vI3uHZwmbFqxGasKqgCl0PLEEO8RNEhwkn5ZA8K7bxU=";
}; };
buildInputs = [ which python3 nodejs ] ++ cargoSha256 = "sha256-x3LxGOhGXrheqdke0eYiQVo/IqgWgcDrDNupdLjRPjA=";
nativeBuildInputs = [
which
python39
nodejs
] ++
# for flock # for flock
lib.optional stdenv.isLinux util-linux; lib.optional stdenv.isLinux util-linux;
buildInputs = [
libuv
];
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = [
"-O2" "-O2"
"-Wno-error=array-bounds" "-Wno-error=array-bounds"
@ -24,15 +44,6 @@ stdenv.mkDerivation rec {
"-Wno-error=stringop-overread" "-Wno-error=stringop-overread"
]; ];
buildPhase =
lib.optionalString stdenv.isAarch32 "Seccomp_NO=1 "
+ "bash do";
installPhase = ''
install -Dt "$out/bin/" cjdroute makekeys privatetopublic publictoip6
mkdir -p $out/share/cjdns
cp -R tools node_build node_modules $out/share/cjdns/
'';
passthru.tests.basic = nixosTests.cjdns; passthru.tests.basic = nixosTests.cjdns;
meta = with lib; { meta = with lib; {