libdmapsharing: fix cross compilation

This commit is contained in:
Nick Cao
2024-09-02 19:50:28 -04:00
parent b2a3ec3b8c
commit 2de067fa3f
@@ -4,9 +4,7 @@
, autoconf
, automake
, libtool
, which
, pkg-config
, python3
, vala
, avahi
, gdk-pixbuf
@@ -17,13 +15,20 @@
, docbook_xml_dtd_43
, gobject-introspection
, libsoup_3
, withGtkDoc ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
}:
stdenv.mkDerivation rec {
pname = "libdmapsharing";
version = "3.9.13";
outputs = [ "out" "dev" "devdoc" ];
outputs = [
"out"
"dev"
] ++ lib.optionals withGtkDoc [
"devdoc"
];
outputBin = "dev";
src = fetchFromGitLab {
@@ -34,16 +39,17 @@ stdenv.mkDerivation rec {
sha256 = "oR9lpOFxgGfrtzncFT6dbmhKQfcuH/NvhOR/USHAHQc=";
};
strictDeps = true;
nativeBuildInputs = [
autoconf
automake
libtool
which
gtk-doc # gtkdocize
pkg-config
python3
gobject-introspection
vala
gtk-doc
] ++ lib.optionals withGtkDoc [
docbook-xsl-nons
docbook_xml_dtd_43
];
@@ -53,6 +59,8 @@ stdenv.mkDerivation rec {
gdk-pixbuf
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
] ++ lib.optionals withGtkDoc [
gtk-doc
];
propagatedBuildInputs = [
@@ -61,10 +69,15 @@ stdenv.mkDerivation rec {
];
configureFlags = [
"--enable-gtk-doc"
"--disable-tests" # Tests require mDNS server.
(lib.enableFeature false "tests") # Tests require mDNS server
(lib.enableFeature withGtkDoc "gtk-doc")
];
postPatch = ''
substituteInPlace configure.ac \
--replace-fail pkg-config "$PKG_CONFIG"
'';
preConfigure = ''
NOCONFIGURE=1 ./autogen.sh
'';