depot/third_party/nixpkgs/pkgs/applications/misc/dmenu/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

34 lines
940 B
Nix

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