about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libical
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libical')
-rw-r--r--nixpkgs/pkgs/development/libraries/libical/default.nix28
1 files changed, 16 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libical/default.nix b/nixpkgs/pkgs/development/libraries/libical/default.nix
index 3fef461874c9..2cb8642ca87e 100644
--- a/nixpkgs/pkgs/development/libraries/libical/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libical/default.nix
@@ -1,7 +1,8 @@
 { lib
 , stdenv
 , fetchFromGitHub
-, buildPackages
+, pkgsBuildBuild
+, pkgsBuildHost
 , cmake
 , glib
 , icu
@@ -13,13 +14,14 @@
 , python3
 , tzdata
 , fixDarwinDylibNames
+, withIntrospection ? stdenv.hostPlatform.emulatorAvailable pkgsBuildHost
 , gobject-introspection
 , vala
 }:
 
 stdenv.mkDerivation rec {
   pname = "libical";
-  version = "3.0.14";
+  version = "3.0.16";
 
   outputs = [ "out" "dev" ]; # "devdoc" ];
 
@@ -27,28 +29,32 @@ stdenv.mkDerivation rec {
     owner = "libical";
     repo = "libical";
     rev = "v${version}";
-    sha256 = "sha256-gZ6IBjG5pNKJ+hWcTzXMP7yxL4he4LTklZGoC9vXra8=";
+    sha256 = "sha256-3D/0leI3LLKDFOXkKSrmMamLoaXdi/2Z4iPUXqgwtg8=";
   };
 
   strictDeps = true;
+
+  depsBuildBuild = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    # provides ical-glib-src-generator that runs during build
+    libical
+  ];
+
   nativeBuildInputs = [
     cmake
     ninja
     perl
     pkg-config
+  ] ++ lib.optionals withIntrospection [
     gobject-introspection
     vala
     # Docs building fails:
     # https://github.com/NixOS/nixpkgs/pull/67204
     # previously with https://github.com/NixOS/nixpkgs/pull/61657#issuecomment-495579489
     # gtk-doc docbook_xsl docbook_xml_dtd_43 # for docs
-  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
-    # provides ical-glib-src-generator that runs during build
-    libical
   ] ++ lib.optionals stdenv.isDarwin [
     fixDarwinDylibNames
   ];
-  installCheckInputs = [
+  nativeInstallCheckInputs = [
     # running libical-glib tests
     (python3.pythonForBuild.withPackages (pkgs: with pkgs; [
       pygobject3
@@ -59,15 +65,14 @@ stdenv.mkDerivation rec {
     glib
     libxml2
     icu
-    gobject-introspection
   ];
 
   cmakeFlags = [
     "-DENABLE_GTK_DOC=False"
-    "-DGOBJECT_INTROSPECTION=True"
-    "-DICAL_GLIB_VAPI=True"
+    "-DGOBJECT_INTROSPECTION=${if withIntrospection then "True" else "False"}"
+    "-DICAL_GLIB_VAPI=${if withIntrospection then "True" else "False"}"
   ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
-    "-DIMPORT_ICAL_GLIB_SRC_GENERATOR=${lib.getDev buildPackages.libical}/lib/cmake/LibIcal/IcalGlibSrcGenerator.cmake"
+    "-DIMPORT_ICAL_GLIB_SRC_GENERATOR=${lib.getDev pkgsBuildBuild.libical}/lib/cmake/LibIcal/IcalGlibSrcGenerator.cmake"
   ];
 
   patches = [
@@ -98,7 +103,6 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with lib; {
-    broken = stdenv.isDarwin;
     homepage = "https://github.com/libical/libical";
     description = "An Open Source implementation of the iCalendar protocols";
     license = licenses.mpl20;