1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 06:05:13 +00:00
nixpkgs/pkgs/applications/misc/dmenu/default.nix
2019-08-20 19:36:05 +02:00

34 lines
937 B
Nix

{ stdenv, fetchurl, libX11, libXinerama, libXft, zlib, patches ? [ ./xim.patch ] }:
stdenv.mkDerivation rec {
name = "dmenu-4.9";
src = fetchurl {
url = "https://dl.suckless.org/tools/${name}.tar.gz";
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
'';
makeFlags = [ "CC:=$(CC)" ];
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 globin ];
platforms = platforms.all;
};
}