From 96c2b03e7525ee5f4fc13d67d21bfe1bce2cbe6b Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Mon, 5 Oct 2020 22:12:48 +0200 Subject: Cleanup --- pkgs/larbs/dmenu/default.nix | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pkgs/larbs/dmenu/default.nix (limited to 'pkgs/larbs/dmenu/default.nix') diff --git a/pkgs/larbs/dmenu/default.nix b/pkgs/larbs/dmenu/default.nix new file mode 100644 index 0000000..6898019 --- /dev/null +++ b/pkgs/larbs/dmenu/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchgit, libX11, libXinerama, libXft, zlib, patches ? [] }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "dmenu"; + + src = fetchgit { + url = "https://github.com/LukeSmithXYZ/dmenu"; + rev = "89c6680fc5174c028fa692a9112f037d19a1bc72"; + sha256 = "0sxa3z676ip0w87b0zjapx68wpwzc4mkijjxvnpka2vm4qw5hpsl"; + }; + + buildInputs = [ libX11 libXinerama zlib libXft ]; + + patches = [ + ./mac-like.diff + ]; + + postPatch = '' + sed -ri -e 's!\<(dmenu|dmenu_path|stest)\>!'"$out/bin"'/&!g' dmenu_run + sed -ri -e 's!\!'"$out/bin"'/&!g' dmenu_path + ''; + + preConfigure = '' + sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk + sed -i 's/static const unsigned int \(.*alpha\) = \(.*\);/#define \1 \2/' config.h + ''; + + makeFlags = [ "CC:=$(CC)" ]; + + meta = { + homepage = "https://github.com/LukeSmithXYZ/dmenu"; + description = "dmenu setup for LARBS"; + license = licenses.mit; + platforms = platforms.all; + }; +} -- cgit 1.4.1