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}:
21
22stdenv.mkDerivation rec {
23 pname = "libdmapsharing";
24 version = "3.9.13";
25
26 outputs = [
27 "out"
28 "dev"
29 ]
30 ++ lib.optionals withGtkDoc [
31 "devdoc"
32 ];
33
34 outputBin = "dev";
35
36 src = fetchFromGitLab {
37 domain = "gitlab.gnome.org";
38 owner = "GNOME";
39 repo = "libdmapsharing";
40 rev = "${lib.toUpper pname}_${lib.replaceStrings [ "." ] [ "_" ] version}";
41 sha256 = "oR9lpOFxgGfrtzncFT6dbmhKQfcuH/NvhOR/USHAHQc=";
42 };
43
44 strictDeps = true;
45
46 nativeBuildInputs = [
47 autoconf
48 automake
49 libtool
50 gtk-doc # gtkdocize
51 pkg-config
52 gobject-introspection
53 vala
54 ]
55 ++ lib.optionals withGtkDoc [
56 docbook-xsl-nons
57 docbook_xml_dtd_43
58 ];
59
60 buildInputs = [
61 avahi
62 gdk-pixbuf
63 gst_all_1.gstreamer
64 gst_all_1.gst-plugins-base
65 ]
66 ++ lib.optionals withGtkDoc [
67 gtk-doc
68 ];
69
70 propagatedBuildInputs = [
71 glib
72 libsoup_3
73 ];
74
75 configureFlags = [
76 (lib.enableFeature false "tests") # Tests require mDNS server
77 (lib.enableFeature withGtkDoc "gtk-doc")
78 ];
79
80 postPatch = ''
81 substituteInPlace configure.ac \
82 --replace-fail pkg-config "$PKG_CONFIG"
83 '';
84
85 preConfigure = ''
86 NOCONFIGURE=1 ./autogen.sh
87 '';
88
89 meta = with lib; {
90 homepage = "https://www.flyn.org/projects/libdmapsharing/";
91 description = "Library that implements the DMAP family of protocols";
92 teams = [ teams.gnome ];
93 license = licenses.lgpl21Plus;
94 platforms = platforms.linux;
95 };
96}