nixpkgs/pkgs/applications/misc/dmenu/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
940 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, zlib, patches ? null }:
stdenv.mkDerivation rec {
pname = "dmenu";
2022-02-15 17:21:01 +01:00
version = "5.1";
src = fetchurl {
url = "https://dl.suckless.org/tools/dmenu-${version}.tar.gz";
2022-02-15 17:21:01 +01:00
sha256 = "sha256-H01wnrujfrcybroOZl4PE75Pok7jXJWw15ww8Uo0j9U=";
};
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
'';
2019-05-07 00:57:14 +02:00
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;
};
}