Skip to content
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

generate overlay of built-in packages automatically #13

Open
cdepillabout opened this issue Feb 19, 2023 · 0 comments
Open

generate overlay of built-in packages automatically #13

cdepillabout opened this issue Feb 19, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@cdepillabout
Copy link
Owner

In #12, I introduced a way for stacklock2nix to generate a completely new package set. Part of this includes creating an overlay that has the GHC boot packages set to null:

# An Nixpkgs Haskell overlay that has GHC boot packages set to `null`. This
# is used as an initial overlay when creating a brand new package set.
newPkgSetCompilerConfig = self: super: {
# TODO: Should llvmPackages be enabled here?
# llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
# Disable GHC core libraries.
array = null;
base = null;
binary = null;
bytestring = null;
Cabal = null;
containers = null;
deepseq = null;
directory = null;
exceptions = null;
filepath = null;
ghc-bignum = null;
ghc-boot = null;
ghc-boot-th = null;
ghc-compact = null;
ghc-heap = null;
ghc-prim = null;
ghci = null;
haskeline = null;
hpc = null;
integer-gmp = null;
libiserv = null;
mtl = null;
parsec = null;
pretty = null;
process = null;
rts = null;
stm = null;
template-haskell = null;
# GHC only builds terminfo if it is a native compiler
# terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_5;
terminfo = null;
text = null;
time = null;
transformers = null;
unix = null;
# GHC only bundles the xhtml library if haddock is enabled, check if this is
# still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
# xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1;
xhtml = null;
};

I think this overlay could likely be defined automatically, without it having to be hard-coded. Here's a function from Nixpkgs doing something similar:

NixOS/nixpkgs#217124

@cdepillabout cdepillabout added enhancement New feature or request help wanted Extra attention is needed labels Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant