libfm: cosmetic changes

This commit is contained in:
AndersonTorres 2021-02-07 20:52:30 -03:00
parent c22b718a28
commit 3dcc51a630

View File

@ -1,14 +1,23 @@
{ lib, stdenv, fetchurl, glib, intltool, menu-cache, pango, pkg-config, vala { lib
, stdenv
, fetchurl
, glib
, intltool
, menu-cache
, pango
, pkg-config
, vala
, extraOnly ? false , extraOnly ? false
, withGtk3 ? false, gtk2, gtk3 }: , withGtk3 ? true , gtk3, gtk2
}:
let let
gtk = if withGtk3 then gtk3 else gtk2; gtk = if withGtk3 then gtk3 else gtk2;
inherit (lib) optional; inherit (lib) optional;
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = if extraOnly pname = if extraOnly
then "libfm-extra-${version}" then "libfm-extra"
else "libfm-${version}"; else "libfm";
version = "1.3.2"; version = "1.3.2";
src = fetchurl { src = fetchurl {
@ -17,16 +26,14 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ vala pkg-config intltool ]; nativeBuildInputs = [ vala pkg-config intltool ];
buildInputs = [ glib gtk pango ] ++ optional (!extraOnly) menu-cache; buildInputs = [ glib gtk pango ]
++ optional (!extraOnly) menu-cache;
configureFlags = [ configureFlags = [ "--sysconfdir=/etc" ]
"--sysconfdir=/etc" ++ optional extraOnly "--with-extra-only"
] ++ optional extraOnly "--with-extra-only"
++ optional withGtk3 "--with-gtk=3"; ++ optional withGtk3 "--with-gtk=3";
installFlags = [ installFlags = [ "sysconfdir=${placeholder "out"}/etc" ];
"sysconfdir=${placeholder "out"}/etc"
];
# libfm-extra is pulled in by menu-cache and thus leads to a collision for libfm # libfm-extra is pulled in by menu-cache and thus leads to a collision for libfm
postInstall = optional (!extraOnly) '' postInstall = optional (!extraOnly) ''