nixpkgs/pkgs/development/libraries/libfm/default.nix

54 lines
1.4 KiB
Nix
Raw Normal View History

2021-02-07 23:52:30 +00:00
{ lib
, stdenv
, fetchurl
, glib
, intltool
, menu-cache
, pango
, pkg-config
, vala
2017-08-08 21:43:54 +01:00
, extraOnly ? false
2021-02-08 05:14:20 +00:00
, withGtk3 ? false, gtk2, gtk3
2021-02-07 23:52:30 +00:00
}:
2021-02-08 05:14:20 +00:00
2014-11-14 23:07:00 +00:00
let
2017-08-08 21:43:54 +01:00
gtk = if withGtk3 then gtk3 else gtk2;
inherit (lib) optional;
in
2016-04-11 18:41:57 +01:00
stdenv.mkDerivation rec {
2021-02-07 23:52:30 +00:00
pname = if extraOnly
then "libfm-extra"
else "libfm";
2021-02-07 14:25:07 +00:00
version = "1.3.2";
2016-04-11 18:41:57 +01:00
2014-03-01 18:37:39 +00:00
src = fetchurl {
2016-04-11 18:41:57 +01:00
url = "mirror://sourceforge/pcmanfm/libfm-${version}.tar.xz";
2021-02-07 14:25:07 +00:00
sha256 = "sha256-pQQmMDBM+OXYz/nVZca9VG8ii0jJYBU+02ajTofK0eU=";
2014-03-01 18:37:39 +00:00
};
nativeBuildInputs = [ vala pkg-config intltool ];
2021-02-07 23:52:30 +00:00
buildInputs = [ glib gtk pango ]
++ optional (!extraOnly) menu-cache;
2021-02-07 23:52:30 +00:00
configureFlags = [ "--sysconfdir=/etc" ]
++ optional extraOnly "--with-extra-only"
++ optional withGtk3 "--with-gtk=3";
2017-08-08 21:43:54 +01:00
2021-02-07 23:52:30 +00:00
installFlags = [ "sysconfdir=${placeholder "out"}/etc" ];
2018-12-25 11:51:26 +00:00
# libfm-extra is pulled in by menu-cache and thus leads to a collision for libfm
postInstall = optional (!extraOnly) ''
rm $out/lib/libfm-extra.so $out/lib/libfm-extra.so.* $out/lib/libfm-extra.la $out/lib/pkgconfig/libfm-extra.pc
'';
2017-08-08 21:43:54 +01:00
enableParallelBuilding = true;
2014-03-01 18:37:39 +00:00
meta = with lib; {
homepage = "https://blog.lxde.org/category/pcmanfm/";
2014-11-14 23:07:00 +00:00
license = licenses.lgpl21Plus;
2014-03-01 18:37:39 +00:00
description = "A glib-based library for file management";
maintainers = [ maintainers.ttuegel ];
2017-04-20 22:43:04 +01:00
platforms = platforms.linux ++ platforms.darwin;
2014-03-01 18:37:39 +00:00
};
}