From 531ff521d42a8c0473cb997855b6e2ad542d5978 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 2 Aug 2022 11:33:47 +0200 Subject: nixos/xmonad: rename NIX_GHC env var to XMONAD_GHC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pkgs/development/haskell-modules/patches/xmonad_0_17_0-nix.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/development/haskell-modules/patches') 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] .&&. -- cgit 1.4.1