3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/dmenu/default.nix

32 lines
887 B
Nix
Raw Normal View History

{ stdenv, fetchurl, libX11, libXinerama, libXft, zlib, patches ? null }:
stdenv.mkDerivation rec {
2019-02-06 18:29:45 +00:00
name = "dmenu-4.9";
src = fetchurl {
url = "https://dl.suckless.org/tools/${name}.tar.gz";
2019-02-06 18:29:45 +00:00
sha256 = "0ia9nqr83bv6x247q30bal0v42chcj9qcjgv59xs6xj46m7iz5xk";
};
buildInputs = [ libX11 libXinerama zlib libXft ];
inherit patches;
postPatch = ''
sed -ri -e 's!\<(dmenu|dmenu_path|stest)\>!'"$out/bin"'/&!g' dmenu_run
sed -ri -e 's!\<stest\>!'"$out/bin"'/&!g' dmenu_path
'';
preConfigure = ''
sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk
'';
meta = with stdenv.lib; {
description = "A generic, highly customizable, and efficient menu for the X Window System";
homepage = https://tools.suckless.org/dmenu;
license = licenses.mit;
maintainers = with maintainers; [ pSub ];
platforms = platforms.all;
};
}