summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@gmail.com>2014-09-21 14:58:53 -0300
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-09-21 20:05:12 +0100
commit9c25f350a818a9da00cb13fa34894e0802ecfc66 (patch)
tree6c7fd17d1172eb0cb5e93de09d38264caa204713
parent6012042805d057d572d6f783b0cf512654883d7e (diff)
downloadnixpkgs-9c25f350a818a9da00cb13fa34894e0802ecfc66.tar
nixpkgs-9c25f350a818a9da00cb13fa34894e0802ecfc66.tar.gz
nixpkgs-9c25f350a818a9da00cb13fa34894e0802ecfc66.tar.bz2
nixpkgs-9c25f350a818a9da00cb13fa34894e0802ecfc66.tar.lz
nixpkgs-9c25f350a818a9da00cb13fa34894e0802ecfc66.tar.xz
nixpkgs-9c25f350a818a9da00cb13fa34894e0802ecfc66.tar.zst
nixpkgs-9c25f350a818a9da00cb13fa34894e0802ecfc66.zip
Ratpoison: updated for 1.4.8
Also, adding the infamous service file

Closes #4192
-rw-r--r--nixos/modules/services/x11/window-managers/ratpoison.nix28
-rw-r--r--pkgs/applications/window-managers/ratpoison/default.nix36
2 files changed, 43 insertions, 21 deletions
diff --git a/nixos/modules/services/x11/window-managers/ratpoison.nix b/nixos/modules/services/x11/window-managers/ratpoison.nix
new file mode 100644
index 00000000000..c203c35cd1b
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/ratpoison.nix
@@ -0,0 +1,28 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.xserver.windowManager.ratpoison;
+in
+{
+  ###### interface
+  options = {
+    services.xserver.windowManager.ratpoison.enable = mkOption {
+      default = false;
+      description = "Enable the Ratpoison window manager.";
+    };
+  };
+
+  ###### implementation
+  config = mkIf cfg.enable {
+    services.xserver.windowManager.session = singleton {
+      name = "ratpoison";
+      start = ''
+        ${pkgs.ratpoison}/bin/ratpoison &
+        waitPID=$!
+      '';
+    };
+    environment.systemPackages = [ pkgs.ratpoison ];
+  };
+}
diff --git a/pkgs/applications/window-managers/ratpoison/default.nix b/pkgs/applications/window-managers/ratpoison/default.nix
index 0eb28464e59..e550f9fdd83 100644
--- a/pkgs/applications/window-managers/ratpoison/default.nix
+++ b/pkgs/applications/window-managers/ratpoison/default.nix
@@ -1,32 +1,26 @@
-{ stdenv, fetchurl, libX11, inputproto, libXt, libXpm, libXft, fontconfig, freetype
-, libXtst, xextproto, readline, libXi, pkgconfig, perl, autoconf, automake }:
+{ stdenv, fetchurl, pkgconfig, perl, autoconf, automake
+, libX11, inputproto, libXt, libXpm, libXft, libXtst, xextproto, libXi
+, fontconfig, freetype, readline
+}:
 
 stdenv.mkDerivation rec {
-  name = "ratpoison-1.4.6";
+  name = "ratpoison-${version}";
+  version = "1.4.8";
 
   src = fetchurl {
-    url = "mirror://savannah/ratpoison/${name}.tar.gz";
-    sha256 = "1y1b38bng0naxfy50asshzg5xr1b2rn88mcgbds42y72d7y9d0za";
+    url = "mirror://savannah/ratpoison/${name}.tar.xz";
+    sha256 = "1w502z55vv7zs45l80nsllqh9fvfwjfdfi11xy1qikhzdmirains";
   };
 
   buildInputs =
-    [ libX11 inputproto libXt libXpm libXft fontconfig freetype libXtst
-      xextproto readline libXi pkgconfig perl autoconf automake
-    ];
+    [ pkgconfig perl autoconf automake
+      libX11 inputproto libXt libXpm libXft libXtst xextproto libXi
+      fontconfig freetype readline ];
 
-  NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2"; # urgh
-
-  preConfigure = "autoreconf -vf";      # needed because of the patch above
-
-  postInstall = ''
-    mkdir -p $out/share/emacs/site-lisp
-    mv "$out/share/ratpoison/"*.el $out/share/emacs/site-lisp/
-  '';
-
-  meta = {
+  meta = with stdenv.lib; {
     homepage = "http://www.nongnu.org/ratpoison/";
     description = "Simple mouse-free tiling window manager";
-    license = stdenv.lib.licenses.gpl2Plus;
+    license = licenses.gpl2Plus;
 
     longDescription = ''
        Ratpoison is a simple window manager with no fat library
@@ -43,7 +37,7 @@ stdenv.mkDerivation rec {
        cripples Emacs and other quality pieces of software.
     '';
 
-    hydraPlatforms = stdenv.lib.platforms.linux;
-    maintainers = [ ];
+    platforms = platforms.linux;
+    maintainers = [ maintainers.AndersonTorres ];
   };
 }