about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/patches
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 /pkgs/development/haskell-modules/patches
parent1a5602e833039c241a8045d8f850ee1d7ff3a6c7 (diff)
downloadnixlib-531ff521d42a8c0473cb997855b6e2ad542d5978.tar
nixlib-531ff521d42a8c0473cb997855b6e2ad542d5978.tar.gz
nixlib-531ff521d42a8c0473cb997855b6e2ad542d5978.tar.bz2
nixlib-531ff521d42a8c0473cb997855b6e2ad542d5978.tar.lz
nixlib-531ff521d42a8c0473cb997855b6e2ad542d5978.tar.xz
nixlib-531ff521d42a8c0473cb997855b6e2ad542d5978.tar.zst
nixlib-531ff521d42a8c0473cb997855b6e2ad542d5978.zip
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 'pkgs/development/haskell-modules/patches')
-rw-r--r--pkgs/development/haskell-modules/patches/xmonad_0_17_0-nix.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/patches/xmonad_0_17_0-nix.patch b/pkgs/development/haskell-modules/patches/xmonad_0_17_0-nix.patch
index e313aed69063..4288b7021715 100644
--- a/pkgs/development/haskell-modules/patches/xmonad_0_17_0-nix.patch
+++ b/pkgs/development/haskell-modules/patches/xmonad_0_17_0-nix.patch
@@ -27,7 +27,7 @@ index 46a0939..92af53d 100644
 -                CompileGhc ->
 -                    run "ghc" ghcArgs
 +                CompileGhc -> do
-+                    ghc <- fromMaybe "ghc" <$> (lookupEnv "NIX_GHC")
++                    ghc <- fromMaybe "ghc" <$> (lookupEnv "XMONAD_GHC")
 +                    run ghc ghcArgs
                  CompileStackGhc stackYaml ->
                      run "stack" ["build", "--silent", "--stack-yaml", stackYaml] .&&.