diff --git a/nixos/modules/services/x11/window-managers/stumpwm.nix b/nixos/modules/services/x11/window-managers/stumpwm.nix index b97de030d7f6b..8262d467c53b6 100644 --- a/nixos/modules/services/x11/window-managers/stumpwm.nix +++ b/nixos/modules/services/x11/window-managers/stumpwm.nix @@ -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 ]; }; } diff --git a/pkgs/applications/window-managers/stumpwm/default.nix b/pkgs/applications/window-managers/stumpwm/default.nix new file mode 100644 index 0000000000000..be926cdc5a822 --- /dev/null +++ b/pkgs/applications/window-managers/stumpwm/default.nix @@ -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; + }; +}) diff --git a/pkgs/development/lisp-modules/packages.nix b/pkgs/development/lisp-modules/packages.nix index 801fce5447cfe..efb3e221fe05c 100644 --- a/pkgs/development/lisp-modules/packages.nix +++ b/pkgs/development/lisp-modules/packages.nix @@ -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" '' @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 13c8356e50ce1..40adafd50c320 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { });