Files
nixpkgs/pkgs/by-name/ro/rosenpass/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

68 lines
1.5 KiB
Nix

{
lib,
fetchFromGitHub,
nixosTests,
rustPlatform,
stdenv,
installShellFiles,
cmake,
libsodium,
pkg-config,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rosenpass";
version = "0.2.2";
src = fetchFromGitHub {
owner = "rosenpass";
repo = "rosenpass";
tag = "v${finalAttrs.version}";
hash = "sha256-fQIeKGyTkFWUV9M1o256G4U1Os5OlVsRZu+5olEkbD4=";
};
cargoHash = "sha256-vx6kSdDOXiIp2626yKVieDuS9DD5/wKyXutMiKMKn24=";
nativeBuildInputs = [
cmake # for oqs build in the oqs-sys crate
pkg-config
rustPlatform.bindgenHook # for C-bindings in the crypto libs
installShellFiles
];
buildInputs = [ libsodium ];
# nix defaults to building for aarch64 _without_ the armv8-a
# crypto extensions, but liboqs depends on these
preBuild = lib.optionalString stdenv.hostPlatform.isAarch64 ''
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -march=armv8-a+crypto"
'';
postInstall = ''
installManPage doc/rosenpass.1
'';
passthru = {
tests = { inherit (nixosTests) rosenpass; };
updateScript = nix-update-script { };
};
meta = {
description = "Build post-quantum-secure VPNs with WireGuard";
homepage = "https://rosenpass.eu/";
license = with lib.licenses; [
mit # or
asl20
];
maintainers = with lib.maintainers; [ wucke13 ];
teams = with lib.teams; [ ngi ];
platforms = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
mainProgram = "rosenpass";
};
})