git.iko.soy/typeable/nixpkgs
on master help sign in
Sawfish (git): New Package

Sawfish is a versatile, Lisp-based window manager In that commit I include all Sawfish stack: - librep, a lisp system; - rep-gtk, bindings for gtk - sawfish, the window manager

commitf19ed980a2b037b2c72edc974c5b83ea292e6490 authorAndersonTorres <torres.anderson.85@gmail.com> dateFri 6 Feb 2015, 14:32 (12 years ago) parentdf0016a
8 files changed+156
nixos/modules/services/x11/window-managers/default.nix+1 nixos/modules/services/x11/window-managers/sawfish.nix+28 pkgs/applications/window-managers/sawfish/default.nix+42 pkgs/development/libraries/librep/default.nix+42 pkgs/development/libraries/librep/setup-hook.sh+5 pkgs/development/libraries/rep-gtk/default.nix+27 pkgs/development/libraries/rep-gtk/setup-hook.sh+5 pkgs/top-level/all-packages.nix+6
nixos/modules/services/x11/window-managers/default.nix+1
@@ -14,6 +14,7 @@ in
1414 ./i3.nix
1515 ./metacity.nix
1616 ./openbox.nix
17+ ./sawfish.nix
1718 ./stumpwm.nix
1819 ./twm.nix
1920 ./windowmaker.nix
nixos/modules/services/x11/window-managers/sawfish.nixnew file+28
@@ -0,0 +1,28 @@
1+{ config, lib, pkgs, ... }:
2+
3+with lib;
4+
5+let
6+ cfg = config.services.xserver.windowManager.sawfish;
7+in
8+{
9+ ###### interface
10+ options = {
11+ services.xserver.windowManager.sawfish.enable = mkOption {
12+ default = false;
13+ description = "Enable the Sawfish window manager.";
14+ };
15+ };
16+
17+ ###### implementation
18+ config = mkIf cfg.enable {
19+ services.xserver.windowManager.session = singleton {
20+ name = "sawfish";
21+ start = ''
22+ ${pkgs.sawfish}/bin/sawfish &
23+ waitPID=$!
24+ '';
25+ };
26+ environment.systemPackages = [ pkgs.sawfish ];
27+ };
28+}
pkgs/applications/window-managers/sawfish/default.nixnew file+42
@@ -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+}
pkgs/development/libraries/librep/default.nixnew file+42
@@ -0,0 +1,42 @@
1+
2+ { stdenv, fetchgit
3+, pkgconfig, autoreconfHook
4+, readline, texinfo
5+, gdbm, gmp, libffi }:
6+
7+with stdenv.lib;
8+stdenv.mkDerivation rec {
9+
10+ name = "librep-git-2015-02-15";
11+
12+ src = fetchgit {
13+ url = "https://github.com/SawfishWM/librep.git";
14+ rev = "a1f2db721aa5055e90f6a76fde625946340ed8cf";
15+ sha256 = "c91484d02b2408becc8961997c3d6404aefa8e1f8af4621a8b5f7622b1857fa6";
16+ };
17+
18+ buildInputs = [ pkgconfig autoreconfHook readline texinfo ];
19+ propagatedBuildInputs = [ gdbm gmp libffi ];
20+
21+ configureFlags = [
22+ "--disable-static"
23+ ];
24+
25+ setupHook = ./setup-hook.sh;
26+
27+ meta = {
28+ description = "Lisp system for Sawfish";
29+ longDescription = ''
30+ This is librep, a Lisp system for UNIX, needed by Sawfish window manager.
31+ It contains a Lisp interpreter, byte-code compiler and virtual machine.
32+ Applications may use the Lisp interpreter as an extension language,
33+ or it may be used for stand-alone scripts.
34+
35+ The Lisp dialect was originally inspired by Emacs Lisp, but with the worst
36+ features removed. It also borrows many ideas from Scheme.
37+ '';
38+ homepage = http://sawfish.wikia.com;
39+ license = licenses.gpl2;
40+ maintainers = [ maintainers.AndersonTorres ];
41+ };
42+}
pkgs/development/libraries/librep/setup-hook.shnew file+5
@@ -0,0 +1,5 @@
1+addRepDLLoadPath () {
2+ addToSearchPath REP_DL_LOAD_PATH $1/lib/rep
3+}
4+
5+envHooks+=(addRepDLLoadPath)
pkgs/development/libraries/rep-gtk/default.nixnew file+27
@@ -0,0 +1,27 @@
1+{ stdenv, fetchgit, pkgconfig, autoreconfHook, librep, gtk2 }:
2+
3+with stdenv.lib;
4+stdenv.mkDerivation rec {
5+
6+ name = "rep-gtk-git-2015-02-15";
7+
8+ src = fetchgit {
9+ url = "https://github.com/SawfishWM/rep-gtk.git";
10+ rev = "74ac3504f2bbbcc9ded005ab97cbf94cdc47924d";
11+ sha256 = "edb47c5b6d09201d16a8f0616d18690ff0a37dca56d31c6e635b286bd0b6a031";
12+ };
13+
14+ buildInputs = [ pkgconfig autoreconfHook ];
15+ propagatedBuildInputs = [ librep gtk2 ];
16+
17+ patchPhase = ''
18+ sed -e 's|installdir=$(repexecdir)|installdir=$(libdir)/rep|g' -i Makefile.in
19+ '';
20+
21+ meta = {
22+ description = "GTK+ bindings for librep";
23+ homepage = http://sawfish.wikia.com;
24+ license = licenses.gpl2;
25+ maintainers = [ maintainers.AndersonTorres ];
26+ };
27+}
pkgs/development/libraries/rep-gtk/setup-hook.shnew file+5
@@ -0,0 +1,5 @@
1+addRepDLLoadPath () {
2+ addToSearchPath REP_DL_LOAD_PATH $1/lib/rep
3+}
4+
5+envHooks+=(addRepDLLoadPath)
pkgs/top-level/all-packages.nix+6
@@ -10906,6 +10906,12 @@ let
1090610906 fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf ]; };
1090710907 };
1090810908
10909+ librep = callPackage ../development/libraries/librep { };
10910+
10911+ rep-gtk = callPackage ../development/libraries/rep-gtk { };
10912+
10913+ sawfish = callPackage ../applications/window-managers/sawfish { };
10914+
1090910915 sxhkd = callPackage ../applications/window-managers/sxhkd { };
1091010916
1091110917 msmtp = callPackage ../applications/networking/msmtp { };