Skip to content

Commit

Permalink
libdmapsharing: fix cross compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCao committed Sep 2, 2024
1 parent b2a3ec3 commit 2de067f
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions pkgs/development/libraries/libdmapsharing/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
, autoconf
, automake
, libtool
, which
, pkg-config
, python3
, vala
, avahi
, gdk-pixbuf
Expand All @@ -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 {
Expand All @@ -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
];
Expand All @@ -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 = [
Expand All @@ -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
'';
Expand Down

0 comments on commit 2de067f

Please sign in to comment.