Merge pull request #4387 from 1126/refactor-stumpwm
stumpwm: update and refactoring
This commit is contained in:
commit
2ef0a17561
@ -18,6 +18,7 @@ in
|
|||||||
./i3.nix
|
./i3.nix
|
||||||
./herbstluftwm.nix
|
./herbstluftwm.nix
|
||||||
./bspwm.nix
|
./bspwm.nix
|
||||||
|
./stumpwm.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
30
nixos/modules/services/x11/window-managers/stumpwm.nix
Normal file
30
nixos/modules/services/x11/window-managers/stumpwm.nix
Normal file
@ -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 ];
|
||||||
|
};
|
||||||
|
}
|
31
pkgs/applications/window-managers/stumpwm/contrib.nix
Normal file
31
pkgs/applications/window-managers/stumpwm/contrib.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
}
|
41
pkgs/applications/window-managers/stumpwm/default.nix
Normal file
41
pkgs/applications/window-managers/stumpwm/default.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
}
|
@ -44,8 +44,6 @@ let lispPackages = rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
stumpwm = callPackage ./stumpwm {};
|
|
||||||
|
|
||||||
alexandria = buildLispPackage rec {
|
alexandria = buildLispPackage rec {
|
||||||
baseName = "alexandria";
|
baseName = "alexandria";
|
||||||
version = "git-20131029";
|
version = "git-20131029";
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
{pkgs, nixLib, clwrapper, cl-ppcre, clx, buildLispPackage}:
|
|
||||||
buildLispPackage rec {
|
|
||||||
baseName = "stumpwm";
|
|
||||||
version = "2013-09";
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://github.com/sabetts/stumpwm";
|
|
||||||
sha256 = "0dd69myssfn2bsdx3xdp65mjrvs9x81dl3y3659pyf1avnjlir7h";
|
|
||||||
rev = "565ef58f04f59e1667ec1da4087f1a43a32cd67f";
|
|
||||||
};
|
|
||||||
description = "Tiling window manager for X11";
|
|
||||||
deps = [cl-ppcre clx];
|
|
||||||
buildInputs = with pkgs; [texinfo4 autoconf which makeWrapper];
|
|
||||||
meta = {
|
|
||||||
maintainers = [nixLib.maintainers.raskin];
|
|
||||||
platforms = nixLib.platforms.linux;
|
|
||||||
};
|
|
||||||
overrides = x: {
|
|
||||||
preConfigure = ''
|
|
||||||
${x.deployConfigScript}
|
|
||||||
export CL_SOURCE_REGISTRY="$CL_SOURCE_REGISTRY:$PWD/"
|
|
||||||
./autogen.sh
|
|
||||||
configureFlags=" --with-lisp=$NIX_LISP --with-$NIX_LISP=$(which common-lisp.sh) --with-contrib-dir=$out/lib/common-lisp/stumpwm/contrib/"
|
|
||||||
'';
|
|
||||||
installPhase = with pkgs; x.installPhase + ''
|
|
||||||
make install
|
|
||||||
|
|
||||||
if [ "$NIX_LISP" = "sbcl" ]; then
|
|
||||||
wrapProgram "$out"/bin/stumpwm --set SBCL_HOME "${clwrapper.lisp}/lib/sbcl"
|
|
||||||
fi;
|
|
||||||
|
|
||||||
mv $out/lib/common-lisp/stumpwm/contrib/stumpish $out/bin/stumpish
|
|
||||||
wrapProgram "$out"/bin/stumpish --prefix PATH : "${xlibs.xprop}/bin:${coreutils}/bin:${gnugrep}/bin:${gnused}/bin:${rlwrap}/bin:${ncurses}/bin"
|
|
||||||
'';
|
|
||||||
postInstall = ''false'';
|
|
||||||
};
|
|
||||||
}
|
|
@ -10305,7 +10305,8 @@ let
|
|||||||
|
|
||||||
stp = callPackage ../applications/science/logic/stp {};
|
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 { };
|
sublime = callPackage ../applications/editors/sublime { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user