1{
2 lib,
3 stdenv,
4 fetchurl,
5 pkg-config,
6 gettext,
7 itstool,
8 gtk3,
9 caja,
10 dbus-glib,
11 libnotify,
12 libxml2,
13 libcanberra-gtk3,
14 apacheHttpdPackages,
15 hicolor-icon-theme,
16 mate,
17 wrapGAppsHook3,
18 mateUpdateScript,
19}:
20
21let
22 inherit (apacheHttpdPackages) apacheHttpd mod_dnssd;
23in
24stdenv.mkDerivation rec {
25 pname = "mate-user-share";
26 version = "1.28.0";
27
28 src = fetchurl {
29 url = "https://pub.mate-desktop.org/releases/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
30 sha256 = "iYVgmZkXllE0jkl+8I81C4YIG5expKcwQHfurlc5rjg=";
31 };
32
33 nativeBuildInputs = [
34 pkg-config
35 gettext
36 itstool
37 libxml2
38 wrapGAppsHook3
39 ];
40
41 buildInputs = [
42 gtk3
43 caja
44 dbus-glib
45 libnotify
46 libcanberra-gtk3
47 hicolor-icon-theme
48 # Should mod_dnssd and apacheHttpd be runtime dependencies?
49 # In gnome-user-share they are not.
50 #mod_dnssd
51 #apacheHttpd
52 ];
53
54 preConfigure = ''
55 sed -e 's,^LoadModule dnssd_module.\+,LoadModule dnssd_module ${mod_dnssd}/modules/mod_dnssd.so,' \
56 -e 's,''${HTTP_MODULES_PATH},${apacheHttpd}/modules,' \
57 -i data/dav_user_2.4.conf
58 '';
59
60 configureFlags = [
61 "--with-httpd=${apacheHttpd.out}/bin/httpd"
62 "--with-modules-path=${apacheHttpd}/modules"
63 "--with-cajadir=$(out)/lib/caja/extensions-2.0"
64 ];
65
66 enableParallelBuilding = true;
67
68 passthru.updateScript = mateUpdateScript { inherit pname; };
69
70 meta = with lib; {
71 description = "User level public file sharing for the MATE desktop";
72 mainProgram = "mate-file-share-properties";
73 homepage = "https://github.com/mate-desktop/mate-user-share";
74 license = with licenses; [ gpl2Plus ];
75 platforms = platforms.unix;
76 teams = [ teams.mate ];
77 };
78}