diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix index 45a4e947e0a..4f2a2309b60 100644 --- a/nixos/modules/services/x11/window-managers/default.nix +++ b/nixos/modules/services/x11/window-managers/default.nix @@ -18,6 +18,7 @@ in ./i3.nix ./herbstluftwm.nix ./bspwm.nix + ./stumpwm.nix ]; options = { @@ -60,4 +61,4 @@ in config = { services.xserver.displayManager.session = cfg.session; }; -} +} \ No newline at end of file diff --git a/nixos/modules/services/x11/window-managers/stumpwm.nix b/nixos/modules/services/x11/window-managers/stumpwm.nix new file mode 100644 index 00000000000..a876f13fd21 --- /dev/null +++ b/nixos/modules/services/x11/window-managers/stumpwm.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.xserver.windowManager.stumpwm; +in + +{ + options = { + services.xserver.windowManager.stumpwm = { + enable = mkOption { + type = types.bool; + default = false; + example = true; + description = "Enable the stumpwm tiling window manager."; + }; + }; + }; + + config = mkIf cfg.enable { + services.xserver.windowManager.session = singleton { + name = "stumpwm"; + start = " + ${pkgs.stumpwm}/bin/stumpwm + "; + }; + environment.systemPackages = [ pkgs.stumpwm ]; + }; +} diff --git a/pkgs/applications/window-managers/stumpwm/contrib.nix b/pkgs/applications/window-managers/stumpwm/contrib.nix new file mode 100644 index 00000000000..dc707983811 --- /dev/null +++ b/pkgs/applications/window-managers/stumpwm/contrib.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchgit }: + +let + tag = "0.9.8"; +in + +stdenv.mkDerivation rec { + name = "stumpwmContrib-${tag}"; + + src = fetchgit { + url = "https://github.com/stumpwm/stumpwm"; + rev = "refs/tags/${tag}"; + sha256 = "0a0lwwlly4hlmb30bk6dmi6bsdsy37g4crvv1z24gixippyv1qzm"; + }; + + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir -p $out/bin + cp -a $src/contrib $out/ + cp -a $src/contrib/stumpish $out/bin + ''; + + meta = with stdenv.lib; { + description = "Extension modules for the StumpWM"; + homepage = https://github.com/stumpwm/; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ _1126 ]; + platforms = platforms.linux; + }; +} \ No newline at end of file diff --git a/pkgs/applications/window-managers/stumpwm/default.nix b/pkgs/applications/window-managers/stumpwm/default.nix new file mode 100644 index 00000000000..7fe28b1678a --- /dev/null +++ b/pkgs/applications/window-managers/stumpwm/default.nix @@ -0,0 +1,41 @@ +{ stdenv, pkgs, fetchgit, autoconf, sbcl, lispPackages, xdpyinfo, texinfo4, makeWrapper, stumpwmContrib }: + +let + tag = "0.9.8"; +in + +stdenv.mkDerivation rec { + name = "stumpwm-${tag}"; + + src = fetchgit { + url = "https://github.com/stumpwm/stumpwm"; + rev = "refs/tags/${tag}"; + sha256 = "0a0lwwlly4hlmb30bk6dmi6bsdsy37g4crvv1z24gixippyv1qzm"; + }; + + buildInputs = [ texinfo4 autoconf lispPackages.clx lispPackages.cl-ppcre sbcl makeWrapper stumpwmContrib ]; + + phases = [ "unpackPhase" "preConfigurePhase" "configurePhase" "installPhase" ]; + + preConfigurePhase = '' + $src/autogen.sh + mkdir -pv $out/bin + ''; + + configurePhase = '' + ./configure --prefix=$out --with-contrib-dir=${pkgs.stumpwmContrib}/contrib + ''; + + installPhase = '' + make + make install + ''; + + meta = with stdenv.lib; { + description = "A tiling window manager for X11"; + homepage = https://github.com/stumpwm/; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ _1126 ]; + platforms = platforms.linux; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f8382928e0b..07d3b3a5432 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10183,7 +10183,8 @@ let stp = callPackage ../applications/science/logic/stp {}; - stumpwm = lispPackages.stumpwm; + stumpwm = callPackage ../applications/window-managers/stumpwm {}; + stumpwmContrib = callPackage ../applications/window-managers/stumpwm/contrib.nix {}; sublime = callPackage ../applications/editors/sublime { };