From e7d0b599e1401b1c95c5332e4a43e3b5c0b250fe Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Wed, 8 May 2024 14:35:36 +0200 Subject: [PATCH 1/2] xml-security-c: format with nixfmt --- .../libraries/xml-security-c/default.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/xml-security-c/default.nix b/pkgs/development/libraries/xml-security-c/default.nix index 6be958d7d24d..2209e7275d62 100644 --- a/pkgs/development/libraries/xml-security-c/default.nix +++ b/pkgs/development/libraries/xml-security-c/default.nix @@ -1,4 +1,12 @@ -{ lib, stdenv, fetchurl, xalanc, xercesc, openssl, pkg-config }: +{ + lib, + stdenv, + fetchurl, + xalanc, + xercesc, + openssl, + pkg-config, +}: stdenv.mkDerivation rec { pname = "xml-security-c"; @@ -16,7 +24,12 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ xalanc xercesc openssl ]; + + buildInputs = [ + xalanc + xercesc + openssl + ]; meta = { homepage = "https://santuario.apache.org/"; From e9653e7e2075c34637075dc7895581757d72ecc3 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Wed, 8 May 2024 14:41:55 +0200 Subject: [PATCH 2/2] xml-security-c: fix build on darwin, small clean up --- .../libraries/xml-security-c/default.nix | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/xml-security-c/default.nix b/pkgs/development/libraries/xml-security-c/default.nix index 2209e7275d62..c9e4c5874aef 100644 --- a/pkgs/development/libraries/xml-security-c/default.nix +++ b/pkgs/development/libraries/xml-security-c/default.nix @@ -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 ]; }; -} +})