dot_testing/builds/dmenu.nix

22 lines
476 B
Nix

{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, zlib }:
stdenv.mkDerivation rec {
pname = "dmenu";
version = "5.2";
src = ./dmenu;
buildInputs = [ libX11 libXinerama zlib libXft ];
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
'';
makeFlags = [ "CC:=$(CC)" ];
}