From c61fc1c288bd1fdf96261ba5574a12cf8f9be70b Mon Sep 17 00:00:00 2001 From: Nick Hu Date: Tue, 14 Dec 2021 18:23:07 +0000 Subject: [PATCH] xmonad: add support for v0.17.0 (#2522) --- modules/services/window-managers/xmonad.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/services/window-managers/xmonad.nix b/modules/services/window-managers/xmonad.nix index 27186376..8066bae2 100644 --- a/modules/services/window-managers/xmonad.nix +++ b/modules/services/window-managers/xmonad.nix @@ -132,7 +132,13 @@ in { # The resulting binary name depends on the arch and os # https://github.com/xmonad/xmonad/blob/56b0f850bc35200ec23f05c079eca8b0a1f90305/src/XMonad/Core.hs#L565-L572 - mv "$XMONAD_DATA_DIR/xmonad-${pkgs.stdenv.hostPlatform.system}" $out/bin/ + if [ -f "$XMONAD_DATA_DIR/xmonad-${pkgs.stdenv.hostPlatform.system}" ]; then + # xmonad 0.15.0 + mv "$XMONAD_DATA_DIR/xmonad-${pkgs.stdenv.hostPlatform.system}" $out/bin/ + else + # xmonad 0.17.0 (https://github.com/xmonad/xmonad/commit/9813e218b034009b0b6d09a70650178980e05d54) + mv "$XMONAD_CACHE_DIR/xmonad-${pkgs.stdenv.hostPlatform.system}" $out/bin/ + fi '' }/bin/xmonad-${pkgs.stdenv.hostPlatform.system}";