-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
501ba62
commit cfaa918
Showing
11 changed files
with
3,079 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[ { dep = "dhall", ver = "1.41.1" } | ||
, { dep = "dhall-json", ver = "1.7.10" } | ||
, { dep = "hpack", ver = "0.35.0" } | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
'' | ||
|
||
program-options | ||
ghc-options: -fhide-source-paths'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
let TYPES = ./../../../updo/types.dhall | ||
|
||
let empty-constraints = ./../../../updo/empty/constraints.dhall | ||
|
||
let empty-source-pkgs = ./../../../updo/empty/source-pkgs.dhall | ||
|
||
let null = https://prelude.dhall-lang.org/List/null | ||
|
||
in \(pkgs-done : List Text) -> | ||
\(stackage-resolver : Text) -> | ||
let pkgs-todo = ../../pkgs-upgrade-todo.dhall | ||
|
||
let pkg-config = | ||
{ constraints = ./../constraints.dhall ? empty-constraints | ||
, source-pkgs = | ||
{ deps-external = ./../deps-external.dhall ? empty-source-pkgs | ||
, deps-internal = ./../deps-internal.dhall ? empty-source-pkgs | ||
, forks-external = ./../forks-external.dhall ? empty-source-pkgs | ||
, forks-internal = ./../forks-internal.dhall ? empty-source-pkgs | ||
} | ||
} | ||
|
||
in '' | ||
${../../../updo/text-templates/dhall2cabal.dhall | ||
TYPES.Verbosity.Quiet | ||
TYPES.Stackage.StackageLocal | ||
stackage-resolver | ||
( if null Text pkgs-todo | ||
then TYPES.PkgSet.AllPkgs pkgs-done | ||
else TYPES.PkgSet.PkgUpgrade | ||
{ todo = pkgs-todo, done = pkgs-done } | ||
) | ||
pkg-config} | ||
${./cabal-snippet.dhall} | ||
'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
let TYPES = ./../../../updo/types.dhall | ||
|
||
let empty-constraints = ./../../../updo/empty/constraints.dhall | ||
|
||
let empty-source-pkgs = ./../../../updo/empty/source-pkgs.dhall | ||
|
||
let null = https://prelude.dhall-lang.org/List/null | ||
|
||
in \(pkgs-done : List Text) -> | ||
\(stackage-resolver : Text) -> | ||
let pkgs-todo = ../../pkgs-upgrade-todo.dhall | ||
|
||
let pkg-config = | ||
{ constraints = ./../constraints.dhall ? empty-constraints | ||
, source-pkgs = | ||
{ deps-external = ./../deps-external.dhall ? empty-source-pkgs | ||
, deps-internal = ./../deps-internal.dhall ? empty-source-pkgs | ||
, forks-external = ./../forks-external.dhall ? empty-source-pkgs | ||
, forks-internal = ./../forks-internal.dhall ? empty-source-pkgs | ||
} | ||
} | ||
|
||
in '' | ||
${./stack-snippet.dhall (None Text)} | ||
${../../../updo/text-templates/dhall2stack.dhall | ||
TYPES.Verbosity.Quiet | ||
stackage-resolver | ||
( if null Text pkgs-todo | ||
then TYPES.PkgSet.AllPkgs pkgs-done | ||
else TYPES.PkgSet.PkgUpgrade | ||
{ todo = pkgs-todo, done = pkgs-done } | ||
) | ||
pkg-config} | ||
'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
\(_stackage-resolver : Optional Text) -> | ||
'' | ||
user-message: "WARNING: This stack project is generated." | ||
'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[ "hpack-dhall" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] : List Text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[ "." ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
CABAL_VIA ?= dhall2cabal | ||
|
||
# How to generate project-nix/ghc-$(GHC_VERSION)/sha256map.nix? | ||
# This is copied from ghc-$(GHC_VERSION).sha256map.nix. | ||
# - false to generate from *.dhall inputs via sha256map.hs. | ||
# - true to generate from stack.yaml via sha256map.py. | ||
SHA256MAP_VIA_PYTHON ?= false | ||
|
||
# To use installed executables instead of *.hs scripts, set these to true. | ||
SHA256MAP_HS_EXE ?= false | ||
PKG_GROUPS_HS_EXE ?= false | ||
PKGS_SORTED_HS_EXE ?= false | ||
PKGS_UPGRADE_DONE_HS_EXE ?= false | ||
|
||
include project-versions.mk | ||
include updo/Makefile | ||
|
||
project-nix/ghc-%/sha256map.nix: ghc-%.sha256map.nix | ||
mkdir -p $(@D) && cp $^ $@ | ||
|
||
.PHONY: all | ||
all: \ | ||
projects \ | ||
project-nix/ghc-$(GHC_VERSION)/sha256map.nix \ | ||
project-versions.nix | ||
|
||
# To make stack.yaml or cabal.project and no other, mark the file we copy from | ||
# as intermediate. This is all we want when not doing a GHC upgrade. | ||
# | ||
# Comment out these .INTERMEDIATE targets to allow these files to be kept. | ||
.INTERMEDIATE: ghc-$(GHC_VERSION).$(CABAL_VIA).project | ||
.INTERMEDIATE: ghc-$(GHC_UPGRADE).$(CABAL_VIA).project | ||
.INTERMEDIATE: ghc-$(GHC_VERSION).$(STACK_VIA).yaml | ||
.INTERMEDIATE: ghc-$(GHC_UPGRADE).$(STACK_VIA).yaml | ||
.INTERMEDIATE: ghc-$(GHC_VERSION).sha256map.nix | ||
.INTERMEDIATE: ghc-$(GHC_UPGRADE).sha256map.nix | ||
|
||
# If true, generate the sha256map from the stack.yaml with python, | ||
# overriding the recipe for this target. | ||
ifeq ($(SHA256MAP_VIA_PYTHON), true) | ||
ghc-$(GHC_VERSION).sha256map.nix: stack.yaml | ||
updo/project-nix/sha256map.py <$^ >$@ | ||
ghc-$(GHC_UPGRADE).sha256map.nix: stack.upgrade.yaml | ||
updo/project-nix/sha256map.py <$^ >$@ | ||
endif | ||
|
||
.DEFAULT_GOAL := all | ||
|
||
UPDO_VERSION ?= a86c165687b2b5e8251265418a9c4181c6a651a0 | ||
UPDO_URL := https://github.com/cabalism/updo/archive/${UPDO_VERSION}.tar.gz | ||
|
||
updo/Makefile: | ||
rm -rf updo | ||
curl -sSL ${UPDO_URL} | tar -xz | ||
mv updo-* updo | ||
chmod +x $$(grep -RIl '^#!' updo) |
Oops, something went wrong.