about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2022-08-02 11:33:47 +0200
committersternenseemann <sternenseemann@systemli.org>2022-08-04 14:29:05 +0200
commit531ff521d42a8c0473cb997855b6e2ad542d5978 (patch)
treec114068692e4c5c7aa0a480a2b23fe6984050610 /nixos
parent1a5602e833039c241a8045d8f850ee1d7ff3a6c7 (diff)
nixos/xmonad: rename NIX_GHC env var to XMONAD_GHC
Upstream XMonad was using our xmonad patch file for their flake build to
support our nixos module. This would of course break the build upstream
if the version we patched and their master branch diverged. We
[discussed] that it'd make sense to upstream the environment var code.
In the process it seemed sensible to rename the NIX_GHC variable as
well, since it isn't really Nix-specific – it's just a way to set the
GHC binary to execute. This change has been [implemented] upstream in an
unreleased version of xmonad now – meaning we'll be able to drop the
xmonad patch soon!

This also clarifies the situation in nixpkgs a bit: NIX_GHC is easy to
confuse with the environment variable used in the ghcWithPackages
wrapper where it is used to set an alternative prefix for a GHC-wrapper
for applications trying to discover it via e.g. ghc-paths. It is an
implementation detail in this context, as it is in the case of the
xmonad module. Since they are different implementations doing different
things, different names also make sense.

[discussed]: https://github.com/NixOS/nixpkgs/commit/36d5761b3e5aca9742fec85107e3d308a9af872c
[implemented]: https://github.com/xmonad/xmonad/commit/23f36d7e230a5dca36fd869ef904abbe1fc168c3
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/x11/window-managers/xmonad.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/window-managers/xmonad.nix b/nixos/modules/services/x11/window-managers/xmonad.nix
index 476621bad778c..df8577b310397 100644
--- a/nixos/modules/services/x11/window-managers/xmonad.nix
+++ b/nixos/modules/services/x11/window-managers/xmonad.nix
@@ -30,7 +30,7 @@ let
         install -D ${xmonadEnv}/share/man/man1/xmonad.1.gz $out/share/man/man1/xmonad.1.gz
         makeWrapper ${configured}/bin/xmonad $out/bin/xmonad \
       '' + optionalString cfg.enableConfiguredRecompile ''
-          --set NIX_GHC "${xmonadEnv}/bin/ghc" \
+          --set XMONAD_GHC "${xmonadEnv}/bin/ghc" \
       '' + ''
           --set XMONAD_XMESSAGE "${pkgs.xorg.xmessage}/bin/xmessage"
       '');