mirror of
https://github.com/infinisil/all-hies.git
synced 2024-11-22 04:43:27 +03:00
b8fb659620
* Remove update command Will be replaced with haskell.nix * Project revamp using haskell.nix - Only unstable HIE - Only GHC 8.6.5 and 8.8.3 (or more in the future), but on Linux for both glibc 2.27 (NixOS 19.09) and glibc 2.30 (NixOS 20.03/unstable) - Using haskell.nix for the builds. This makes evaluation slower, but makes things simpler overall. - No global installation intended anymore, instead you add HIE to your projects shell.nix file (to be documented in future commits) Co-authored-by: galagora <45048741+galagora@users.noreply.github.com> * Remove old files not needed anymore with the revamp * Add new haskell.nix-generated files * Add haskell.nix template * Add nixpkgs infra template * Build, push and test using GitHub Actions This builds and pushes all necessary configurations using GitHub Actions automatically. Also tests the templates * Update Readme for revamp * Add template documentation * Add warning for unsupported versions * Add haskell.nix + stack template * Minor Readme changes * Remove check-cache script * Don't CI on pushes to haskell.nix * Use same haskell.nix version for stack/cabal + cleanups Co-authored-by: galagora <45048741+galagora@users.noreply.github.com>
38 lines
972 B
Nix
38 lines
972 B
Nix
let
|
|
build = import ./build.nix;
|
|
in final: prev:
|
|
let
|
|
glibcName =
|
|
if final.stdenv.hostPlatform.isDarwin
|
|
# glibc matching doesn't matter for darwin
|
|
then "glibc-2.30"
|
|
else final.glibc.name;
|
|
in {
|
|
|
|
haskell = prev.haskell // {
|
|
packageOverrides = final.lib.composeExtensions prev.haskell.packageOverrides
|
|
(hfinal: hprev: {
|
|
hie = (build {
|
|
inherit glibcName;
|
|
ghcVersion = hfinal.ghc.version;
|
|
}).combined;
|
|
});
|
|
};
|
|
|
|
}
|
|
# Only include this part if a haskell-nix overlay is there
|
|
// prev.lib.optionalAttrs (prev ? haskell-nix) {
|
|
|
|
haskell-nix = prev.haskell-nix // {
|
|
custom-tools = prev.haskell-nix.custom-tools // {
|
|
hie.unstable = args: (build {
|
|
inherit glibcName;
|
|
ghcVersion = if args ? compiler-nix-name
|
|
then final.haskell-nix.compiler.${args.compiler-nix-name}.version
|
|
else args.ghc.version; # deprecated
|
|
}).combined;
|
|
};
|
|
};
|
|
|
|
}
|