diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/graphene')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/graphene/default.nix | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/graphene/default.nix b/nixpkgs/pkgs/development/libraries/graphene/default.nix index a8e0d1179826..22c0e044f1e8 100644 --- a/nixpkgs/pkgs/development/libraries/graphene/default.nix +++ b/nixpkgs/pkgs/development/libraries/graphene/default.nix @@ -19,7 +19,8 @@ stdenv.mkDerivation rec { pname = "graphene"; version = "1.10.6"; - outputs = [ "out" "devdoc" "installedTests" ]; + outputs = [ "out" ] + ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" "installedTests" ]; src = fetchFromGitHub { owner = "ebassi"; @@ -33,6 +34,10 @@ stdenv.mkDerivation rec { ./0001-meson-add-options-for-tests-installation-dirs.patch ]; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ docbook_xml_dtd_43 docbook_xsl @@ -47,7 +52,6 @@ stdenv.mkDerivation rec { buildInputs = [ glib - gobject-introspection ]; checkInputs = [ @@ -55,7 +59,8 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=true" + "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" + "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}" "-Dinstalled_test_datadir=${placeholder "installedTests"}/share" "-Dinstalled_test_bindir=${placeholder "installedTests"}/libexec" ]; @@ -64,12 +69,17 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs tests/gen-installed-test.py + '' + lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) '' PATH=${python3.withPackages (pp: [ pp.pygobject3 pp.tappy ])}/bin:$PATH patchShebangs tests/introspection.py ''; - postFixup = '' - wrapProgram "${placeholder "installedTests"}/libexec/installed-tests/graphene-1.0/introspection.py" \ - --prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0" + postFixup = let + introspectionPy = "${placeholder "installedTests"}/libexec/installed-tests/graphene-1.0/introspection.py"; + in '' + if [ -x '${introspectionPy}' ] ; then + wrapProgram '${introspectionPy}' \ + --prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0" + fi ''; passthru = { @@ -84,7 +94,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A thin layer of graphic data types"; - homepage = "https://ebassi.github.com/graphene"; + homepage = "https://github.com/ebassi/graphene"; license = licenses.mit; maintainers = teams.gnome.members ++ (with maintainers; [ ]); platforms = platforms.unix; |