pkgsStatic.graphene: fix build
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user