@@ -0,0 +1,42 @@
1+{ stdenv, fetchgit, pkgconfig, which, autoreconfHook, rep-gtk, pango, gdk_pixbuf, libXinerama, libXrandr, libXtst, imlib, gettext, texinfo, makeWrapper }:
2+
3+with stdenv.lib;
4+stdenv.mkDerivation rec {
5+
6+ name = "sawfish-git-2015-02-15";
7+
8+ src = fetchgit {
9+ url = "https://github.com/SawfishWM/sawfish.git";
10+ rev = "44729f44017e6779b4b66a7ecdbd63a98731f668";
11+ sha256 = "bd3f42f1604f37ecb2515008341cac4f6965840b2d6a6639dd1f3f2459f68e73";
12+ };
13+
14+ buildInputs = [ pkgconfig which autoreconfHook rep-gtk pango gdk_pixbuf libXinerama libXrandr libXtst imlib gettext texinfo makeWrapper ];
15+
16+ patchPhase = ''
17+ sed -e 's|REP_DL_LOAD_PATH=|REP_DL_LOAD_PATH=$(REP_DL_LOAD_PATH):|g' -i Makedefs.in
18+ sed -e 's|$(repexecdir)|$(libdir)/rep|g' -i src/Makefile.in
19+ '';
20+
21+ postInstall = ''
22+ for i in $out/lib/sawfish/sawfish-menu $out/bin/sawfish-about $out/bin/sawfish-client $out/bin/sawfish-config $out/bin/sawfish; do
23+ wrapProgram $i \
24+ --prefix REP_DL_LOAD_PATH "$out/lib/rep" \
25+ --set REP_LOAD_PATH "$out/share/sawfish/lisp"
26+ done
27+ '';
28+
29+ meta = {
30+ description = "An extensible, Lisp-based window manager";
31+ longDescription = ''
32+ Sawfish is an extensible window manager using a Lisp-based scripting language.
33+ Its policy is very minimal compared to most window managers. Its aim is simply
34+ to manage windows in the most flexible and attractive manner possible.
35+ All high-level WM functions are implemented in Lisp for future extensibility
36+ or redefinition.
37+ '';
38+ homepage = http://sawfish.wikia.com;
39+ license = licenses.gpl2;
40+ maintainers = [ maintainers.AndersonTorres ];
41+ };
42+}