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
1 changed files with 20 additions and 10 deletions

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,11 +29,17 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xalanc
xercesc
openssl
];
buildInputs =
[
xalanc
xercesc
openssl
]
++ lib.optionals stdenv.isDarwin [
CoreFoundation
CoreServices
SystemConfiguration
];
meta = {
homepage = "https://santuario.apache.org/";
@ -38,4 +48,4 @@ stdenv.mkDerivation rec {
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.jagajaga ];
};
}
})