NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.99k stars 14.01k forks source link

haskellPackages.haddock-api-2.22.0 fails to build #85728

Closed schmittlauch closed 4 years ago

schmittlauch commented 4 years ago

Describe the bug When trying to build my Haskell development from nixpkgs revision 10100a97c8964e82b30f180fda41ade8e6f69e41, a build failure of haddock-api causes the build to fail. (I suppose that haddock-api is pulled in by the hoogle integration of haskellPackages.shellFor)

One of the build errors is

Expected a type, but ‘Hyperlink’ has kind ‘ -> ’ which might make it related to #84563.

To Reproduce

my default.nix:

```nix { pkgs ? import ( builtins.fetchGit { name = "nixpkgs-pinned"; url = https://github.com/NixOS/nixpkgs/; #ref = "refs/heads/release-20.03"; rev = "10100a97c8964e82b30f180fda41ade8e6f69e41"; }) {}, compiler ? "ghc865" }: let hp = pkgs.haskell.packages."${compiler}"; src = pkgs.nix-gitignore.gitignoreSource [] ./.; drv = hp.callCabal2nix "Hash2Pub" "${src}/Hash2Pub.cabal" {}; in { my_project = drv; shell = hp.shellFor { withHoogle = true; packages = p: [ drv ]; buildInputs = with hp; [ haddock cabal-install hlint ]; }; } ```

my shell.nix:

```nix (import ./default.nix {}).shell ```

full build log with errors:

```console building '/nix/store/gzkf3fg5zcx507di355lv51qaa4ki9kb-cabal2nix-Hash2Pub.drv'... installing these derivations will be built: /nix/store/h7a25spvs02wnczl4vmfcivmsyr5y384-singleton-bool-0.1.5.drv /nix/store/98rdxdkg6m9m8jqpmiv3v2rvyyqc87fg-lukko-0.1.1.2.drv /nix/store/5pm2483fc2q2kbfkfbs09crz6mqpf7n4-hackage-security-0.6.0.1.drv /nix/store/5sj0khag976lmmrgb7s4kjw37ab6dsjz-haddock-api-2.22.0.drv /nix/store/9nw2ldxsfiar3kza3kgzh47nwx5l9ad3-haskell-src-exts-util-0.2.5.drv /nix/store/wpi25ld20579ivk5k0h4201kyi5qkaxi-resolv-0.1.1.2.drv /nix/store/9vrkfadjd0yb10mlfdxv9irnf5qvm84z-cabal-install-3.2.0.0.drv /nix/store/d6fd7d9wm18j4845imgy0f4k6j8b5ijj-hscolour-1.24.4.drv /nix/store/wgr27xs77lwgzw8bkwh39vb1idjcm6yk-refact-0.3.0.2.drv /nix/store/hyrf9z41zw818ymwhw5qv6s98b8qy70v-hlint-2.2.11.drv /nix/store/y48nrmfc5nbjlr31gi7r16f3lfkl7h9m-haddock-2.22.0.drv building '/nix/store/5sj0khag976lmmrgb7s4kjw37ab6dsjz-haddock-api-2.22.0.drv'... setupCompilerEnvironmentPhase Build with /nix/store/c1zpndaxjvdzgygz8kzlbz3k53bmnh01-ghc-8.6.5. unpacking sources unpacking source archive /nix/store/psc0vf1mvy0s7j6c64vhd8fqzak4c9vx-haddock-api-2.22.0.tar.gz source root is haddock-api-2.22.0 setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file haddock-api-2.22.0/test/Spec.hs patching sources Run jailbreak-cabal to lift version restrictions on build inputs. compileBuildDriverPhase setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 -threaded [1 of 1] Compiling Main ( Setup.lhs, /build/Main.o ) Linking Setup ... configuring configureFlags: --verbose --prefix=/nix/store/hyai714c2xcrq1qym9wa5ldxda2mdlsg-haddock-api-2.22.0 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --datadir=/nix/store/rphz7wr47l5hgzzxd6a86xd9l79bsrp0-haddock-api-2.22.0-data/share/ghc-8.6.5 --with-gcc=gcc --package-db=/build/package.conf.d --ghc-option=-j4 --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/0i4wbhkj6663nlh63ydhr01vx8w90s49-ncurses-6.2/lib --extra-lib-dirs=/nix/store/dfs0i8z58m64zak8102hf7g0w9skhdw6-libffi-3.3/lib --extra-lib-dirs=/nix/store/js28swbiimjvd139x6kr7nc68s81fdg6-gmp-6.2.0/lib --extra-lib-dirs=/nix/store/c1zpndaxjvdzgygz8kzlbz3k53bmnh01-ghc-8.6.5/lib --extra-lib-dirs=/nix/store/c1zpndaxjvdzgygz8kzlbz3k53bmnh01-ghc-8.6.5/lib Using Parsec parser Configuring haddock-api-2.22.0... Dependency Cabal -any: using Cabal-2.4.0.1 Dependency array -any: using array-0.5.3.0 Dependency base -any: using base-4.12.0.0 Dependency bytestring -any: using bytestring-0.10.8.2 Dependency containers -any: using containers-0.6.0.1 Dependency deepseq -any: using deepseq-1.4.4.0 Dependency directory -any: using directory-1.3.3.0 Dependency filepath -any: using filepath-1.4.2.1 Dependency ghc -any: using ghc-8.6.5 Dependency ghc-boot -any: using ghc-boot-8.6.5 Dependency ghc-paths -any: using ghc-paths-0.1.0.12 Dependency haddock-library -any: using haddock-library-1.8.0 Dependency transformers -any: using transformers-0.5.6.2 Dependency xhtml -any: using xhtml-3000.2.2.1 Dependency Cabal -any: using Cabal-2.4.0.1 Dependency QuickCheck -any: using QuickCheck-2.13.2 Dependency array -any: using array-0.5.3.0 Dependency base -any: using base-4.12.0.0 Dependency bytestring -any: using bytestring-0.10.8.2 Dependency containers -any: using containers-0.6.0.1 Dependency deepseq -any: using deepseq-1.4.4.0 Dependency directory -any: using directory-1.3.3.0 Dependency filepath -any: using filepath-1.4.2.1 Dependency ghc -any: using ghc-8.6.5 Dependency ghc-boot -any: using ghc-boot-8.6.5 Dependency ghc-paths -any: using ghc-paths-0.1.0.12 Dependency haddock-library -any: using haddock-library-1.8.0 Dependency hspec -any: using hspec-2.7.1 Dependency transformers -any: using transformers-0.5.6.2 Dependency xhtml -any: using xhtml-3000.2.2.1 Source component graph: component test:spec component lib Configured component graph: component haddock-api-2.22.0-2lmia2N6GKM8MoiMFHHlTk-spec include Cabal-2.4.0.1 include QuickCheck-2.13.2-BoBcmKmSgwjHIXfsnVFi8g include array-0.5.3.0 include base-4.12.0.0 include bytestring-0.10.8.2 include containers-0.6.0.1 include deepseq-1.4.4.0 include directory-1.3.3.0 include filepath-1.4.2.1 include ghc-8.6.5 include ghc-boot-8.6.5 include ghc-paths-0.1.0.12-8MhNqRZlSJXAzmVO0F6ybT include haddock-library-1.8.0-19I3fmm32n5KCgLmD4fd7w include hspec-2.7.1-8nnxokyPwWC9FQ7e0xix8s include transformers-0.5.6.2 include xhtml-3000.2.2.1 component haddock-api-2.22.0-KoH34R8G4rW83rziiTkOOn include Cabal-2.4.0.1 include array-0.5.3.0 include base-4.12.0.0 include bytestring-0.10.8.2 include containers-0.6.0.1 include deepseq-1.4.4.0 include directory-1.3.3.0 include filepath-1.4.2.1 include ghc-8.6.5 include ghc-boot-8.6.5 include ghc-paths-0.1.0.12-8MhNqRZlSJXAzmVO0F6ybT include haddock-library-1.8.0-19I3fmm32n5KCgLmD4fd7w include transformers-0.5.6.2 include xhtml-3000.2.2.1 Linked component graph: unit haddock-api-2.22.0-2lmia2N6GKM8MoiMFHHlTk-spec include Cabal-2.4.0.1 include QuickCheck-2.13.2-BoBcmKmSgwjHIXfsnVFi8g include array-0.5.3.0 include base-4.12.0.0 include bytestring-0.10.8.2 include containers-0.6.0.1 include deepseq-1.4.4.0 include directory-1.3.3.0 include filepath-1.4.2.1 include ghc-8.6.5 include ghc-boot-8.6.5 include ghc-paths-0.1.0.12-8MhNqRZlSJXAzmVO0F6ybT include haddock-library-1.8.0-19I3fmm32n5KCgLmD4fd7w include hspec-2.7.1-8nnxokyPwWC9FQ7e0xix8s include transformers-0.5.6.2 include xhtml-3000.2.2.1 unit haddock-api-2.22.0-KoH34R8G4rW83rziiTkOOn include Cabal-2.4.0.1 include array-0.5.3.0 include base-4.12.0.0 include bytestring-0.10.8.2 include containers-0.6.0.1 include deepseq-1.4.4.0 include directory-1.3.3.0 include filepath-1.4.2.1 include ghc-8.6.5 include ghc-boot-8.6.5 include ghc-paths-0.1.0.12-8MhNqRZlSJXAzmVO0F6ybT include haddock-library-1.8.0-19I3fmm32n5KCgLmD4fd7w include transformers-0.5.6.2 include xhtml-3000.2.2.1 Documentation.Haddock=haddock-api-2.22.0-KoH34R8G4rW83rziiTkOOn:Documentation.Haddock Ready component graph: definite haddock-api-2.22.0-KoH34R8G4rW83rziiTkOOn depends Cabal-2.4.0.1 depends array-0.5.3.0 depends base-4.12.0.0 depends bytestring-0.10.8.2 depends containers-0.6.0.1 depends deepseq-1.4.4.0 depends directory-1.3.3.0 depends filepath-1.4.2.1 depends ghc-8.6.5 depends ghc-boot-8.6.5 depends ghc-paths-0.1.0.12-8MhNqRZlSJXAzmVO0F6ybT depends haddock-library-1.8.0-19I3fmm32n5KCgLmD4fd7w depends transformers-0.5.6.2 depends xhtml-3000.2.2.1 definite haddock-api-2.22.0-2lmia2N6GKM8MoiMFHHlTk-spec depends Cabal-2.4.0.1 depends QuickCheck-2.13.2-BoBcmKmSgwjHIXfsnVFi8g depends array-0.5.3.0 depends base-4.12.0.0 depends bytestring-0.10.8.2 depends containers-0.6.0.1 depends deepseq-1.4.4.0 depends directory-1.3.3.0 depends filepath-1.4.2.1 depends ghc-8.6.5 depends ghc-boot-8.6.5 depends ghc-paths-0.1.0.12-8MhNqRZlSJXAzmVO0F6ybT depends haddock-library-1.8.0-19I3fmm32n5KCgLmD4fd7w depends hspec-2.7.1-8nnxokyPwWC9FQ7e0xix8s depends transformers-0.5.6.2 depends xhtml-3000.2.2.1 Using Cabal-2.4.0.1 compiled by ghc-8.6 Using compiler: ghc-8.6.5 Using install prefix: /nix/store/hyai714c2xcrq1qym9wa5ldxda2mdlsg-haddock-api-2.22.0 Executables installed in: /nix/store/hyai714c2xcrq1qym9wa5ldxda2mdlsg-haddock-api-2.22.0/bin Libraries installed in: /nix/store/hyai714c2xcrq1qym9wa5ldxda2mdlsg-haddock-api-2.22.0/lib/ghc-8.6.5/x86_64-linux-ghc-8.6.5/haddock-api-2.22.0-KoH34R8G4rW83rziiTkOOn Dynamic Libraries installed in: /nix/store/hyai714c2xcrq1qym9wa5ldxda2mdlsg-haddock-api-2.22.0/lib/ghc-8.6.5/x86_64-linux-ghc-8.6.5 Private executables installed in: /nix/store/hyai714c2xcrq1qym9wa5ldxda2mdlsg-haddock-api-2.22.0/libexec/x86_64-linux-ghc-8.6.5/haddock-api-2.22.0 Data files installed in: /nix/store/rphz7wr47l5hgzzxd6a86xd9l79bsrp0-haddock-api-2.22.0-data/share/ghc-8.6.5/x86_64-linux-ghc-8.6.5/haddock-api-2.22.0 Documentation installed in: /nix/store/rphz7wr47l5hgzzxd6a86xd9l79bsrp0-haddock-api-2.22.0-data/share/ghc-8.6.5/doc/x86_64-linux-ghc-8.6.5/haddock-api-2.22.0 Configuration files installed in: /nix/store/hyai714c2xcrq1qym9wa5ldxda2mdlsg-haddock-api-2.22.0/etc No alex found Using ar found on system at: /nix/store/sq2b0dqlq243mqn4ql5h36xmpplyy20k-binutils-2.31.1/bin/ar No c2hs found No cpphs found No doctest found Using gcc version 9.3.0 given by user at: /nix/store/x9vxn05bn19wn2mzn6d4h56glbd02pyr-gcc-wrapper-9.3.0/bin/gcc Using ghc version 8.6.5 found on system at: /nix/store/c1zpndaxjvdzgygz8kzlbz3k53bmnh01-ghc-8.6.5/bin/ghc Using ghc-pkg version 8.6.5 found on system at: /nix/store/c1zpndaxjvdzgygz8kzlbz3k53bmnh01-ghc-8.6.5/bin/ghc-pkg No ghcjs found No ghcjs-pkg found No greencard found Using haddock version 2.22.0 found on system at: /nix/store/c1zpndaxjvdzgygz8kzlbz3k53bmnh01-ghc-8.6.5/bin/haddock No happy found Using haskell-suite found on system at: haskell-suite-dummy-location Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location No hmake found Using hpc version 0.67 found on system at: /nix/store/c1zpndaxjvdzgygz8kzlbz3k53bmnh01-ghc-8.6.5/bin/hpc Using hsc2hs version 0.68.5 found on system at: /nix/store/c1zpndaxjvdzgygz8kzlbz3k53bmnh01-ghc-8.6.5/bin/hsc2hs Using hscolour version 1.24 found on system at: /nix/store/ynyqybiwjvkmr8bkhgsr3j6khwmk7zyb-hscolour-1.24.4/bin/HsColour No jhc found Using ld found on system at: /nix/store/rnry29lhl0gvmqgb1kzngxgkpmv9rn31-binutils-wrapper-2.31.1/bin/ld.gold No pkg-config found Using runghc version 8.6.5 found on system at: /nix/store/c1zpndaxjvdzgygz8kzlbz3k53bmnh01-ghc-8.6.5/bin/runghc Using strip version 2.31 found on system at: /nix/store/sq2b0dqlq243mqn4ql5h36xmpplyy20k-binutils-2.31.1/bin/strip Using tar found on system at: /nix/store/g17n49rfl1zmcd1cc6p0gbsdj6pl0hd1-gnutar-1.32/bin/tar No uhc found building Preprocessing library for haddock-api-2.22.0.. Building library for haddock-api-2.22.0.. [ 1 of 41] Compiling Haddock.Backends.HaddockDB ( src/Haddock/Backends/HaddockDB.hs, dist/build/Haddock/Backends/HaddockDB.o ) [ 2 of 41] Compiling Haddock.Backends.Hyperlinker.Types ( src/Haddock/Backends/Hyperlinker/Types.hs, dist/build/Haddock/Backends/Hyperlinker/Types.o ) [ 3 of 41] Compiling Haddock.Backends.Hyperlinker.Parser ( src/Haddock/Backends/Hyperlinker/Parser.hs, dist/build/Haddock/Backends/Hyperlinker/Parser.o ) [ 4 of 41] Compiling Haddock.Backends.Xhtml.Types ( src/Haddock/Backends/Xhtml/Types.hs, dist/build/Haddock/Backends/Xhtml/Types.o ) [ 5 of 41] Compiling Haddock.Parser ( src/Haddock/Parser.hs, dist/build/Haddock/Parser.o ) src/Haddock/Parser.hs:32:45: error: • Couldn't match type ‘Maybe RdrName’ with ‘String -> Maybe RdrName’ Expected type: Namespace -> String -> Maybe RdrName Actual type: String -> Maybe RdrName • Possible cause: ‘parseIdent’ is applied to too many arguments In the first argument of ‘P.overIdentifier’, namely ‘(parseIdent d)’ In the first argument of ‘overDoc’, namely ‘(P.overIdentifier (parseIdent d))’ In the first argument of ‘(.)’, namely ‘overDoc (P.overIdentifier (parseIdent d))’ | 32 | parseParas d p = overDoc (P.overIdentifier (parseIdent d)) . P.parseParas p | ^^^^^^^^^^^^ src/Haddock/Parser.hs:35:35: error: • Couldn't match type ‘Maybe RdrName’ with ‘String -> Maybe RdrName’ Expected type: Namespace -> String -> Maybe RdrName Actual type: String -> Maybe RdrName • Possible cause: ‘parseIdent’ is applied to too many arguments In the first argument of ‘P.overIdentifier’, namely ‘(parseIdent d)’ In the first argument of ‘(.)’, namely ‘P.overIdentifier (parseIdent d)’ In the expression: P.overIdentifier (parseIdent d) . P.parseString | 35 | parseString d = P.overIdentifier (parseIdent d) . P.parseString | ^^^^^^^^^^^^ [ 6 of 41] Compiling Haddock.Syb ( src/Haddock/Syb.hs, dist/build/Haddock/Syb.o ) [ 7 of 41] Compiling Haddock.Backends.Hyperlinker.Ast ( src/Haddock/Backends/Hyperlinker/Ast.hs, dist/build/Haddock/Backends/Hyperlinker/Ast.o ) [ 8 of 41] Compiling Haddock.Types ( src/Haddock/Types.hs, dist/build/Haddock/Types.o ) src/Haddock/Types.hs:470:17: error: • Expecting one more argument to ‘Hyperlink’ Expected a type, but ‘Hyperlink’ has kind ‘* -> *’ • In the first argument of ‘NFData’, namely ‘Hyperlink’ In the instance declaration for ‘NFData Hyperlink’ | 470 | instance NFData Hyperlink where | ^^^^^^^^^ [35 of 41] Compiling Haddock.Utils.Json ( src/Haddock/Utils/Json.hs, dist/build/Haddock/Utils/Json.o ) [36 of 41] Compiling Paths_haddock_api ( dist/build/autogen/Paths_haddock_api.hs, dist/build/Paths_haddock_api.o ) [37 of 41] Compiling Haddock.Version ( src/Haddock/Version.hs, dist/build/Haddock/Version.o ) [38 of 41] Compiling Haddock.Backends.Xhtml.Meta ( src/Haddock/Backends/Xhtml/Meta.hs, dist/build/Haddock/Backends/Xhtml/Meta.o ) builder for '/nix/store/5sj0khag976lmmrgb7s4kjw37ab6dsjz-haddock-api-2.22.0.drv' failed with exit code 1 cannot build derivation '/nix/store/y48nrmfc5nbjlr31gi7r16f3lfkl7h9m-haddock-2.22.0.drv': 1 dependencies couldn't be built error: build of '/nix/store/9vrkfadjd0yb10mlfdxv9irnf5qvm84z-cabal-install-3.2.0.0.drv', '/nix/store/hyrf9z41zw818ymwhw5qv6s98b8qy70v-hlint-2.2.11.drv', '/nix/store/y48nrmfc5nbjlr31gi7r16f3lfkl7h9m-haddock-2.22.0.drv' failed ```

Additional context Add any other context about the problem here.

Notify maintainers

Metadata

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
cdepillabout commented 4 years ago

@schmittlauch Please feel free to send a PR fixing haddock-api here in nixpkgs.

Also, upstream may be interesting in hearing about this (depending on what the underlying cause of this build failure is).