3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/dmenu/default.nix
Felix Bühler fbdf78236a
pkgs/applications: rename name to pname&version part 1 (#144949)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-11-07 21:29:51 +01:00

35 lines
941 B
Nix

{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, zlib, patches ? null }:
stdenv.mkDerivation rec {
pname = "dmenu";
version = "5.0";
src = fetchurl {
url = "https://dl.suckless.org/tools/dmenu-${version}.tar.gz";
sha256 = "1lvfxzg3chsgcqbc2vr0zic7vimijgmbvnspayx73kyvqi1f267y";
};
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 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;
};
}