wmderland: init at 2020-07-17

takagiy b2485104 7b8376e5

+153
+1
nixos/tests/all-tests.nix
··· 371 371 virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {}; 372 372 wasabibackend = handleTest ./wasabibackend.nix {}; 373 373 wireguard = handleTest ./wireguard {}; 374 + wmderland = handleTest ./wmderland.nix {}; 374 375 wordpress = handleTest ./wordpress.nix {}; 375 376 xandikos = handleTest ./xandikos.nix {}; 376 377 xautolock = handleTest ./xautolock.nix {};
+54
nixos/tests/wmderland.nix
··· 1 + import ./make-test-python.nix ({ pkgs, ...} : { 2 + name = "wmderland"; 3 + meta = with pkgs.stdenv.lib.maintainers; { 4 + maintainers = [ takagiy ]; 5 + }; 6 + 7 + machine = { lib, ... }: { 8 + imports = [ ./common/x11.nix ./common/user-account.nix ]; 9 + test-support.displayManager.auto.user = "alice"; 10 + services.xserver.displayManager.defaultSession = lib.mkForce "none+wmderland"; 11 + services.xserver.windowManager.wmderland.enable = true; 12 + 13 + systemd.services.setupWmderlandConfig = { 14 + wantedBy = [ "multi-user.target" ]; 15 + before = [ "multi-user.target" ]; 16 + environment = { 17 + HOME = "/home/alice"; 18 + }; 19 + unitConfig = { 20 + type = "oneshot"; 21 + RemainAfterExit = true; 22 + user = "alice"; 23 + }; 24 + script = let 25 + config = pkgs.writeText "config" '' 26 + set $Mod = Mod1 27 + bindsym $Mod+Return exec ${pkgs.xterm}/bin/xterm -cm -pc 28 + ''; 29 + in '' 30 + mkdir -p $HOME/.config/wmderland 31 + cp ${config} $HOME/.config/wmderland/config 32 + ''; 33 + }; 34 + }; 35 + 36 + testScript = { ... }: '' 37 + with subtest("ensure x starts"): 38 + machine.wait_for_x() 39 + machine.wait_for_file("/home/alice/.Xauthority") 40 + machine.succeed("xauth merge ~alice/.Xauthority") 41 + 42 + with subtest("ensure we can open a new terminal"): 43 + machine.send_key("alt-ret") 44 + machine.wait_until_succeeds("pgrep xterm") 45 + machine.wait_for_window(r"alice.*?machine") 46 + machine.screenshot("terminal") 47 + 48 + with subtest("ensure we can communicate through ipc with wmderlandc"): 49 + # Kills the previously open xterm 50 + machine.succeed("pgrep xterm") 51 + machine.execute("DISPLAY=:0 wmderlandc kill") 52 + machine.fail("pgrep xterm") 53 + ''; 54 + })
+13
pkgs/applications/window-managers/wmderland/0001-remove-flto.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index 17a4944..33406f3 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -10,7 +10,7 @@ include(BuildType) 6 + # Request C++14 standard, using new CMake variables. 7 + set(CMAKE_CXX_STANDARD 14) 8 + set(CMAKE_CXX_STANDARD_REQUIRED True) 9 + -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto -Wall") 10 + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") 11 + 12 + # If the BuildType is Debug, then add -rdynamic. 13 + # (used to print stacktrace with function names)
+49
pkgs/applications/window-managers/wmderland/default.nix
··· 1 + { lib, stdenv, fetchFromGitHub, cmake, libnotify, libX11, xorgproto, nixosTests }: 2 + 3 + stdenv.mkDerivation { 4 + pname = "wmderland"; 5 + version = "unstable-2020-07-17"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "aesophor"; 9 + repo = "wmderland"; 10 + rev = "a40a3505dd735b401d937203ab6d8d1978307d72"; 11 + sha256 = "0npmlnybblp82mfpinjbz7dhwqgpdqc1s63wc1zs8mlcs19pdh98"; 12 + }; 13 + 14 + nativeBuildInputs = [ 15 + cmake 16 + ]; 17 + 18 + cmakeBuildType = "MinSizeRel"; 19 + 20 + patches = [ ./0001-remove-flto.patch ]; 21 + 22 + postPatch = '' 23 + substituteInPlace src/util.cc \ 24 + --replace "notify-send" "${libnotify}/bin/notify-send" 25 + ''; 26 + 27 + buildInputs = [ 28 + libX11 29 + xorgproto 30 + ]; 31 + 32 + postInstall = '' 33 + install -Dm0644 -t $out/share/wmderland/contrib $src/example/config 34 + install -Dm0644 -t $out/share/xsessions $src/example/wmderland.desktop 35 + ''; 36 + 37 + passthru = { 38 + tests.basic = nixosTests.wmderland; 39 + providedSessions = [ "wmderland" ]; 40 + }; 41 + 42 + meta = with lib; { 43 + description = "Modern and minimal X11 tiling window manager"; 44 + homepage = "https://github.com/aesophor/wmderland"; 45 + license = licenses.mit; 46 + platforms = libX11.meta.platforms; 47 + maintainers = with maintainers; [ takagiy ]; 48 + }; 49 + }
+32
pkgs/applications/window-managers/wmderlandc/default.nix
··· 1 + { lib, stdenv, fetchFromGitHub, cmake, libX11, xorgproto }: 2 + 3 + stdenv.mkDerivation { 4 + pname = "wmderlandc"; 5 + version = "unstable-2020-07-17"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "aesophor"; 9 + repo = "wmderland"; 10 + rev = "a40a3505dd735b401d937203ab6d8d1978307d72"; 11 + sha256 = "0npmlnybblp82mfpinjbz7dhwqgpdqc1s63wc1zs8mlcs19pdh98"; 12 + }; 13 + 14 + sourceRoot = "source/ipc-client"; 15 + 16 + nativeBuildInputs = [ 17 + cmake 18 + ]; 19 + 20 + buildInputs = [ 21 + libX11 22 + xorgproto 23 + ]; 24 + 25 + meta = with lib; { 26 + description = "A tiny program to interact with wmderland"; 27 + homepage = "https://github.com/aesophor/wmderland/tree/master/ipc-client"; 28 + license = licenses.mit; 29 + platforms = platforms.all; 30 + maintainers = with maintainers; [ takagiy ]; 31 + }; 32 + }
+4
pkgs/top-level/all-packages.nix
··· 24191 24191 24192 24192 wmctrl = callPackage ../tools/X11/wmctrl { }; 24193 24193 24194 + wmderland = callPackage ../applications/window-managers/wmderland { }; 24195 + 24196 + wmderlandc = callPackage ../applications/window-managers/wmderlandc { }; 24197 + 24194 24198 wmii_hg = callPackage ../applications/window-managers/wmii-hg { }; 24195 24199 24196 24200 wofi = callPackage ../applications/misc/wofi { };