Skip to content

Commit

Permalink
stumpwm: 22.11 -> 24.11
Browse files Browse the repository at this point in the history
Moved outside lisp-modules to a separate package, so as to re-use its
Makefile-based build-system and make a step in the direction of leaving just
development libraries in lisp-modules.
  • Loading branch information
Uthar committed Jan 9, 2025
1 parent 310cc42 commit 4e547c2
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 43 deletions.
5 changes: 3 additions & 2 deletions nixos/modules/services/x11/window-managers/stumpwm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ in
{
options = {
services.xserver.windowManager.stumpwm.enable = mkEnableOption "stumpwm";
services.xserver.windowManager.stumpwm.package = mkPackageOption pkgs "stumpwm" { };
};

config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "stumpwm";
start = ''
${pkgs.sbclPackages.stumpwm}/bin/stumpwm &
${cfg.package}/bin/stumpwm &
waitPID=$!
'';
};
environment.systemPackages = [ pkgs.sbclPackages.stumpwm ];
environment.systemPackages = [ cfg.package ];
};
}
41 changes: 41 additions & 0 deletions pkgs/applications/window-managers/stumpwm/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
stdenv,
lib,
fetchFromGitHub,
autoreconfHook,
sbcl,
texinfo,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "stumpwm";
version = "24.11";

src = fetchFromGitHub {
owner = "stumpwm";
repo = "stumpwm";
rev = "${finalAttrs.version}";
hash = "sha256-Ba2HcAmNcZvnqU0jpLTxsBe8L+4aHbO/oM4Bp/IYEC0=";
};

nativeBuildInputs = [
autoreconfHook
sbcl
texinfo
];

doCheck = true;

postConfigure = ''
export ASDF_OUTPUT_TRANSLATIONS=$(pwd):$(pwd)
'';

meta = {
description = "Tiling, keyboard driven window manager";
homepage = "https://stumpwm.github.io/";
license = lib.licenses.gpl2Plus;
mainProgram = "stumpwm";
maintainers = lib.teams.lisp.members;
platforms = lib.platforms.unix;
};
})
43 changes: 4 additions & 39 deletions pkgs/development/lisp-modules/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -190,45 +190,9 @@ let
lispLibs = super.mathkit.lispLibs ++ [ super.sb-cga ];
};

stumpwm = super.stumpwm.overrideLispAttrs (o: rec {
version = "22.11";
src = pkgs.fetchFromGitHub {
owner = "stumpwm";
repo = "stumpwm";
rev = version;
hash = "sha256-zXj17ucgyFhv7P0qEr4cYSVRPGrL1KEIofXWN2trr/M=";
};
buildScript = pkgs.writeText "build-stumpwm.lisp" ''
(load "${super.stumpwm.asdfFasl}/asdf.${super.stumpwm.faslExt}")
(asdf:load-system 'stumpwm)
;; Prevents package conflict error
(when (uiop:version<= "3.1.5" (asdf:asdf-version))
(uiop:symbol-call '#:asdf '#:register-immutable-system :stumpwm)
(dolist (system-name (uiop:symbol-call '#:asdf
'#:system-depends-on
(asdf:find-system :stumpwm)))
(uiop:symbol-call '#:asdf '#:register-immutable-system system-name)))
;; Prevents "cannot create /homeless-shelter" error
(asdf:disable-output-translations)
(sb-ext:save-lisp-and-die
"stumpwm"
:executable t
:purify t
#+sb-core-compression :compression
#+sb-core-compression t
:toplevel #'stumpwm:stumpwm)
'';
installPhase = ''
mkdir -p $out/bin
cp -v stumpwm $out/bin
'';
});

stumpwm-unwrapped = super.stumpwm;
stumpwm = super.stumpwm.overrideAttrs {
inherit (pkgs.stumpwm) src;
};

clfswm = super.clfswm.overrideAttrs (o: rec {
buildScript = pkgs.writeText "build-clfswm.lisp" ''
Expand Down Expand Up @@ -471,6 +435,7 @@ let
} // optionalAttrs pkgs.config.allowAliases {
cl-glib_dot_gio = throw "cl-glib_dot_gio was replaced by cl-gio";
cl-gtk4_dot_webkit2 = throw "cl-gtk4_dot_webkit2 was replaced by cl-gtk4_dot_webkit";
stumpwm-unwrapped = throw "stumpwm-unwrapped is now just stumpwm";
});

in packages
9 changes: 7 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15323,9 +15323,14 @@ with pkgs;

inherit (ocaml-ng.ocamlPackages) stog;

stumpwm = sbclPackages.stumpwm;
stumpwm = callPackage ../applications/window-managers/stumpwm {
stdenv = stdenvNoCC;
sbcl = sbcl.withPackages (ps: with ps; [
alexandria cl-ppcre clx fiasco
]);
};

stumpwm-unwrapped = sbclPackages.stumpwm-unwrapped;
stumpwm-unwrapped = sbclPackages.stumpwm;

sublime3Packages = recurseIntoAttrs (callPackage ../applications/editors/sublime/3/packages.nix { });

Expand Down

0 comments on commit 4e547c2

Please sign in to comment.