From 1c2c0b2eb8ead11d06bd840e9a1d6b4d1f86d49e Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Wed, 13 May 2020 01:26:41 -0300 Subject: [PATCH] lwm: init at 1.2.4 lwm is a lightweight window manager --- .../services/x11/window-managers/default.nix | 1 + .../services/x11/window-managers/lwm.nix | 25 +++++++++++ .../window-managers/lwm/default.nix | 45 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 4 files changed, 73 insertions(+) create mode 100644 nixos/modules/services/x11/window-managers/lwm.nix create mode 100644 pkgs/applications/window-managers/lwm/default.nix diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix index c8af8fdc29a..87702c58727 100644 --- a/nixos/modules/services/x11/window-managers/default.nix +++ b/nixos/modules/services/x11/window-managers/default.nix @@ -22,6 +22,7 @@ in ./i3.nix ./jwm.nix ./leftwm.nix + ./lwm.nix ./metacity.nix ./mwm.nix ./openbox.nix diff --git a/nixos/modules/services/x11/window-managers/lwm.nix b/nixos/modules/services/x11/window-managers/lwm.nix new file mode 100644 index 00000000000..e2aa062fd13 --- /dev/null +++ b/nixos/modules/services/x11/window-managers/lwm.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.xserver.windowManager.lwm; +in +{ + ###### interface + options = { + services.xserver.windowManager.lwm.enable = mkEnableOption "lwm"; + }; + + ###### implementation + config = mkIf cfg.enable { + services.xserver.windowManager.session = singleton { + name = "lwm"; + start = '' + ${pkgs.lwm}/bin/lwm & + waitPID=$! + ''; + }; + environment.systemPackages = [ pkgs.lwm ]; + }; +} diff --git a/pkgs/applications/window-managers/lwm/default.nix b/pkgs/applications/window-managers/lwm/default.nix new file mode 100644 index 00000000000..49cdc81b9ce --- /dev/null +++ b/pkgs/applications/window-managers/lwm/default.nix @@ -0,0 +1,45 @@ +{ stdenv, fetchurl +, imake, libX11, libSM, libXext, libICE }: + +stdenv.mkDerivation rec { + pname = "lwm"; + version = "1.2.4"; + + src = fetchurl { + url = "http://www.jfc.org.uk/files/lwm/${pname}-${version}.tar.gz"; + sha256 = "1bcdr173f0gl61fyl43p3gr145angci7lvjqb8rl00y9f9amvh3y"; + }; + + nativeBuildInputs = [ imake ]; + + buildInputs = [ libX11 libSM libXext libICE ]; + + dontConfigure = true; + + preBuild = '' + sed -i 's|^LOCAL_LIBRARIES.*|& $(ICELIB)|' Imakefile + xmkmf + ''; + + installPhase = '' + install -dm755 $out/bin $out/share/man/man1 + install -m755 lwm $out/bin/lwm + install -m644 lwm.man $out/share/man/man1/lwm.1 + ''; + + meta = with stdenv.lib; { + description = "Lightweight Window Manager"; + longDescription = '' + lwm is a window manager for X that tries to keep out of your face. There + are no icons, no button bars, no icon docks, no root menus, no nothing: if + you want all that, then other programs can provide it. There's no + configurability either: if you want that, you want a different window + manager; one that helps your operating system in its evil conquest of your + disc space and its annexation of your physical memory. + ''; + homepage = "http://www.jfc.org.uk/software/lwm.html"; + license = licenses.gpl2; + maintainers = [ maintainers.AndersonTorres ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cdd7d348e49..ef1fe6ead6e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19978,6 +19978,8 @@ in leftwm = callPackage ../applications/window-managers/leftwm { }; + lwm = callPackage ../applications/window-managers/lwm { }; + musikcube = callPackage ../applications/audio/musikcube {}; pinboard-notes-backup = haskell.lib.overrideCabal