From 6c46cc64de873a92eacfabd2b53f4f7c455fafd9 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 7 Apr 2022 07:38:40 +0200 Subject: [PATCH 1/2] elmPackages.elm-format: build using hspec-tasty 1.1.6, hspec-golden 0.1.0.3 elm-format depends on elm-format-lib which failed to build with hspec-tasty 1.1.7 and hspec-golden 0.2.0.0. hspec-tasty 1.1.6 and hspec-golden 0.1.0.3 had been removed in cd67b4fcbb81d07477746a138d6dbb9d01a81450. hspec-tasty 1.1.6 in turn pulls in older dependencies for hspec, hspec-core and hspec-discover. Fixes #167533. --- pkgs/development/compilers/elm/default.nix | 9 ++ .../configuration-hackage2nix/main.yaml | 5 + .../haskell-modules/hackage-packages.nix | 102 ++++++++++++++++++ 3 files changed, 116 insertions(+) diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix index 1edf6e5ce7f1..f01338fdb86d 100644 --- a/pkgs/development/compilers/elm/default.nix +++ b/pkgs/development/compilers/elm/default.nix @@ -85,6 +85,15 @@ let bimap = self.callPackage ./packages/bimap.nix {}; avh4-lib = doJailbreak (self.callPackage ./packages/avh4-lib.nix {}); elm-format-lib = doJailbreak (self.callPackage ./packages/elm-format-lib.nix {}); + # We need tasty-hspec < 1.1.7 and hspec-golden < 0.2 to build elm-format-lib + tasty-hspec = self.tasty-hspec_1_1_6; + hspec-golden = self.hspec-golden_0_1_0_3; + + # We need hspec hspec_core, hspec_discover < 2.8 for tasty-hspec == 1.1.6 + hspec = self.hspec_2_7_10; + hspec-core = self.hspec-core_2_7_10; + hspec-discover = self.hspec-discover_2_7_10; + elm-format-test-lib = self.callPackage ./packages/elm-format-test-lib.nix {}; elm-format-markdown = self.callPackage ./packages/elm-format-markdown.nix {}; }; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index a85df6b23c0f..bdd8a6e71ade 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -129,6 +129,11 @@ extra-packages: - relude == 0.7.0.0 # 2022-02-25: Needed for ema 0.6 - SVGFonts < 1.8 # 2022-03-19: Needed for Chart-diagrams 1.9.3 - clay < 0.14 # 2022-03-20: Needed for neuron 1.0.0.0 + - hspec-golden == 0.1.* # 2022-04-07: Needed for elm-format + - tasty-hspec == 1.1.6 # 2022-04-07: Needed for elm-format + - hspec < 2.8 # 2022-04-07: Needed for tasty-hspec 1.1.6 + - hspec-core < 2.8 # 2022-04-07: Needed for tasty-hspec 1.1.6 + - hspec-discover < 2.8 # 2022-04-07: Needed for tasty-hspec 1.1.6 package-maintainers: abbradar: diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index b4ceaa6556a6..86637a302b07 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -143724,6 +143724,22 @@ self: { broken = true; }) {}; + "hspec_2_7_10" = callPackage + ({ mkDerivation, base, hspec-core, hspec-discover + , hspec-expectations, QuickCheck + }: + mkDerivation { + pname = "hspec"; + version = "2.7.10"; + sha256 = "0z0lwrmrqkglr78n6k2c36n4h68142bh785ys0x4jaibjshvs6rw"; + libraryHaskellDepends = [ + base hspec-core hspec-discover hspec-expectations QuickCheck + ]; + description = "A Testing Framework for Haskell"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + }) {}; + "hspec" = callPackage ({ mkDerivation, base, hspec-core, hspec-discover , hspec-expectations, QuickCheck @@ -143810,6 +143826,34 @@ self: { license = lib.licenses.mit; }) {}; + "hspec-core_2_7_10" = callPackage + ({ mkDerivation, ansi-terminal, array, base, call-stack, clock + , deepseq, directory, filepath, hspec-expectations, hspec-meta + , HUnit, process, QuickCheck, quickcheck-io, random, setenv + , silently, stm, temporary, tf-random, transformers + }: + mkDerivation { + pname = "hspec-core"; + version = "2.7.10"; + sha256 = "12k9yp5gznrda449ir60d5wv3xl7nnyffkb5mhfc0svw9f8lxlv1"; + libraryHaskellDepends = [ + ansi-terminal array base call-stack clock deepseq directory + filepath hspec-expectations HUnit QuickCheck quickcheck-io random + setenv stm tf-random transformers + ]; + testHaskellDepends = [ + ansi-terminal array base call-stack clock deepseq directory + filepath hspec-expectations hspec-meta HUnit process QuickCheck + quickcheck-io random setenv silently stm temporary tf-random + transformers + ]; + testToolDepends = [ hspec-meta ]; + testTarget = "--test-option=--skip --test-option='Test.Hspec.Core.Runner.hspecResult runs specs in parallel'"; + description = "A Testing Framework for Haskell"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + }) {}; + "hspec-core" = callPackage ({ mkDerivation, ansi-terminal, array, base, base-orphans , call-stack, clock, deepseq, directory, filepath @@ -143885,6 +143929,27 @@ self: { license = lib.licenses.bsd3; }) {}; + "hspec-discover_2_7_10" = callPackage + ({ mkDerivation, base, directory, filepath, hspec-meta, QuickCheck + }: + mkDerivation { + pname = "hspec-discover"; + version = "2.7.10"; + sha256 = "13yzvd3b679skvs1insk4s0wc4zvmz6hs38kc8q0j6vzqq06smqa"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ base directory filepath ]; + executableHaskellDepends = [ base directory filepath ]; + testHaskellDepends = [ + base directory filepath hspec-meta QuickCheck + ]; + testToolDepends = [ hspec-meta ]; + description = "Automatically discover and run Hspec tests"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + maintainers = with lib.maintainers; [ maralorn ]; + }) {}; + "hspec-discover" = callPackage ({ mkDerivation, base, directory, filepath, hspec-meta, mockery , QuickCheck @@ -144065,6 +144130,24 @@ self: { broken = true; }) {}; + "hspec-golden_0_1_0_3" = callPackage + ({ mkDerivation, base, directory, hspec, hspec-core + , optparse-applicative, silently + }: + mkDerivation { + pname = "hspec-golden"; + version = "0.1.0.3"; + sha256 = "1d5ab34n0f1wk1q86qlb7x2b49abzzh08jh7j52nbrvnxld2j64l"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ base directory hspec-core ]; + executableHaskellDepends = [ base directory optparse-applicative ]; + testHaskellDepends = [ base directory hspec hspec-core silently ]; + description = "Golden tests for hspec"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + }) {}; + "hspec-golden" = callPackage ({ mkDerivation, base, directory, filepath, hspec, hspec-core , optparse-applicative, silently @@ -266999,6 +267082,25 @@ self: { license = lib.licenses.mit; }) {}; + "tasty-hspec_1_1_6" = callPackage + ({ mkDerivation, base, hspec, hspec-core, QuickCheck, tasty + , tasty-quickcheck, tasty-smallcheck + }: + mkDerivation { + pname = "tasty-hspec"; + version = "1.1.6"; + sha256 = "02s82ijs2ringqxsqbm7m3vcy5brmwxa617azxv0v2phi3rdkjvl"; + revision = "1"; + editedCabalFile = "0za15rg0szacxq9yfxxjzddr77ai7ng5827a20pj9dr5anjlnajj"; + libraryHaskellDepends = [ + base hspec hspec-core QuickCheck tasty tasty-quickcheck + tasty-smallcheck + ]; + description = "Hspec support for the Tasty test framework"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + }) {}; + "tasty-hspec" = callPackage ({ mkDerivation, base, hspec, hspec-core, QuickCheck, tasty , tasty-quickcheck, tasty-smallcheck From 3d88f74c9d13e599d1bd3633e8afb197b8378071 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 7 Apr 2022 08:46:30 +0200 Subject: [PATCH 2/2] elmPackages.elmi-to-json: build using aeson 1.5.6.0 elmi-to-json (and others) did not build as aeson 2.0.3.0 fails to build with attoparsec < 0.14, presumably since 376a511e0997247b8d3a8f46b63a83d6444bf7d2. --- pkgs/development/compilers/elm/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix index f01338fdb86d..be194039e928 100644 --- a/pkgs/development/compilers/elm/default.nix +++ b/pkgs/development/compilers/elm/default.nix @@ -80,6 +80,9 @@ let # We need attoparsec < 0.14 to build elm for now attoparsec = self.attoparsec_0_13_2_5; + # aeson 2.0.3.0 does not build with attoparsec_0_13_2_5 + aeson = self.aeson_1_5_6_0; + # Needed for elm-format indents = self.callPackage ./packages/indents.nix {}; bimap = self.callPackage ./packages/bimap.nix {};