about summary refs log tree commit diff
path: root/pkgs/development/libraries/xml-security-c/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/xml-security-c/default.nix')
-rw-r--r--pkgs/development/libraries/xml-security-c/default.nix35
1 files changed, 29 insertions, 6 deletions
diff --git a/pkgs/development/libraries/xml-security-c/default.nix b/pkgs/development/libraries/xml-security-c/default.nix
index 6be958d7d24d2..c9e4c5874aefa 100644
--- a/pkgs/development/libraries/xml-security-c/default.nix
+++ b/pkgs/development/libraries/xml-security-c/default.nix
@@ -1,12 +1,24 @@
-{ lib, stdenv, fetchurl, xalanc, xercesc, openssl, pkg-config }:
+{
+  lib,
+  stdenv,
+  fetchurl,
+  pkg-config,
+  xalanc,
+  xercesc,
+  openssl,
+  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 = [
@@ -16,7 +28,18 @@ 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/";
@@ -25,4 +48,4 @@ stdenv.mkDerivation rec {
     platforms = lib.platforms.unix;
     maintainers = [ lib.maintainers.jagajaga ];
   };
-}
+})