nixpkgs/pkgs/development/libraries/libfm/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

46 lines
1.4 KiB
Nix

{ stdenv, fetchurl, glib, intltool, menu-cache, pango, pkg-config, vala
, extraOnly ? false
, withGtk3 ? false, gtk2, gtk3 }:
let
gtk = if withGtk3 then gtk3 else gtk2;
inherit (stdenv.lib) optional;
in
stdenv.mkDerivation rec {
name = if extraOnly
then "libfm-extra-${version}"
else "libfm-${version}";
version = "1.3.1";
src = fetchurl {
url = "mirror://sourceforge/pcmanfm/libfm-${version}.tar.xz";
sha256 = "1r6gl49xrykldwz8y4h2s7gjarxigg3bbkrj0gphxjj1vr5j9ccn";
};
nativeBuildInputs = [ vala pkg-config intltool ];
buildInputs = [ glib gtk pango ] ++ optional (!extraOnly) menu-cache;
configureFlags = [
"--sysconfdir=/etc"
] ++ optional extraOnly "--with-extra-only"
++ optional withGtk3 "--with-gtk=3";
installFlags = [
"sysconfdir=${placeholder "out"}/etc"
];
# 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
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = "https://blog.lxde.org/category/pcmanfm/";
license = licenses.lgpl21Plus;
description = "A glib-based library for file management";
maintainers = [ maintainers.ttuegel ];
platforms = platforms.linux ++ platforms.darwin;
};
}