on iko/ghcjs-patch-master help sign in
Enable debug info on linux targets (#1050)
bab2eaeHamish Mackenzie
builder/comp-builder.nix+16−5
@@ -1,4 +1,4 @@
1−{ pkgs, stdenv, buildPackages, ghc, lib, gobject-introspection ? null, haskellLib, makeConfigFiles, haddockBuilder, ghcForComponent, hsPkgs, compiler, runCommand, libffi, gmp, zlib, ncurses, numactl, nodejs }:
1+{ pkgs, stdenv, buildPackages, ghc, lib, gobject-introspection ? null, haskellLib, makeConfigFiles, haddockBuilder, ghcForComponent, hsPkgs, compiler, runCommand, libffi, gmp, zlib, ncurses, numactl, nodejs }@defaults:
2lib.makeOverridable (
2lib.makeOverridable (
3let self =
3let self =
4{ componentId
4{ componentId
@@ -77,6 +77,16 @@ let self =
77}@drvArgs:
77}@drvArgs:
78
78
79let
79let
80+ # Ignore attempts to include DWARF info when it is not possible
81+ enableDWARF = drvArgs.enableDWARF or false
82+ && stdenv.hostPlatform.isLinux
83+ && !haskellLib.isCrossHost
84+ && !stdenv.hostPlatform.isMusl
85+ && builtins.compareVersions defaults.ghc.version "8.10.2" >= 0;
86+
87+ ghc = if enableDWARF then defaults.ghc.dwarf else defaults.ghc;
88+ setup = if enableDWARF then drvArgs.setup.dwarf else drvArgs.setup;
89+
80 # TODO fix cabal wildcard support so hpack wildcards can be mapped to cabal wildcards
90 # TODO fix cabal wildcard support so hpack wildcards can be mapped to cabal wildcards
81 canCleanSource = !(cabal-generator == "hpack" && !(package.cleanHpack or false));
91 canCleanSource = !(cabal-generator == "hpack" && !(package.cleanHpack or false));
82 # In order to support relative references to other packages we need to use
92 # In order to support relative references to other packages we need to use
@@ -109,7 +119,7 @@ let
109
119
110 configFiles = makeConfigFiles {
120 configFiles = makeConfigFiles {
111 inherit (package) identifier;
121 inherit (package) identifier;
112− inherit component fullName flags needsProfiling;
122+ inherit component fullName flags needsProfiling enableDWARF;
113 };
123 };
114
124
115 enableFeature = enable: feature:
125 enableFeature = enable: feature:
@@ -178,7 +188,7 @@ let
178 ++ (ghc.extraConfigureFlags or [])
188 ++ (ghc.extraConfigureFlags or [])
179 ++ lib.optional enableDebugRTS "--ghc-option=-debug"
189 ++ lib.optional enableDebugRTS "--ghc-option=-debug"
180 ++ lib.optional enableTSanRTS "--ghc-option=-tsan"
190 ++ lib.optional enableTSanRTS "--ghc-option=-tsan"
181− ++ lib.optional enableDWARF "--ghc-option=-g"
191+ ++ lib.optional enableDWARF "--ghc-option=-g3"
182 ++ lib.optionals useLLVM [
192 ++ lib.optionals useLLVM [
183 "--ghc-option=-fPIC" "--gcc-option=-fPIC"
193 "--ghc-option=-fPIC" "--gcc-option=-fPIC"
184 ]
194 ]
@@ -195,7 +205,7 @@ let
195 # work in the nix-shell. See ../doc/removing-with-package-wrapper.md.
205 # work in the nix-shell. See ../doc/removing-with-package-wrapper.md.
196 shellWrappers = ghcForComponent {
206 shellWrappers = ghcForComponent {
197 componentName = fullName;
207 componentName = fullName;
198− inherit configFiles;
208+ inherit configFiles enableDWARF;
199 };
209 };
200
210
201 # In order to let shell hooks make package-specific things like Hoogle databases
211 # In order to let shell hooks make package-specific things like Hoogle databases
@@ -280,10 +290,11 @@ let
280 config = component;
290 config = component;
281 srcSubDir = cleanSrc.subDir;
291 srcSubDir = cleanSrc.subDir;
282 srcSubDirPath = cleanSrc.root + cleanSrc.subDir;
292 srcSubDirPath = cleanSrc.root + cleanSrc.subDir;
283− inherit configFiles executableToolDepends exeName;
293+ inherit configFiles executableToolDepends exeName enableDWARF;
284 exePath = drv + "/bin/${exeName}";
294 exePath = drv + "/bin/${exeName}";
285 env = shellWrappers;
295 env = shellWrappers;
286 profiled = self (drvArgs // { enableLibraryProfiling = true; });
296 profiled = self (drvArgs // { enableLibraryProfiling = true; });
297+ dwarf = self (drvArgs // { enableDWARF = true; });
287 } // lib.optionalAttrs (haskellLib.isLibrary componentId) ({
298 } // lib.optionalAttrs (haskellLib.isLibrary componentId) ({
288 inherit haddock;
299 inherit haddock;
289 inherit (haddock) haddockDir; # This is null if `doHaddock = false`
300 inherit (haddock) haddockDir; # This is null if `doHaddock = false`
builder/ghc-for-component-wrapper.nix+4−1
@@ -7,14 +7,17 @@
7# database.
7# database.
8
8
9{ lib, stdenv, ghc, runCommand, lndir, makeWrapper, haskellLib
9{ lib, stdenv, ghc, runCommand, lndir, makeWrapper, haskellLib
10−}:
10+}@defaults:
11
11
12{ componentName # Full derivation name of the component
12{ componentName # Full derivation name of the component
13, configFiles # The component's "config" derivation
13, configFiles # The component's "config" derivation
14, postInstall ? ""
14, postInstall ? ""
15+, enableDWARF
15}:
16}:
16
17
17let
18let
19+ ghc = if enableDWARF then defaults.ghc.dwarf else defaults.ghc;
20+
18 inherit (configFiles) targetPrefix ghcCommand ghcCommandCaps packageCfgDir;
21 inherit (configFiles) targetPrefix ghcCommand ghcCommandCaps packageCfgDir;
19 libDir = "$out/${configFiles.libDir}";
22 libDir = "$out/${configFiles.libDir}";
20 docDir = "$out/share/doc/ghc/html";
23 docDir = "$out/share/doc/ghc/html";
builder/haddock-builder.nix+1
@@ -54,6 +54,7 @@ let
54 shellWrappers = ghcForComponent {
54 shellWrappers = ghcForComponent {
55 componentName = fullName;
55 componentName = fullName;
56 configFiles = docsConfigFiles;
56 configFiles = docsConfigFiles;
57+ inherit (componentDrv) enableDWARF;
57 };
58 };
58
59
59 drv = stdenv.mkDerivation (commonAttrs // {
60 drv = stdenv.mkDerivation (commonAttrs // {
builder/make-config-files.nix+7−4
@@ -1,8 +1,10 @@
1−{ stdenv, lib, haskellLib, ghc, nonReinstallablePkgs, runCommand, writeText, writeScript }:
1+{ stdenv, lib, haskellLib, ghc, nonReinstallablePkgs, runCommand, writeText, writeScript }@defaults:
2
2
3−{ identifier, component, fullName, flags ? {}, needsProfiling ? false, chooseDrv ? drv: drv }:
3+{ identifier, component, fullName, flags ? {}, needsProfiling ? false, enableDWARF ? false, chooseDrv ? drv: drv }:
4
4
5let
5let
6+ ghc = if enableDWARF then defaults.ghc.dwarf else defaults.ghc;
7+
6 flagsAndConfig = field: xs: lib.optionalString (xs != []) ''
8 flagsAndConfig = field: xs: lib.optionalString (xs != []) ''
7 echo ${lib.concatStringsSep " " (map (x: "--${field}=${x}") xs)} >> $out/configure-flags
9 echo ${lib.concatStringsSep " " (map (x: "--${field}=${x}") xs)} >> $out/configure-flags
8 echo "${field}: ${lib.concatStringsSep " " xs}" >> $out/cabal.config
10 echo "${field}: ${lib.concatStringsSep " " xs}" >> $out/cabal.config
@@ -47,9 +49,10 @@ let
47 # TODO investigate why this is needed
49 # TODO investigate why this is needed
48 # TODO find out why p ? configFiles helps (for instance for `R1909.aarch64-unknown-linux-gnu.tests.cabal-22.run.x86_64-linux`)
50 # TODO find out why p ? configFiles helps (for instance for `R1909.aarch64-unknown-linux-gnu.tests.cabal-22.run.x86_64-linux`)
49 libDeps = map chooseDrv (
51 libDeps = map chooseDrv (
52+ (if enableDWARF then (x: map (p: p.dwarf or p) x) else x: x)
50− (if needsProfiling then (x: map (p: p.profiled or p) x) else x: x)
53+ ((if needsProfiling then (x: map (p: p.profiled or p) x) else x: x)
51 (lib.filter (p: (p ? configFiles) && p.configFiles.targetPrefix == ghc.targetPrefix)
54 (lib.filter (p: (p ? configFiles) && p.configFiles.targetPrefix == ghc.targetPrefix)
52− (map getLibComponent component.depends))
55+ (map getLibComponent component.depends)))
53 );
56 );
54 cfgFiles =
57 cfgFiles =
55 let xs = map
58 let xs = map
builder/setup-builder.nix+6−4
@@ -1,12 +1,13 @@
1{ pkgs, stdenv, lib, buildPackages, haskellLib, ghc, nonReinstallablePkgs, hsPkgs, makeSetupConfigFiles, pkgconfig }:
1{ pkgs, stdenv, lib, buildPackages, haskellLib, ghc, nonReinstallablePkgs, hsPkgs, makeSetupConfigFiles, pkgconfig }:
2
2
3+let self =
3−{ component, package, name, src, flags ? {}, revision ? null, patches ? [], defaultSetupSrc
4+{ component, package, name, src, enableDWARF ? false, flags ? {}, revision ? null, patches ? [], defaultSetupSrc
4, preUnpack ? component.preUnpack, postUnpack ? component.postUnpack
5, preUnpack ? component.preUnpack, postUnpack ? component.postUnpack
5, prePatch ? null, postPatch ? null
6, prePatch ? null, postPatch ? null
6, preBuild ? component.preBuild , postBuild ? component.postBuild
7, preBuild ? component.preBuild , postBuild ? component.postBuild
7, preInstall ? component.preInstall , postInstall ? component.postInstall
8, preInstall ? component.preInstall , postInstall ? component.postInstall
8, cleanSrc ? haskellLib.cleanCabalComponent package component "setup" src
9, cleanSrc ? haskellLib.cleanCabalComponent package component "setup" src
9−}:
10+}@drvArgs:
10
11
11let
12let
12 cleanSrc' = haskellLib.rootAndSubDir cleanSrc;
13 cleanSrc' = haskellLib.rootAndSubDir cleanSrc;
@@ -17,7 +18,7 @@ let
17
18
18 configFiles = makeSetupConfigFiles {
19 configFiles = makeSetupConfigFiles {
19 inherit (package) identifier;
20 inherit (package) identifier;
20− inherit fullName flags component;
21+ inherit fullName flags component enableDWARF;
21 };
22 };
22 hooks = haskellLib.optionalHooks {
23 hooks = haskellLib.optionalHooks {
23 inherit
24 inherit
@@ -50,6 +51,7 @@ let
50 srcSubDirPath = cleanSrc'.root + cleanSrc'.subDir;
51 srcSubDirPath = cleanSrc'.root + cleanSrc'.subDir;
51 cleanSrc = cleanSrc';
52 cleanSrc = cleanSrc';
52 inherit configFiles;
53 inherit configFiles;
54+ dwarf = self (drvArgs // { enableDWARF = true; });
53 };
55 };
54
56
55 meta = {
57 meta = {
@@ -94,4 +96,4 @@ let
94 // (lib.optionalAttrs (patches != []) { patches = map (p: if builtins.isFunction p then p { inherit (package.identifier) version; inherit revision; } else p) patches; })
96 // (lib.optionalAttrs (patches != []) { patches = map (p: if builtins.isFunction p then p { inherit (package.identifier) version; inherit revision; } else p) patches; })
95 // hooks
97 // hooks
96 );
98 );
97−in drv
99+in drv; in self
builder/shell-for.nix+2
@@ -16,6 +16,7 @@
16, exactDeps ? false
16, exactDeps ? false
17, tools ? {}
17, tools ? {}
18, packageSetupDeps ? true
18, packageSetupDeps ? true
19+, enableDWARF ? false
19, ... } @ args:
20, ... } @ args:
20
21
21let
22let
@@ -93,6 +94,7 @@ let
93 postInstall = lib.optionalString withHoogle' ''
94 postInstall = lib.optionalString withHoogle' ''
94 ln -s ${hoogleIndex}/bin/hoogle $out/bin
95 ln -s ${hoogleIndex}/bin/hoogle $out/bin
95 '';
96 '';
97+ inherit enableDWARF;
96 };
98 };
97
99
98 hoogleIndex = let
100 hoogleIndex = let
changelog.md+6
@@ -1,6 +1,12 @@
1This file contains a summary of changes to Haskell.nix and `nix-tools`
1This file contains a summary of changes to Haskell.nix and `nix-tools`
2that will impact users.
2that will impact users.
3
3
4+## Feb 22, 2021
5+* Add `.debug` to build any component with DWARF dugug info on linux
6+ (ghc >=8.10.2).
7+* Pass `enableDWARF` to `shellFor` for to get a shell where all the
8+ components are the `.debug` ones.
9+
4## Feb 18, 2021
10## Feb 18, 2021
5* `ghcOptions` has been moved from package and is now a list of strings.
11* `ghcOptions` has been moved from package and is now a list of strings.
6 old: packages.x.package.ghcOptions = "someGHCoption";
12 old: packages.x.package.ghcOptions = "someGHCoption";
compiler/ghc/configured-src.nix+6−1
@@ -9,6 +9,7 @@
9, useLLVM, llvmPackages
9, useLLVM, llvmPackages
10, targetCC
10, targetCC
11, enableIntegerSimple, targetGmp
11, enableIntegerSimple, targetGmp
12+, enableDWARF, elfutils
12, ncurses, targetLibffi, libiconv
13, ncurses, targetLibffi, libiconv
13, disableLargeAddressSpace
14, disableLargeAddressSpace
14, buildMK
15, buildMK
@@ -112,7 +113,11 @@ stdenv.mkDerivation (rec {
112 "CFLAGS=-fuse-ld=gold"
113 "CFLAGS=-fuse-ld=gold"
113 "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
114 "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
114 "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
115 "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
116+ ] ++ lib.optionals enableDWARF [
117+ "--enable-dwarf-unwind"
118+ "--with-libdw-includes=${lib.getDev elfutils}/include"
119+ "--with-libdw-libraries=${lib.getLib elfutils}/lib"
115− ] ;
120+ ];
116
121
117 outputs = [ "out" ];
122 outputs = [ "out" ];
118 phases = [ "unpackPhase" "patchPhase" ]
123 phases = [ "unpackPhase" "patchPhase" ]
compiler/ghc/default.nix+17−3
@@ -3,11 +3,12 @@
3# haskell.nix ships its own version of the ghc expression as it needs more
3# haskell.nix ships its own version of the ghc expression as it needs more
4# control over the expression to isolate it against varying <nixpkgs> and
4# control over the expression to isolate it against varying <nixpkgs> and
5# allow us to customize it to the way haskell.nix works.
5# allow us to customize it to the way haskell.nix works.
6+let self =
6{ stdenv, lib, haskell-nix, targetPackages
7{ stdenv, lib, haskell-nix, targetPackages
7
8
8# build-tools
9# build-tools
9, bootPkgs
10, bootPkgs
10−, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx, numactl
11+, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx, numactl, elfutils
11, autoreconfHook
12, autoreconfHook
12, bash
13, bash
13
14
@@ -37,6 +38,8 @@
37
38
38, enableLibraryProfiling ? true
39, enableLibraryProfiling ? true
39
40
41+, enableDWARF ? false
42+
40, # Whether to build terminfo. Musl fails to build terminfo as ncurses seems to be linked to glibc
43, # Whether to build terminfo. Musl fails to build terminfo as ncurses seems to be linked to glibc
41 enableTerminfo ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.isMusl
44 enableTerminfo ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.isMusl
42
45
@@ -59,7 +62,7 @@
59
62
60# extra values we want to have available as passthru values.
63# extra values we want to have available as passthru values.
61, extra-passthru ? {}
64, extra-passthru ? {}
62−}:
65+}@args:
63
66
64assert !enableIntegerSimple -> gmp != null;
67assert !enableIntegerSimple -> gmp != null;
65
68
@@ -103,6 +106,9 @@ let
103 '' + lib.optionalString enableRelocatedStaticLibs ''
106 '' + lib.optionalString enableRelocatedStaticLibs ''
104 GhcLibHcOpts += -fPIC
107 GhcLibHcOpts += -fPIC
105 GhcRtsHcOpts += -fPIC
108 GhcRtsHcOpts += -fPIC
109+ '' + lib.optionalString enableDWARF ''
110+ GhcLibHcOpts += -g3
111+ GhcRtsHcOpts += -g3
106 '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
112 '' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
107 EXTRA_CC_OPTS += -std=gnu99
113 EXTRA_CC_OPTS += -std=gnu99
108 '' + lib.optionalString (!enableTerminfo) ''
114 '' + lib.optionalString (!enableTerminfo) ''
@@ -149,6 +155,7 @@ let
149 useLLVM llvmPackages
155 useLLVM llvmPackages
150 targetCC
156 targetCC
151 enableIntegerSimple targetGmp
157 enableIntegerSimple targetGmp
158+ enableDWARF elfutils
152 ncurses targetLibffi libiconv
159 ncurses targetLibffi libiconv
153 disableLargeAddressSpace
160 disableLargeAddressSpace
154 buildMK
161 buildMK
@@ -315,6 +322,12 @@ stdenv.mkDerivation (rec {
315
322
316 # Used to detect non haskell-nix compilers (accidental use of nixpkgs compilers can lead to unexpected errors)
323 # Used to detect non haskell-nix compilers (accidental use of nixpkgs compilers can lead to unexpected errors)
317 isHaskellNixCompiler = true;
324 isHaskellNixCompiler = true;
325+
326+ # The same GHC, but with debug enabled (if it can be)
327+ dwarf = lib.makeOverridable self (args // {
328+ enableDWARF = stdenv.targetPlatform.isLinux
329+ && builtins.compareVersions ghc-version "8.10.2" >= 0;
330+ });
318 } // extra-passthru;
331 } // extra-passthru;
319
332
320 meta = {
333 meta = {
@@ -328,4 +341,5 @@ stdenv.mkDerivation (rec {
328 dontStrip = true;
341 dontStrip = true;
329 dontPatchELF = true;
342 dontPatchELF = true;
330 noAuditTmpdir = true;
343 noAuditTmpdir = true;
331−})
344+});
345+in self
overlays/ghc.nix+3−1
@@ -21,7 +21,9 @@ final: prev: with prev;
21 && !lib.hasPrefix "ghcjs" name
21 && !lib.hasPrefix "ghcjs" name
22 && !lib.hasSuffix "Binary" name;
22 && !lib.hasSuffix "Binary" name;
23 overrideCompiler = compiler:
23 overrideCompiler = compiler:
24− (compiler.override ghcPkgOverrides).overrideAttrs ghcDrvOverrides;
24+ ((compiler.override ghcPkgOverrides).overrideAttrs ghcDrvOverrides) // {
25+ dwarf = overrideCompiler compiler.dwarf;
26+ };
25 in
27 in
26 lib.recursiveUpdate prev.haskell-nix {
28 lib.recursiveUpdate prev.haskell-nix {
27 compiler = lib.mapAttrs (_name: overrideCompiler)
29 compiler = lib.mapAttrs (_name: overrideCompiler)
test/cabal-simple-debug/Main.hsnew file+4
@@ -0,0 +1,4 @@
1+module Main where
2+
3+main :: IO ()
4+main = putStrLn "Hello, Haskell!"
test/cabal-simple-debug/Setup.hsnew file+2
@@ -0,0 +1,2 @@
1+import Distribution.Simple
2+main = defaultMain
test/cabal-simple-debug/cabal-simple.cabalnew file+37
@@ -0,0 +1,37 @@
1+cabal-version: >=1.10
2+-- Initial package description 'cabal-simple.cabal' generated by 'cabal
3+-- init'. For further documentation, see
4+-- http://haskell.org/cabal/users-guide/
5+
6+name: cabal-simple
7+version: 0.1.0.0
8+-- synopsis:
9+-- description:
10+-- bug-reports:
11+license: PublicDomain
12+author: Rodney Lorrimar
13+maintainer: rodney.lorrimar@iohk.io
14+-- category:
15+build-type: Simple
16+
17+library
18+ -- exposed-modules:
19+ -- other-modules:
20+ -- other-extensions:
21+ build-depends: base
22+ , extra
23+ , safe
24+ , aeson
25+ -- hs-source-dirs:
26+ default-language: Haskell2010
27+
28+executable cabal-simple
29+ main-is: Main.hs
30+ -- other-modules:
31+ -- other-extensions:
32+ build-depends: base
33+ , cabal-simple
34+ , extra
35+ , optparse-applicative
36+ -- hs-source-dirs:
37+ default-language: Haskell2010
test/cabal-simple-debug/default.nixnew file+47
@@ -0,0 +1,47 @@
1+# Test a package set
2+{ stdenv, lib, util, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name, dwarfdump }:
3+
4+with lib;
5+
6+let
7+ project = cabalProject' {
8+ inherit compiler-nix-name;
9+ src = testSrc "cabal-simple-debug";
10+ };
11+
12+ packages = project.hsPkgs;
13+
14+in recurseIntoAttrs {
15+ ifdInputs = {
16+ inherit (project) plan-nix;
17+ };
18+ run = stdenv.mkDerivation {
19+ name = "cabal-simple-debug-test";
20+
21+ buildCommand = ''
22+ exe="${(packages.cabal-simple.components.exes.cabal-simple.dwarf).exePath}"
23+
24+ size=$(command stat --format '%s' "$exe")
25+ printf "size of executable $exe is $size. \n" >& 2
26+
27+ # fixme:
28+ printf "checking whether executable included DWARF debug info... " >& 2
29+ (${dwarfdump}/bin/dwarfdump $exe || true) | grep -c 'libraries/base/[A-Za-z0-9/]*\.hs'
30+ (${dwarfdump}/bin/dwarfdump $exe || true) | grep -c '\/Main\.hs'
31+
32+ touch $out
33+ '';
34+
35+ meta = {
36+ platforms = platforms.all;
37+ # DWARF only works on linux with GHC 8.10.2 and newer
38+ disabled = compiler-nix-name == "ghc865" || compiler-nix-name == "ghc884"
39+ || !stdenv.hostPlatform.isLinux || haskellLib.isCrossHost || stdenv.hostPlatform.isMusl;
40+ };
41+
42+ passthru = {
43+ # Used for debugging with nix repl
44+ inherit project packages;
45+ };
46+ };
47+}
test/default.nix+5−1
@@ -1,6 +1,6 @@
1{ haskellNix ? import ../default.nix { inherit checkMaterialization; }
1{ haskellNix ? import ../default.nix { inherit checkMaterialization; }
2, pkgs ? import nixpkgs nixpkgsArgs
2, pkgs ? import nixpkgs nixpkgsArgs
3−, nixpkgs ? haskellNix.sources.nixpkgs
3+, nixpkgs ? haskellNix.sources.nixpkgs-unstable
4, nixpkgsArgs ? haskellNix.nixpkgsArgs
4, nixpkgsArgs ? haskellNix.nixpkgsArgs
5, ifdLevel ? 1000
5, ifdLevel ? 1000
6, compiler-nix-name
6, compiler-nix-name
@@ -212,6 +212,10 @@ let
212 # githash runs git from TH code and this needs a cross compiled git exe
212 # githash runs git from TH code and this needs a cross compiled git exe
213 # to work correctly. Cross compiling git is currently brocken.
213 # to work correctly. Cross compiling git is currently brocken.
214 githash = haskell-nix.callPackage ./githash { inherit compiler-nix-name; testSrc = testSrcWithGitDir; };
214 githash = haskell-nix.callPackage ./githash { inherit compiler-nix-name; testSrc = testSrcWithGitDir; };
215+ } // lib.optionalAttrs (
216+ stdenv.hostPlatform.isLinux && !pkgs.haskell-nix.haskellLib.isCrossHost && !stdenv.hostPlatform.isMusl
217+ && !(__elem compiler-nix-name ["ghc865" "ghc884"])) {
218+ cabal-simple-debug = callTest ./cabal-simple-debug { inherit util compiler-nix-name; };
215 };
219 };
216
220
217 # This is the same as allTests, but filter out all the key/vaules from the
221 # This is the same as allTests, but filter out all the key/vaules from the