himura / twitter-conduit

Twitter API package for Haskell, including enumerator interfaces and Streaming API supports.
BSD 2-Clause "Simplified" License
158 stars 48 forks source link

Nix package fails, and is marked as broken due to HLint failure. #79

Closed t1lde closed 3 years ago

t1lde commented 3 years ago

I had been unable to build a project of my own using this library with Stack's nix integration, as the nix package fails (and is currently marked as broken!) to build due to the hlint failure. I'm not sure whether it's supposed to cause build failure like this, or whether something else in nixpkgs is causing this...

Nix package. (twitter-conduit is at lines 254024-264054)

Test suite hlint: RUNNING...
Web/Twitter/Conduit/Response.hs:2:1-31: Warning: Unused LANGUAGE pragma
Found:
  {-# LANGUAGE DeriveFoldable #-}
Perhaps you should remove it.
Note: Extension DeriveFoldable is implied by DeriveTraversable

Web/Twitter/Conduit/Response.hs:3:1-30: Warning: Unused LANGUAGE pragma
Found:
  {-# LANGUAGE DeriveFunctor #-}
Perhaps you should remove it.
Note: Extension DeriveFunctor is implied by DeriveTraversable

2 hints
Test suite hlint: FAIL
Montmorency commented 3 years ago

Noticed this as well. I think it's as simple as a white space issue (https://www.snoyman.com/blog/2017/11/future-proofing-test-suites). I was able to build the package in a nix expressions using

 config = {
    allowBroken = true;
    packageOverrides = pkgs: rec { 
    haskell = pkgs.haskell // {
        packages = pkgs.haskell.packages // {
          "${compiler}" =
          pkgs.haskell.packages."${compiler}".override {
            overrides = composeExtensionsList [
              generatedOverrides
              (makeOverrides pkgs.haskell.lib.dontCheck   dontCheckPackages  )
            ];
         };
        };};};};

where let dontCheckPackages = [ twitter-conduit]