xml-security-c: fix build on darwin, small clean up

This commit is contained in:
TomaSajt 2024-05-08 14:41:55 +02:00
parent e7d0b599e1
commit e9653e7e20
No known key found for this signature in database
GPG key ID: F011163C050122A1

View file

@ -2,19 +2,23 @@
lib,
stdenv,
fetchurl,
pkg-config,
xalanc,
xercesc,
openssl,
pkg-config,
darwin,
}:
stdenv.mkDerivation rec {
let
inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices SystemConfiguration;
in
stdenv.mkDerivation (finalAttrs: {
pname = "xml-security-c";
version = "2.0.4";
src = fetchurl {
url = "mirror://apache/santuario/c-library/${pname}-${version}.tar.gz";
sha256 = "sha256-p42mcg9sK6FBANJCYTHg0z6sWi26XMEb3QSXS364kAM=";
url = "mirror://apache/santuario/c-library/xml-security-c-${finalAttrs.version}.tar.gz";
hash = "sha256-p42mcg9sK6FBANJCYTHg0z6sWi26XMEb3QSXS364kAM=";
};
configureFlags = [
@ -25,10 +29,16 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [
buildInputs =
[
xalanc
xercesc
openssl
]
++ lib.optionals stdenv.isDarwin [
CoreFoundation
CoreServices
SystemConfiguration
];
meta = {
@ -38,4 +48,4 @@ stdenv.mkDerivation rec {
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.jagajaga ];
};
}
})