diff --git a/modules/services/window-managers/xmonad.nix b/modules/services/window-managers/xmonad.nix index a266e989c..9c5efa64e 100644 --- a/modules/services/window-managers/xmonad.nix +++ b/modules/services/window-managers/xmonad.nix @@ -111,6 +111,12 @@ in config = let + # GHC sets OS_ARCH to arm in case of armv7l, need to coerce + executableSystemSuffix = + if pkgs.stdenv.hostPlatform.isArmv7 then + "arm-${lib.toLower pkgs.stdenv.hostPlatform.uname.system}" + else + pkgs.stdenv.hostPlatform.system; xmonadBin = "${ pkgs.runCommandLocal "xmonad-compile" @@ -141,15 +147,15 @@ in # The resulting binary name depends on the arch and os # https://github.com/xmonad/xmonad/blob/56b0f850bc35200ec23f05c079eca8b0a1f90305/src/XMonad/Core.hs#L565-L572 - if [ -f "$XMONAD_DATA_DIR/xmonad-${pkgs.stdenv.hostPlatform.system}" ]; then + if [ -f "$XMONAD_DATA_DIR/xmonad-${executableSystemSuffix}" ]; then # xmonad 0.15.0 - mv "$XMONAD_DATA_DIR/xmonad-${pkgs.stdenv.hostPlatform.system}" $out/bin/ + mv "$XMONAD_DATA_DIR/xmonad-${executableSystemSuffix}" $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/ + mv "$XMONAD_CACHE_DIR/xmonad-${executableSystemSuffix}" $out/bin/ fi '' - }/bin/xmonad-${pkgs.stdenv.hostPlatform.system}"; + }/bin/xmonad-${executableSystemSuffix}"; in mkIf cfg.enable (mkMerge [