about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/graphene
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
commita5e1520e4538e29ecfbd4b168306f890566d7bfd (patch)
tree28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/pkgs/development/libraries/graphene
parent822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff)
parent3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff)
downloadnixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/graphene')
-rw-r--r--nixpkgs/pkgs/development/libraries/graphene/default.nix23
1 files changed, 15 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/libraries/graphene/default.nix b/nixpkgs/pkgs/development/libraries/graphene/default.nix
index 2972d5712cba..23b617d4a610 100644
--- a/nixpkgs/pkgs/development/libraries/graphene/default.nix
+++ b/nixpkgs/pkgs/development/libraries/graphene/default.nix
@@ -11,10 +11,13 @@
 , mutest
 , nixosTests
 , glib
+, withDocumentation ? !stdenv.hostPlatform.isStatic
 , gtk-doc
 , docbook_xsl
 , docbook_xml_dtd_43
+, buildPackages
 , gobject-introspection
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
 , makeWrapper
 }:
 
@@ -22,7 +25,8 @@ stdenv.mkDerivation rec {
   pname = "graphene";
   version = "1.10.8";
 
-  outputs = [ "out" "dev" "devdoc" ]
+  outputs = [ "out" "dev" ]
+    ++ lib.optionals withDocumentation [ "devdoc" ]
     ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ "installedTests" ];
 
   src = fetchFromGitHub {
@@ -51,15 +55,17 @@ stdenv.mkDerivation rec {
   ];
 
   nativeBuildInputs = [
-    docbook_xml_dtd_43
-    docbook_xsl
-    gtk-doc
     meson
     ninja
     pkg-config
-    gobject-introspection
     python3
     makeWrapper
+  ] ++ lib.optionals withDocumentation [
+    docbook_xml_dtd_43
+    docbook_xsl
+    gtk-doc
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
   ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
     mesonEmulatorHook
   ];
@@ -73,8 +79,8 @@ stdenv.mkDerivation rec {
   ];
 
   mesonFlags = [
-    "-Dgtk_doc=true"
-    "-Dintrospection=enabled"
+    (lib.mesonBool "gtk_doc" withDocumentation)
+    (lib.mesonEnable "introspection" withIntrospection)
     "-Dinstalled_test_datadir=${placeholder "installedTests"}/share"
     "-Dinstalled_test_bindir=${placeholder "installedTests"}/libexec"
   ] ++ lib.optionals stdenv.isAarch32 [
@@ -87,12 +93,13 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     patchShebangs tests/gen-installed-test.py
+  '' + lib.optionalString withIntrospection ''
     PATH=${python3.withPackages (pp: [ pp.pygobject3 pp.tappy ])}/bin:$PATH patchShebangs tests/introspection.py
   '';
 
   postFixup = let
     introspectionPy = "${placeholder "installedTests"}/libexec/installed-tests/graphene-1.0/introspection.py";
-  in ''
+  in lib.optionalString withIntrospection ''
     if [ -x '${introspectionPy}' ] ; then
       wrapProgram '${introspectionPy}' \
         --prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0"