1{ stdenv, fetchurl, pkgconfig, intltool, libtool
2, glib, dbus, udev, libgudev, udisks2, libgcrypt
3, libgphoto2, avahi, libarchive, fuse, libcdio
4, libxml2, libxslt, docbook_xsl, samba, libmtp
5, gnomeSupport ? false, gnome,libgnome_keyring, gconf, makeWrapper }:
6
7let
8 ver_maj = "1.22";
9 version = "${ver_maj}.4";
10in
11stdenv.mkDerivation rec {
12 name = "gvfs-${version}";
13
14 src = fetchurl {
15 url = "mirror://gnome/sources/gvfs/${ver_maj}/${name}.tar.xz";
16 sha256 = "57e33faad35aba72be3822099856aca847f391626cf3ec734b42e64ba31f6484";
17 };
18
19 nativeBuildInputs = [ pkgconfig intltool libtool ];
20
21 buildInputs =
22 [ makeWrapper glib dbus udev libgudev udisks2 libgcrypt
23 libgphoto2 avahi libarchive fuse libcdio
24 libxml2 libxslt docbook_xsl samba libmtp
25 # ToDo: a ligther version of libsoup to have FTP/HTTP support?
26 ] ++ stdenv.lib.optionals gnomeSupport (with gnome; [
27 gtk libsoup libgnome_keyring gconf
28 # ToDo: not working and probably useless until gnome3 from x-updates
29 ]);
30
31 enableParallelBuilding = true;
32
33 # ToDo: one probably should specify schemas for samba and others here
34 preFixup = ''
35 wrapProgram $out/libexec/gvfsd --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
36 '';
37
38 meta = with stdenv.lib; {
39 description = "Virtual Filesystem support library" + optionalString gnomeSupport " (full GNOME support)";
40 platforms = platforms.linux;
41 maintainers = [ maintainers.lethalman ];
42 };
43}