dmenu: Add option config.dmenu.enableXft for enabling xft font support (turned off by default).

This commit is contained in:
Rickard Nilsson 2012-11-07 16:03:37 +01:00
parent 8c4f5d02aa
commit 7afafe0b6d
2 changed files with 14 additions and 3 deletions

View File

@ -1,4 +1,6 @@
{stdenv, fetchurl, libX11, libXinerama}: {stdenv, fetchurl, libX11, libXinerama, enableXft, libXft, zlib}:
with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dmenu-4.5"; name = "dmenu-4.5";
@ -8,7 +10,14 @@ stdenv.mkDerivation rec {
sha256 = "0l58jpxrr80fmyw5pgw5alm5qry49aw6y049745wl991v2cdcb08"; sha256 = "0l58jpxrr80fmyw5pgw5alm5qry49aw6y049745wl991v2cdcb08";
}; };
buildInputs = [ libX11 libXinerama ]; xftPatch = fetchurl {
url = "http://tools.suckless.org/dmenu/patches/${name}-xft.diff";
sha256 = "efb4095d65e5e86f9dde97294732174409c24f319bdd4824cc22fa1404972b4f";
};
buildInputs = [ libX11 libXinerama ] ++ optionals enableXft [zlib libXft];
patches = optional enableXft xftPatch;
preConfigure = [ ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk'' ]; preConfigure = [ ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk'' ];

View File

@ -6700,7 +6700,9 @@ let
djview = callPackage ../applications/graphics/djview { }; djview = callPackage ../applications/graphics/djview { };
djview4 = pkgs.djview; djview4 = pkgs.djview;
dmenu = callPackage ../applications/misc/dmenu { }; dmenu = callPackage ../applications/misc/dmenu {
enableXft = config.dmenu.enableXft or false;
};
dmtx = builderDefsPackage (import ../tools/graphics/dmtx) { dmtx = builderDefsPackage (import ../tools/graphics/dmtx) {
inherit libpng libtiff libjpeg imagemagick librsvg inherit libpng libtiff libjpeg imagemagick librsvg