@@ -0,0 +1,54 @@
1+{ stdenv, fetchurl, pkgconfig, intltool, itstool, gtk3, dbus_glib, libnotify, libxml2, libcanberra_gtk3, caja, mod_dnssd, apacheHttpd, hicolor_icon_theme, wrapGAppsHook }:
2+
3+stdenv.mkDerivation rec {
4+ name = "mate-user-share-${version}";
5+ version = "${major-ver}.${minor-ver}";
6+ major-ver = "1.18";
7+ minor-ver = "0";
8+
9+ src = fetchurl {
10+ url = "http://pub.mate-desktop.org/releases/${major-ver}/${name}.tar.xz";
11+ sha256 = "0w7r7jmm12n41hcxj1pfk3f0xy69cddx7ga490x191rdpcb3ry1n";
12+ };
13+
14+ nativeBuildInputs = [
15+ pkgconfig
16+ intltool
17+ itstool
18+ wrapGAppsHook
19+ ];
20+
21+ buildInputs = [
22+ gtk3
23+ dbus_glib
24+ libnotify
25+ libcanberra_gtk3
26+ libxml2
27+ caja
28+ hicolor_icon_theme
29+ # Should mod_dnssd and apacheHttpd be runtime dependencies?
30+ # In gnome-user-share they are not.
31+ #mod_dnssd
32+ #apacheHttpd
33+ ];
34+
35+ preConfigure = ''
36+ sed -e 's,^LoadModule dnssd_module.\+,LoadModule dnssd_module ${mod_dnssd}/modules/mod_dnssd.so,' \
37+ -e 's,''${HTTP_MODULES_PATH},${apacheHttpd}/modules,' \
38+ -i data/dav_user_2.4.conf
39+ '';
40+
41+ configureFlags = [
42+ "--with-httpd=${apacheHttpd.out}/bin/httpd"
43+ "--with-modules-path=${apacheHttpd.dev}/modules"
44+ "--with-cajadir=$(out)/lib/caja/extensions-2.0"
45+ ];
46+
47+ meta = with stdenv.lib; {
48+ description = "User level public file sharing for the MATE desktop";
49+ homepage = https://github.com/mate-desktop/mate-user-share;
50+ license = with licenses; [ gpl2Plus ];
51+ platforms = platforms.unix;
52+ maintainers = [ maintainers.romildo ];
53+ };
54+}