2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, zlib, patches ? null }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "dmenu";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "5.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://dl.suckless.org/tools/dmenu-${version}.tar.gz";
|
2022-10-30 15:09:59 +00:00
|
|
|
sha256 = "sha256-1NTKd7WRQPJyJy21N+BbuRpZFPVoAmUtxX5hp3PUN5I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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)" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-12-06 16:07:01 +00:00
|
|
|
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;
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "dmenu";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|