libdmapsharing: fix cross compilation (#337308)

authored by Artturin and committed by GitHub 7165262c 74065337

+62 -42
+62 -42
pkgs/development/libraries/libdmapsharing/default.nix
··· 1 - { stdenv 2 - , lib 3 - , fetchFromGitLab 4 - , autoconf 5 - , automake 6 - , libtool 7 - , which 8 - , pkg-config 9 - , python3 10 - , vala 11 - , avahi 12 - , gdk-pixbuf 13 - , gst_all_1 14 - , glib 15 - , gtk-doc 16 - , docbook-xsl-nons 17 - , docbook_xml_dtd_43 18 - , gobject-introspection 19 - , libsoup_3 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitLab, 5 + autoconf, 6 + automake, 7 + libtool, 8 + pkg-config, 9 + vala, 10 + avahi, 11 + gdk-pixbuf, 12 + gst_all_1, 13 + glib, 14 + gtk-doc, 15 + docbook-xsl-nons, 16 + docbook_xml_dtd_43, 17 + gobject-introspection, 18 + libsoup_3, 19 + withGtkDoc ? stdenv.buildPlatform.canExecute stdenv.hostPlatform, 20 20 }: 21 21 22 22 stdenv.mkDerivation rec { 23 23 pname = "libdmapsharing"; 24 24 version = "3.9.13"; 25 25 26 - outputs = [ "out" "dev" "devdoc" ]; 26 + outputs = 27 + [ 28 + "out" 29 + "dev" 30 + ] 31 + ++ lib.optionals withGtkDoc [ 32 + "devdoc" 33 + ]; 34 + 27 35 outputBin = "dev"; 28 36 29 37 src = fetchFromGitLab { 30 38 domain = "gitlab.gnome.org"; 31 39 owner = "GNOME"; 32 40 repo = pname; 33 - rev = "${lib.toUpper pname}_${lib.replaceStrings ["."] ["_"] version}"; 41 + rev = "${lib.toUpper pname}_${lib.replaceStrings [ "." ] [ "_" ] version}"; 34 42 sha256 = "oR9lpOFxgGfrtzncFT6dbmhKQfcuH/NvhOR/USHAHQc="; 35 43 }; 36 44 37 - nativeBuildInputs = [ 38 - autoconf 39 - automake 40 - libtool 41 - which 42 - pkg-config 43 - python3 44 - gobject-introspection 45 - vala 46 - gtk-doc 47 - docbook-xsl-nons 48 - docbook_xml_dtd_43 49 - ]; 45 + strictDeps = true; 50 46 51 - buildInputs = [ 52 - avahi 53 - gdk-pixbuf 54 - gst_all_1.gstreamer 55 - gst_all_1.gst-plugins-base 56 - ]; 47 + nativeBuildInputs = 48 + [ 49 + autoconf 50 + automake 51 + libtool 52 + gtk-doc # gtkdocize 53 + pkg-config 54 + gobject-introspection 55 + vala 56 + ] 57 + ++ lib.optionals withGtkDoc [ 58 + docbook-xsl-nons 59 + docbook_xml_dtd_43 60 + ]; 61 + 62 + buildInputs = 63 + [ 64 + avahi 65 + gdk-pixbuf 66 + gst_all_1.gstreamer 67 + gst_all_1.gst-plugins-base 68 + ] 69 + ++ lib.optionals withGtkDoc [ 70 + gtk-doc 71 + ]; 57 72 58 73 propagatedBuildInputs = [ 59 74 glib ··· 61 76 ]; 62 77 63 78 configureFlags = [ 64 - "--enable-gtk-doc" 65 - "--disable-tests" # Tests require mDNS server. 79 + (lib.enableFeature false "tests") # Tests require mDNS server 80 + (lib.enableFeature withGtkDoc "gtk-doc") 66 81 ]; 82 + 83 + postPatch = '' 84 + substituteInPlace configure.ac \ 85 + --replace-fail pkg-config "$PKG_CONFIG" 86 + ''; 67 87 68 88 preConfigure = '' 69 89 NOCONFIGURE=1 ./autogen.sh