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:
parent
6a36558f52
commit
4ad56caded
1 changed files with 25 additions and 14 deletions
|
@ -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";
|
||||
version = "21.1";
|
||||
version = "21.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cjdelisle";
|
||||
repo = "cjdns";
|
||||
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
|
||||
lib.optional stdenv.isLinux util-linux;
|
||||
|
||||
buildInputs = [
|
||||
libuv
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-O2"
|
||||
"-Wno-error=array-bounds"
|
||||
|
@ -24,15 +44,6 @@ stdenv.mkDerivation rec {
|
|||
"-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;
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue