11 rustPlatform.buildRustPackage rec {
15 src = fetchFromGitHub {
19 hash = "sha256-fQIeKGyTkFWUV9M1o256G4U1Os5OlVsRZu+5olEkbD4=";
22 cargoHash = "sha256-GyeJCIE60JuZa/NuixDc3gTj9WAOpSReIyVxQqM4tDQ=";
25 cmake # for oqs build in the oqs-sys crate
27 rustPlatform.bindgenHook # for C-bindings in the crypto libs
31 buildInputs = [ libsodium ];
33 # nix defaults to building for aarch64 _without_ the armv8-a
34 # crypto extensions, but liboqs depends on these
35 preBuild = lib.optionalString stdenv.hostPlatform.isAarch64 ''
36 NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -march=armv8-a+crypto"
40 installManPage doc/rosenpass.1
43 passthru.tests.rosenpass = nixosTests.rosenpass;
46 description = "Build post-quantum-secure VPNs with WireGuard";
47 homepage = "https://rosenpass.eu/";
48 license = with licenses; [ mit /* or */ asl20 ];
49 maintainers = with maintainers; [ wucke13 ];
50 platforms = [ "aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux" ];
51 mainProgram = "rosenpass";