Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stumpwm: 22.11 -> 24.11 + moved outside lisp-modules #372466

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
};
})
44 changes: 6 additions & 38 deletions pkgs/development/lisp-modules/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -190,45 +190,12 @@ 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=";
stumpwm = super.stumpwm.overrideAttrs {
inherit (pkgs.stumpwm) src version;
meta = {
inherit (pkgs.stumpwm.meta) description license homepage;
};
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;
};

clfswm = super.clfswm.overrideAttrs (o: rec {
buildScript = pkgs.writeText "build-clfswm.lisp" ''
Expand Down Expand Up @@ -471,6 +438,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