Skip to content
23 changes: 22 additions & 1 deletion pkgs/idp-provider/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
rustPlatform,
pkg-config,
libclang,
libtool,
libxml2,
openssl,
xmlsec,
}:

Expand All @@ -15,11 +18,29 @@ rustPlatform.buildRustPackage {
version = "0.1.0";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
# The crate reaches into the sibling pkgs/idp-pki package at build
# and test time: src/registry.rs embeds the SAML signing cert with
# include_str!("../../idp-pki/trust/saml-signing.crt.pem") and other
# code/tests read ../idp-pki/trust/ relative to the manifest dir.
# Stage the trust directory beside the unpacked source root so those
# ../../ paths resolve inside the sandbox too.
postPatch = ''
mkdir -p ../idp-pki
cp -r ${../idp-pki/trust} ../idp-pki/trust
chmod -R u+w ../idp-pki
'';
nativeBuildInputs = [
pkg-config
libclang
# samael's bindgen build script shells out to xmlsec1-config.
xmlsec
];
buildInputs = [
libtool
libxml2
openssl
xmlsec
];
buildInputs = [ xmlsec ];
LIBCLANG_PATH = "${libclang.lib}/lib";

meta = {
Expand Down