about summary refs log tree commit diff
path: root/pkgs/larbs/dmenu/default.nix
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-10-05 22:27:06 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-10-05 22:27:06 +0200
commit195647841245c07b5745392c1a8351ef068e0de8 (patch)
tree9f251b3c2696abb96a9cd3734a1793a20a9d9247 /pkgs/larbs/dmenu/default.nix
parent9be00a1b0eaa19d3784c3abb823f3e2ebe80f716 (diff)
parent98f5cb6f6975b0fb4afd301439957ed863b0e7ab (diff)
downloadpnpkgs-195647841245c07b5745392c1a8351ef068e0de8.tar.gz
pnpkgs-195647841245c07b5745392c1a8351ef068e0de8.zip
Merge branch 'master' into displayselect
Diffstat (limited to 'pkgs/larbs/dmenu/default.nix')
-rw-r--r--pkgs/larbs/dmenu/default.nix38
1 files changed, 38 insertions, 0 deletions
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!\<stest\>!'"$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;
+  };
+}