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

haskellPackages.purescript: get building again #145310

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 43 additions & 16 deletions pkgs/development/haskell-modules/configuration-common.nix
Expand Up @@ -976,23 +976,50 @@ self: super: {
# https://github.com/haskell/hoopl/issues/50
hoopl = dontCheck super.hoopl;

purescript =
let
purescriptWithOverrides = super.purescript.override {
# PureScript requires an older version of happy.
happy = self.happy_1_19_9;
};

# PureScript is built against LTS-13, so we need to jailbreak it to
# accept more recent versions of the libraries it requires.
jailBrokenPurescript = doJailbreak purescriptWithOverrides;
# The most recent version of purescript-cst (0.4.0.0) has version
# bounds for LTS-17, so we need to jailbreak it for LTS-18.
# doJailbreak can likely be removed when the next version of
# purescript-cst is released, since the version bounds have
# been updated for LTS-18.
purescript-cst = doJailbreak super.purescript-cst;

# Haddocks for PureScript can't be built.
# https://github.com/purescript/purescript/pull/3745
dontHaddockPurescript = dontHaddock jailBrokenPurescript;
in
# Generate shell completions
generateOptparseApplicativeCompletion "purs" dontHaddockPurescript;
sternenseemann marked this conversation as resolved.
Show resolved Hide resolved
purescript =
pkgs.lib.pipe
(super.purescript.override {
# The latest version of language-javascript is 0.7.1.0,
# but it seems to have a bug with async support:
# https://github.com/erikd/language-javascript/issues/131
language-javascript = self.language-javascript_0_7_0_0;
})
[ # This PR upgrades purescript from building with LTS-17 to building
# with LTS-18. Aside from bumping dependency bounds, there is one
# minor change that needs to be made in app/Main.hs.
#
# This patch can likely be removed when purescript-0.14.6 is released.
(appendPatch
(pkgs.fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/purescript/purescript/pull/4199.patch";
sha256 = "sha256-OeG30EfCHs7gttLME909WfKxkEZr7Ch3leYiw4lElGg=";
includes = [
"app/Main.hs"
];
})
)
# PureScript uses nodejs to run tests, so the tests have been disabled
# for now. If someone is interested in figuring out how to get this
# working, it seems like it might be possible.
dontCheck
# The current version of purescript (0.14.5) has version bounds for LTS-17,
# but it compiles cleanly using deps in LTS-18 as well. This jailbreak can
# likely be removed when purescript-0.14.6 is released.
doJailbreak
# Generate shell completions
(generateOptparseApplicativeCompletion "purs")
];

# purenix-1.0 has a strict version bound requiring purescript-0.14.4, but it
# works with later versions of purescript as well.
purenix = doJailbreak super.purenix;

# Generate shell completion for spago
spago = generateOptparseApplicativeCompletion "spago" super.spago;
Expand Down
Expand Up @@ -3917,7 +3917,6 @@ broken-packages:
- Pup-Events-Server
- pure-io
- pure-priority-queue
- purescript-cst
- pure-zlib
- pusher-haskell
- pusher-ws
Expand Down
Expand Up @@ -114,10 +114,10 @@ extra-packages:
- haddock == 2.23.* # required on GHC < 8.10.x
- haddock-api == 2.23.* # required on GHC < 8.10.x
- haddock-library ==1.7.* # required by stylish-cabal-0.5.0.0
- happy == 1.19.9 # for purescript
- happy == 1.19.12 # for ghcjs
- hinotify == 0.3.9 # for xmonad-0.26: https://github.com/kolmodin/hinotify/issues/29
- immortal == 0.2.2.1 # required by Hasura 1.3.1, 2020-08-20
- language-javascript == 0.7.0.0 # required by purescript
- mmorph == 1.1.3 # Newest working version of mmorph on ghc 8.6.5. needed for hls
- network == 2.6.3.1 # required by pkgs/games/hedgewars/default.nix, 2020-11-15
- optparse-applicative < 0.16 # needed for niv-0.2.19
Expand Down Expand Up @@ -148,6 +148,7 @@ package-maintainers:
- password
- password-instances
- pretty-simple
- purenix
- spago
- termonad
dalpd:
Expand Down
Expand Up @@ -2444,7 +2444,6 @@ dont-distribute-packages:
- puppetresources
- pure-cdb
- pure-priority-queue-tests
- purescript
- purescript-iso
- purescript-tsd-gen
- push-notify
Expand Down
46 changes: 23 additions & 23 deletions pkgs/development/haskell-modules/hackage-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.