fix: rosenpass cross-compilation

`mandoc` is not available in cross-compilation environments. This can
be easily made optional, depending on the package's availability on the
current `hostPlatform` combined for a check if the package is marked
broken.

Signed-off-by: wucke13 <wucke13+github@gmail.com>
This commit is contained in:
wucke13
2026-07-16 13:47:55 +02:00
parent 6bc35099c4
commit 40069e59a6
+6 -3
View File
@@ -3,7 +3,7 @@
stdenv,
rustPlatform,
cmake,
mandoc,
mandoc ? null,
removeReferencesTo,
bash,
package ? "rosenpass",
@@ -88,10 +88,13 @@ rustPlatform.buildRustPackage {
nativeBuildInputs = [
stdenv.cc
cmake # for oqs build in the oqs-sys crate
mandoc # for the built-in manual
removeReferencesTo
rustPlatform.bindgenHook # for C-bindings in the crypto libs
];
]
++ lib.lists.optional (
lib.meta.availableOn stdenv.hostPlatform mandoc && !mandoc.meta.broken
) mandoc # for the built-in manual
;
buildInputs = [ bash ];
hardeningDisable = lib.optional isStatic "fortify";