diff --git a/pkgs/tools/networking/cjdns/default.nix b/pkgs/tools/networking/cjdns/default.nix index e8dc5e370bea..d46d8bd2c576 100644 --- a/pkgs/tools/networking/cjdns/default.nix +++ b/pkgs/tools/networking/cjdns/default.nix @@ -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; {