-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two versions of GHC depended on when useArchiveFilesForTemplateHaskell is true #122
Comments
I intend to continue investigating this and will share thoughts here 📝 |
Commenting out static-haskell-nix/survey/default.nix Lines 1594 to 1596 in 88f1e2d
So maybe this override isn't being applied "deep"/early enough? (So that it also applies to the packages within |
Unfortunately I'm pretty stumped on this 😔 For posterity, one approach to debugging I tried was:
I didn't really learn anything new from this though, so I intend to stop investigating for now. |
On master (88f1e2d) when setting
useArchiveFilesForTemplateHaskell = true
two versions of GHC are being depended on. Picking an arbitrary package (in this casevector
):Using
nix-tree
to inspect the derivations we find that the first derivation/nix/store/v6hbyn8a5nydw81a9vjabr4qxfj093mr-vector-0.12.3.1.drv
depends on two different GHC derivations:a.
/nix/store/6yvclb4xwmkwg632nmm2mdcaw94vfj7k-ghc-musl-9.2.7.drv
— Immediate Parents (41)b.
/nix/store/pd3h7k2f9p9290dhfch2wnwkp9714xgk-ghc-musl-9.2.7.drv
— Immediate Parents (4): jailbreak-cabal-1.4.drv, hscolour-1.24.4.drv, Cabal-syntax-3.6.0.0.drv, hscolour-1.24.4.drvWhile the second derivation
/nix/store/ggxx6mgws1vn22l668dsnpl76yx635ri-vector-0.12.3.1.drv
only depends on a.Diffing the derivations for a and b, the only meaningful difference is in the
preConfigure
step:Some observations/thoughts:
These are options changed by
enableRelocatedStaticLibs
andenableShared
attributes in the GHC derivation, which is set byuseArchiveFilesForTemplateHaskell
.The immediate parents suggest this is the GHC in
buildHaskellPackages
, as these parents match things set up inmkDerivationImpl
.We already override
buildHaskellPackages
to replace GHC (to avoid depending on 2 versions)static-haskell-nix/survey/default.nix
Lines 1586 to 1596 in 88f1e2d
The GHC overrides are made by a
fixGhc
function, which is applied to bothghc
and theghc
inbuildHaskellPackages
, so I'm not sure why it isn't working the same in both places?buildHaskellPackages.ghc
does have the right derivation 🤔The text was updated successfully, but these errors were encountered: