fix: haskell: stack-lock: extract compiler from snapshot

This commit is contained in:
DavHau 2022-09-20 14:55:31 +02:00
parent bf2e8dddab
commit 584e5a5fa1
2 changed files with 10 additions and 2 deletions

View File

@ -16,7 +16,7 @@
config.projectRoot = ./.;
settings = [
{
# A compiler must be specified for stack lock based builds
# Optionally, override the compiler version
subsystemInfo.compiler = {
name = "ghc";
version = "8.10.7";

View File

@ -133,6 +133,11 @@ in {
snapshot = stackLockUtils.fromYaml snapshotYamlFile;
compiler = snapshot.resolver.compiler;
compilerSplit = l.splitString "-" snapshot.resolver.compiler;
compilerName = l.head compilerSplit;
compilerVersion = l.last compilerSplit;
hidden =
hiddenPackagesDefault;
# TODO: find out what to do with the hidden packages from the snapshot
@ -238,7 +243,10 @@ in {
# The structure of this should be defined in:
# ./src/specifications/{subsystem}
subsystemAttrs = {
compiler = args.compiler;
compiler = {
name = compilerName;
version = compilerVersion;
};
};
# name of the default package