1{ stdenv, fetchurl, glib, intltool, menu-cache, pango, pkgconfig, vala_0_34
2, extraOnly ? false
3, withGtk3 ? false, gtk2, gtk3 }:
4let
5 gtk = if withGtk3 then gtk3 else gtk2;
6 inherit (stdenv.lib) optional;
7in
8stdenv.mkDerivation rec {
9 name = if extraOnly
10 then "libfm-extra-${version}"
11 else "libfm-${version}";
12 version = "1.2.5";
13
14 src = fetchurl {
15 url = "mirror://sourceforge/pcmanfm/libfm-${version}.tar.xz";
16 sha256 = "0nlvfwh09gbq8bkbvwnw6iqr918rrs9gc9ljb9pjspyg408bn1n7";
17 };
18
19 nativeBuildInputs = [ pkgconfig ];
20 buildInputs = [ glib gtk intltool pango vala_0_34 ]
21 ++ optional (!extraOnly) menu-cache;
22
23 configureFlags = [ (optional extraOnly "--with-extra-only")
24 (optional withGtk3 "--with-gtk=3") ];
25
26 enableParallelBuilding = true;
27
28 meta = with stdenv.lib; {
29 homepage = http://blog.lxde.org/?cat=28/;
30 license = licenses.lgpl21Plus;
31 description = "A glib-based library for file management";
32 maintainers = [ maintainers.ttuegel ];
33 platforms = platforms.linux ++ platforms.darwin;
34 };
35}