about summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2023-01-22 13:21:52 +0100
committersternenseemann <sternenseemann@systemli.org>2023-02-05 14:01:25 +0100
commit902701c0cfe4727dd21a457cbece7dfd7f859a48 (patch)
tree746419ad488a425c4aa6297c45cd0044a166fd62 /pkgs/development/compilers/ghc
parent5318038186d0a83371d66ecfcc5732b109d2f2c8 (diff)
downloadnixlib-902701c0cfe4727dd21a457cbece7dfd7f859a48.tar
nixlib-902701c0cfe4727dd21a457cbece7dfd7f859a48.tar.gz
nixlib-902701c0cfe4727dd21a457cbece7dfd7f859a48.tar.bz2
nixlib-902701c0cfe4727dd21a457cbece7dfd7f859a48.tar.lz
nixlib-902701c0cfe4727dd21a457cbece7dfd7f859a48.tar.xz
nixlib-902701c0cfe4727dd21a457cbece7dfd7f859a48.tar.zst
nixlib-902701c0cfe4727dd21a457cbece7dfd7f859a48.zip
haskell.compiler.ghc924Binary: tag bindists built using hadrian
`ghc ? hadrian` can be used to check if a GHC was built using hadrian.
This is often relevant since hadrian changed the ghc libdir location, so
we need to install libs to a different location as well.
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r--pkgs/development/compilers/ghc/9.2.4-binary.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/9.2.4-binary.nix b/pkgs/development/compilers/ghc/9.2.4-binary.nix
index 57e0db560a98..79b006ce5537 100644
--- a/pkgs/development/compilers/ghc/9.2.4-binary.nix
+++ b/pkgs/development/compilers/ghc/9.2.4-binary.nix
@@ -94,6 +94,7 @@ let
           { nixPackage = ncurses6; fileToCheckFor = null; }
           { nixPackage = libiconv; fileToCheckFor = null; }
         ];
+        isHadrian = true;
       };
       aarch64-darwin = {
         variantSuffix = "";
@@ -107,6 +108,7 @@ let
           { nixPackage = ncurses6; fileToCheckFor = null; }
           { nixPackage = libiconv; fileToCheckFor = null; }
         ];
+        isHadrian = true;
       };
     };
     # Binary distributions for the musl libc for the respective system.
@@ -118,6 +120,7 @@ let
           sha256 = "026348947d30a156b84de5d6afeaa48fdcb2795b47954cd8341db00d3263a481";
         };
         isStatic = true;
+        isHadrian = true;
         # We can't check the RPATH for statically linked executable
         exePathForLibraryCheck = null;
         archSpecificLibraries = [
@@ -400,6 +403,13 @@ stdenv.mkDerivation rec {
 
     # Our Cabal compiler name
     haskellCompilerName = "ghc-${version}";
+  } // lib.optionalAttrs (binDistUsed.isHadrian or false) {
+    # Normal GHC derivations expose the hadrian derivation used to build them
+    # here. In the case of bindists we just make sure that the attribute exists,
+    # as it is used for checking if a GHC derivation has been built with hadrian.
+    # The isHadrian mechanism will become obsolete with GHCs that use hadrian
+    # exclusively, i.e. 9.6 (and 9.4?).
+    hadrian = null;
   };
 
   meta = rec {