Merge pull request #145310 from cdepillabout/purescript-in-nixpkgs

haskellPackages.purescript: get building again

authored by

Dennis Gosnell and committed by
GitHub
d602c931 07e8aeb3

+67 -41
+42 -15
pkgs/development/haskell-modules/configuration-common.nix
··· 976 976 # https://github.com/haskell/hoopl/issues/50 977 977 hoopl = dontCheck super.hoopl; 978 978 979 + # The most recent version of purescript-cst (0.4.0.0) has version 980 + # bounds for LTS-17, so we need to jailbreak it for LTS-18. 981 + # doJailbreak can likely be removed when the next version of 982 + # purescript-cst is released, since the version bounds have 983 + # been updated for LTS-18. 984 + purescript-cst = doJailbreak super.purescript-cst; 985 + 979 986 purescript = 980 - let 981 - purescriptWithOverrides = super.purescript.override { 982 - # PureScript requires an older version of happy. 983 - happy = self.happy_1_19_9; 984 - }; 985 - 986 - # PureScript is built against LTS-13, so we need to jailbreak it to 987 - # accept more recent versions of the libraries it requires. 988 - jailBrokenPurescript = doJailbreak purescriptWithOverrides; 987 + pkgs.lib.pipe 988 + (super.purescript.override { 989 + # The latest version of language-javascript is 0.7.1.0, 990 + # but it seems to have a bug with async support: 991 + # https://github.com/erikd/language-javascript/issues/131 992 + language-javascript = self.language-javascript_0_7_0_0; 993 + }) 994 + [ # This PR upgrades purescript from building with LTS-17 to building 995 + # with LTS-18. Aside from bumping dependency bounds, there is one 996 + # minor change that needs to be made in app/Main.hs. 997 + # 998 + # This patch can likely be removed when purescript-0.14.6 is released. 999 + (appendPatch 1000 + (pkgs.fetchpatch { 1001 + url = "https://patch-diff.githubusercontent.com/raw/purescript/purescript/pull/4199.patch"; 1002 + sha256 = "sha256-OeG30EfCHs7gttLME909WfKxkEZr7Ch3leYiw4lElGg="; 1003 + includes = [ 1004 + "app/Main.hs" 1005 + ]; 1006 + }) 1007 + ) 1008 + # PureScript uses nodejs to run tests, so the tests have been disabled 1009 + # for now. If someone is interested in figuring out how to get this 1010 + # working, it seems like it might be possible. 1011 + dontCheck 1012 + # The current version of purescript (0.14.5) has version bounds for LTS-17, 1013 + # but it compiles cleanly using deps in LTS-18 as well. This jailbreak can 1014 + # likely be removed when purescript-0.14.6 is released. 1015 + doJailbreak 1016 + # Generate shell completions 1017 + (generateOptparseApplicativeCompletion "purs") 1018 + ]; 989 1019 990 - # Haddocks for PureScript can't be built. 991 - # https://github.com/purescript/purescript/pull/3745 992 - dontHaddockPurescript = dontHaddock jailBrokenPurescript; 993 - in 994 - # Generate shell completions 995 - generateOptparseApplicativeCompletion "purs" dontHaddockPurescript; 1020 + # purenix-1.0 has a strict version bound requiring purescript-0.14.4, but it 1021 + # works with later versions of purescript as well. 1022 + purenix = doJailbreak super.purenix; 996 1023 997 1024 # Generate shell completion for spago 998 1025 spago = generateOptparseApplicativeCompletion "spago" super.spago;
-1
pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml
··· 3917 3917 - Pup-Events-Server 3918 3918 - pure-io 3919 3919 - pure-priority-queue 3920 - - purescript-cst 3921 3920 - pure-zlib 3922 3921 - pusher-haskell 3923 3922 - pusher-ws
+2 -1
pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml
··· 114 114 - haddock == 2.23.* # required on GHC < 8.10.x 115 115 - haddock-api == 2.23.* # required on GHC < 8.10.x 116 116 - haddock-library ==1.7.* # required by stylish-cabal-0.5.0.0 117 - - happy == 1.19.9 # for purescript 118 117 - happy == 1.19.12 # for ghcjs 119 118 - hinotify == 0.3.9 # for xmonad-0.26: https://github.com/kolmodin/hinotify/issues/29 120 119 - immortal == 0.2.2.1 # required by Hasura 1.3.1, 2020-08-20 120 + - language-javascript == 0.7.0.0 # required by purescript 121 121 - mmorph == 1.1.3 # Newest working version of mmorph on ghc 8.6.5. needed for hls 122 122 - network == 2.6.3.1 # required by pkgs/games/hedgewars/default.nix, 2020-11-15 123 123 - optparse-applicative < 0.16 # needed for niv-0.2.19 ··· 148 148 - password 149 149 - password-instances 150 150 - pretty-simple 151 + - purenix 151 152 - spago 152 153 - termonad 153 154 dalpd:
-1
pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml
··· 2444 2444 - puppetresources 2445 2445 - pure-cdb 2446 2446 - pure-priority-queue-tests 2447 - - purescript 2448 2447 - purescript-iso 2449 2448 - purescript-tsd-gen 2450 2449 - push-notify
+23 -23
pkgs/development/haskell-modules/hackage-packages.nix
··· 119663 119663 hydraPlatforms = lib.platforms.none; 119664 119664 }) {}; 119665 119665 119666 - "happy_1_19_9" = callPackage 119667 - ({ mkDerivation, array, base, Cabal, containers, directory 119668 - , filepath, mtl, process 119669 - }: 119670 - mkDerivation { 119671 - pname = "happy"; 119672 - version = "1.19.9"; 119673 - sha256 = "138xpxdb7x62lpmgmb6b3v3vgdqqvqn4273jaap3mjmc2gla709y"; 119674 - revision = "3"; 119675 - editedCabalFile = "0kwlh964nyqvfbm02np8vpc28gbhsby0r65jhz1918rm0wip9izq"; 119676 - isLibrary = false; 119677 - isExecutable = true; 119678 - setupHaskellDepends = [ base Cabal directory filepath ]; 119679 - executableHaskellDepends = [ array base containers mtl ]; 119680 - testHaskellDepends = [ base process ]; 119681 - description = "Happy is a parser generator for Haskell"; 119682 - license = lib.licenses.bsd2; 119683 - hydraPlatforms = lib.platforms.none; 119684 - }) {}; 119685 - 119686 119666 "happy_1_19_12" = callPackage 119687 119667 ({ mkDerivation, array, base, containers, mtl, process }: 119688 119668 mkDerivation { ··· 162548 162528 license = lib.licenses.bsd3; 162549 162529 hydraPlatforms = lib.platforms.none; 162550 162530 broken = true; 162531 + }) {}; 162532 + 162533 + "language-javascript_0_7_0_0" = callPackage 162534 + ({ mkDerivation, alex, array, base, blaze-builder, bytestring 162535 + , Cabal, containers, happy, hspec, mtl, QuickCheck, text 162536 + , utf8-light, utf8-string 162537 + }: 162538 + mkDerivation { 162539 + pname = "language-javascript"; 162540 + version = "0.7.0.0"; 162541 + sha256 = "15bpqpkjf2y3fk8wff9zlnkpsjc63bnbvhlkxrs9alj0bikq17nk"; 162542 + libraryHaskellDepends = [ 162543 + array base blaze-builder bytestring containers mtl text utf8-string 162544 + ]; 162545 + libraryToolDepends = [ alex happy ]; 162546 + testHaskellDepends = [ 162547 + array base blaze-builder bytestring Cabal containers hspec mtl 162548 + QuickCheck utf8-light utf8-string 162549 + ]; 162550 + description = "Parser for JavaScript"; 162551 + license = lib.licenses.bsd3; 162552 + hydraPlatforms = lib.platforms.none; 162551 162553 }) {}; 162552 162554 162553 162555 "language-javascript" = callPackage ··· 218397 218399 executableHaskellDepends = [ base ]; 218398 218400 description = "Nix backend for PureScript. Transpile PureScript code to Nix."; 218399 218401 license = lib.licenses.bsd3; 218402 + maintainers = with lib.maintainers; [ cdepillabout ]; 218400 218403 }) {}; 218401 218404 218402 218405 "purescheme-wai-routing-core" = callPackage ··· 218490 218493 doCheck = false; 218491 218494 description = "PureScript Programming Language Compiler"; 218492 218495 license = lib.licenses.bsd3; 218493 - hydraPlatforms = lib.platforms.none; 218494 218496 }) {}; 218495 218497 218496 218498 "purescript-ast" = callPackage ··· 218564 218566 libraryToolDepends = [ happy ]; 218565 218567 description = "PureScript Programming Language Concrete Syntax Tree"; 218566 218568 license = lib.licenses.bsd3; 218567 - hydraPlatforms = lib.platforms.none; 218568 - broken = true; 218569 218569 }) {}; 218570 218570 218571 218571 "purescript-iso" = callPackage