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

Gitit is broken #32377

Closed
P-E-Meunier opened this issue Dec 6, 2017 · 10 comments
Closed

Gitit is broken #32377

P-E-Meunier opened this issue Dec 6, 2017 · 10 comments

Comments

@P-E-Meunier
Copy link
Contributor

Issue description

I can't install Gitit.

Steps to reproduce

nix-env -iA nixos.haskellPackages.gitit

This ends with

setupCompileFlags: -package-db=/tmp/nix-build-gitit-0.12.2.1.drv-0/package.conf.d -j1 -threaded
[1 of 1] Compiling Main             ( Setup.lhs, /tmp/nix-build-gitit-0.12.2.1.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/c11l2mcdjwwgviiz6d9jg6x14zsxxjp9-gitit-0.12.2.1 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --datadir=/nix/store/270ybd2mk5y66fhmyag7id8wp85d6rxa-gitit-0.12.2.1-data/share/ghc-8.0.2 --docdir=/nix/store/df9y78f8gm97zcfl7wv52xlg4zw3vkcq-gitit-0.12.2.1-doc/share/doc --with-gcc=gcc --package-db=/tmp/nix-build-gitit-0.12.2.1.drv-0/package.conf.d --ghc-option=-optl=-Wl,-rpath=/nix/store/c11l2mcdjwwgviiz6d9jg6x14zsxxjp9-gitit-0.12.2.1/lib/ghc-8.0.2/gitit-0.12.2.1 --ghc-option=-j1 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-library-vanilla --enable-executable-dynamic --enable-tests --ghc-option=-split-sections
Configuring gitit-0.12.2.1...
Setup: Encountered missing dependencies:
hoauth2 >=0.4.2 && <0.6
builder for ‘/nix/store/2x33knpy4fak1kjlcpgwh180fw0fjv37-gitit-0.12.2.1.drv’ failed with exit code 1

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

  • system: "x86_64-linux"
  • host os: Linux 4.14.2, NixOS, 18.03pre121253.2f1a818d00 (Impala)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 1.11.15
  • channels(pe): "nixos-18.03pre121253.2f1a818d00, nixos-stable-16.03.1349.dda40aa8d1"
  • channels(root): "nixos-18.03pre121253.2f1a818d00"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
@dotlambda
Copy link
Member

dotlambda commented Dec 7, 2017

This has probably already been fixed upstream. See jgm/gitit#608.
For me at least, doing stack build --nix --nix-packages zlib from source works fine.
We'll have to convince @jgm to release a new version on Hackage.

dotlambda pushed a commit to dotlambda/nixpkgs that referenced this issue Dec 9, 2017
dotlambda pushed a commit to dotlambda/nixpkgs that referenced this issue Dec 9, 2017
@dotlambda
Copy link
Member

You can use dotlambda@250bd53 until a new version is released.

@srid
Copy link
Contributor

srid commented Feb 5, 2018

On nixos-unstable:

stow -v 1 bash git emacs xmonad
sudo nixos-rebuild switch
building Nix...
building the system configuration...
these derivations will be built:
  /nix/store/4s1gq96q2ghanh81aqgndy917qn0dhv8-filestore-0.6.3.1.drv
  /nix/store/2bn212xzz4j00pqmjlrf67v9jfn189qq-gitit-0.12.2.1.drv
  /nix/store/2kzyyylqzb65x8kv9zhz6d2z5cxcsg2z-ghc-8.2.2-with-packages.drv
  /nix/store/dlvpfy3sjn3g9xq7d9xh0cizgmbwplxd-unit-script.drv
  /nix/store/wsxprvv1d3azwi5kanxwpgp3azinmdmh-gitit.conf.drv
  /nix/store/wmpr73ccdvcx9hm5ijs5i8l0ck1i6w86-gitit.drv
  /nix/store/ag2ksn71wiwcxfbfxrg0iz4sp5fmj0bg-unit-gitit.service.drv
  /nix/store/jniqibh5afbhvgdrggzjl545y2p38ixd-system-units.drv
  /nix/store/d6k7i6yfsykmgl5zxikb6d1kzhlii3va-etc.drv
  /nix/store/p4bi87xcmvv14v1lmkyyiy2p61ixsb20-nixos-system-thebeast-18.03pre126729.2e4aded3669.drv
building path(s) ‘/nix/store/grfazm87g40g0yc0yavyh2xqrar19qca-filestore-0.6.3.1-doc’, ‘/nix/store/gwrah383nfx1f1zca98h976ml9ygilwh-filestore-0.6.3.1’, ‘/nix/store/pk3giwjg0jqzcvrhjlx04q89d7cj71z4-filestore-0.6.3.1-data’
setupCompilerEnvironmentPhase
Build with /nix/store/75hyhwqmh2zh2wflffn1qgrrhy5nl8vg-ghc-8.2.2.
unpacking sources
unpacking source archive /nix/store/q24vyrh3r28pdvih0d0vzhcs5q28ib8c-filestore-0.6.3.1.tar.gz
source root is filestore-0.6.3.1
setting SOURCE_DATE_EPOCH to timestamp 1487026898 of file filestore-0.6.3.1/CHANGES
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/tmp/nix-build-filestore-0.6.3.1.drv-0/package.conf.d -j1 -threaded
[1 of 1] Compiling Main             ( Setup.lhs, /tmp/nix-build-filestore-0.6.3.1.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/gwrah383nfx1f1zca98h976ml9ygilwh-filestore-0.6.3.1 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --datadir=/nix/store/pk3giwjg0jqzcvrhjlx04q89d7cj71z4-filestore-0.6.3.1-data/share/ghc-8.2.2 --docdir=/nix/store/grfazm87g40g0yc0yavyh2xqrar19qca-filestore-0.6.3.1-doc/share/doc --with-gcc=gcc --package-db=/tmp/nix-build-filestore-0.6.3.1.drv-0/package.conf.d --ghc-option=-optl=-Wl,-rpath=/nix/store/gwrah383nfx1f1zca98h976ml9ygilwh-filestore-0.6.3.1/lib/ghc-8.2.2/filestore-0.6.3.1 --ghc-option=-j1 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-library-vanilla --enable-executable-dynamic --disable-tests --ghc-option=-split-sections --extra-lib-dirs=/nix/store/hk3s7q3486lkkipv291m7y498q6rj0pp-ncurses-6.0-20171125/lib --extra-lib-dirs=/nix/store/83abj589v6z6qak2rxlb9vvynnfvnrzg-gmp-6.1.2/lib --extra-lib-dirs=/nix/store/hk3s7q3486lkkipv291m7y498q6rj0pp-ncurses-6.0-20171125/lib
Configuring filestore-0.6.3.1...
CallStack (from HasCallStack):
  die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:948:20 in Cabal-2.0.1.0:Distribution.Simple.Configure
  configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:470:12 in Cabal-2.0.1.0:Distribution.Simple.Configure
  configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:570:20 in Cabal-2.0.1.0:Distribution.Simple
  confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:67:5 in Cabal-2.0.1.0:Distribution.Simple.UserHooks
  configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:174:19 in Cabal-2.0.1.0:Distribution.Simple
  defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:119:27 in Cabal-2.0.1.0:Distribution.Simple
  defaultMain, called at Setup.lhs:3:10 in main:Main
Setup: Encountered missing dependencies:
process >=1.0 && <1.5, time >=1.1 && <1.7
builder for ‘/nix/store/4s1gq96q2ghanh81aqgndy917qn0dhv8-filestore-0.6.3.1.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/2kzyyylqzb65x8kv9zhz6d2z5cxcsg2z-ghc-8.2.2-with-packages.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/2bn212xzz4j00pqmjlrf67v9jfn189qq-gitit-0.12.2.1.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/wmpr73ccdvcx9hm5ijs5i8l0ck1i6w86-gitit.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/dlvpfy3sjn3g9xq7d9xh0cizgmbwplxd-unit-script.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/ag2ksn71wiwcxfbfxrg0iz4sp5fmj0bg-unit-gitit.service.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/jniqibh5afbhvgdrggzjl545y2p38ixd-system-units.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/d6k7i6yfsykmgl5zxikb6d1kzhlii3va-etc.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/p4bi87xcmvv14v1lmkyyiy2p61ixsb20-nixos-system-thebeast-18.03pre126729.2e4aded3669.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/p4bi87xcmvv14v1lmkyyiy2p61ixsb20-nixos-system-thebeast-18.03pre126729.2e4aded3669.drv’ failed
make: *** [Makefile:5: nix-switch] Error 100

@Profpatsch
Copy link
Member

Profpatsch commented Feb 9, 2018

@srid If you jailbreak filestore, it still builds, yet gitit version bounds need to be changed as well:

Setup: Encountered missing dependencies:
aeson >=0.7 && <1.2,
feed >=0.3.6 && <0.4,
happstack-server >=7.0 && <7.5,
pandoc >=1.12.4 && <1.20,
time >=1.1 && <1.8
builder for ‘/nix/store/ig6g2zf5jmrvxg31m2ap00wx3ssppfxf-gitit-0.12.2.1.drv’ failed with exit code 1

Just jailbreaking gitit doesn’t work, though, as the current hoauth fixes are not yet released on hackage.

Building from master, a few bounds are still wrong and pandoc and feed have jumped major versions, feed seems to have changed its comlete interface to Text:

src/Network/Gitit/Feed.hs:54:38: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Maybe Text.Atom.Feed.URI
        Actual type: Maybe [Char]
    • In the ‘genURI’ field of a record
      In the expression:
        Generator
          {genURI = Just "http://github.com/jgm/gitit",
           genVersion = Just (showVersion version), genText = "gitit"}
      In an equation for ‘gititGenerator’:
          gititGenerator
            = Generator
                {genURI = Just "http://github.com/jgm/gitit",
                 genVersion = Just (showVersion version), genText = "gitit"}
   |
54 | gititGenerator = Generator {genURI = Just "http://github.com/jgm/gitit"
   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Network/Gitit/Feed.hs:55:51: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Maybe Data.Text.Internal.Text
        Actual type: Maybe String
    • In the ‘genVersion’ field of a record
      In the expression:
        Generator
          {genURI = Just "http://github.com/jgm/gitit",
           genVersion = Just (showVersion version), genText = "gitit"}
      In an equation for ‘gititGenerator’:
          gititGenerator
            = Generator
                {genURI = Just "http://github.com/jgm/gitit",
                 genVersion = Just (showVersion version), genText = "gitit"}
   |
55 |                                    , genVersion = Just (showVersion version)
   |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Network/Gitit/Feed.hs:56:48: error:
    • Couldn't match expected type ‘Data.Text.Internal.Text’
                  with actual type ‘[Char]’
    • In the ‘genText’ field of a record
      In the expression:
        Generator
          {genURI = Just "http://github.com/jgm/gitit",
           genVersion = Just (showVersion version), genText = "gitit"}
      In an equation for ‘gititGenerator’:
          gititGenerator
            = Generator
                {genURI = Just "http://github.com/jgm/gitit",
                 genVersion = Just (showVersion version), genText = "gitit"}
   |
56 |                                    , genText = "gitit"}
   |                                                ^^^^^^^

src/Network/Gitit/Feed.hs:62:34: error:
    • Couldn't match type ‘xml-types-0.3.6:Data.XML.Types.Element’
                     with ‘Element’
      NB: ‘Element’
            is defined in ‘Text.XML.Light.Types’ in package ‘xml-1.3.14’
          ‘xml-types-0.3.6:Data.XML.Types.Element’
            is defined in ‘Data.XML.Types’ in package ‘xml-types-0.3.6’
      Expected type: Feed -> Element
        Actual type: Feed -> xml-types-0.3.6:Data.XML.Types.Element
    • In the second argument of ‘(.)’, namely ‘xmlFeed’
      In the expression: ppTopElement . xmlFeed
      In an equation for ‘xmlFeedToString’:
          xmlFeedToString = ppTopElement . xmlFeed
   |
62 | xmlFeedToString = ppTopElement . xmlFeed
   |                                  ^^^^^^^

src/Network/Gitit/Feed.hs:72:81: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Date
        Actual type: String
    • In the sixth argument of ‘generateEmptyfeed’, namely
        ‘(formatFeedTime now)’
      In the expression:
        generateEmptyfeed
          generator (fcTitle cfg) home mbPath persons (formatFeedTime now)
      In an equation for ‘basefeed’:
          basefeed
            = generateEmptyfeed
                generator (fcTitle cfg) home mbPath persons (formatFeedTime now)
   |
72 |       basefeed = generateEmptyfeed generator (fcTitle cfg) home mbPath persons (formatFeedTime now)
   |                                                                                 ^^^^^^^^^^^^^^^^^^

src/Network/Gitit/Feed.hs:113:39: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Text.Atom.Feed.URI
        Actual type: [Char]
    • In the second argument of ‘($)’, namely
        ‘home ++ "_feed/" ++ escape (fromMaybe "" mbPath)’
      In the expression:
        (nullLink $ home ++ "_feed/" ++ escape (fromMaybe "" mbPath))
      In the expression:
        (nullLink $ home ++ "_feed/" ++ escape (fromMaybe "" mbPath))
          {linkRel = Just (Left "self")}
    |
113 |             feedLinks = [ (nullLink $ home ++ "_feed/" ++ escape (fromMaybe "" mbPath))
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Network/Gitit/Feed.hs:114:39: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Maybe
                       (Either Text.Atom.Feed.NCName Text.Atom.Feed.URI)
        Actual type: Maybe (Either [Char] Text.Atom.Feed.URI)
    • In the ‘linkRel’ field of a record
      In the expression:
        (nullLink $ home ++ "_feed/" ++ escape (fromMaybe "" mbPath))
          {linkRel = Just (Left "self")}
      In the ‘feedLinks’ field of a record
    |
114 |                            {linkRel = Just (Left "self")}]
    |                                       ^^^^^^^^^^^^^^^^^^

src/Network/Gitit/Feed.hs:116:31: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Text.Atom.Feed.URI
        Actual type: String
    • In the first argument of ‘nullFeed’, namely ‘home’
      In the expression: nullFeed home (TextString title) now
      In an equation for ‘baseNull’:
          baseNull = nullFeed home (TextString title) now
    |
116 |     where baseNull = nullFeed home (TextString title) now
    |                               ^^^^

src/Network/Gitit/Feed.hs:116:48: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Data.Text.Internal.Text
        Actual type: String
    • In the first argument of ‘TextString’, namely ‘title’
      In the second argument of ‘nullFeed’, namely ‘(TextString title)’
      In the expression: nullFeed home (TextString title) now
    |
116 |     where baseNull = nullFeed home (TextString title) now
    |                                                ^^^^^

src/Network/Gitit/Feed.hs:122:50: error:
    • Couldn't match expected type ‘Data.Text.Internal.Text’
                  with actual type ‘[Char]’
    • In the second argument of ‘($)’, namely
        ‘concat $ map showContent $ map diffFile diffs’
      In the second argument of ‘($)’, namely
        ‘HTMLContent $ concat $ map showContent $ map diffFile diffs’
      In the ‘entryContent’ field of a record
    |
122 |   baseEntry{ entryContent = Just $ HTMLContent $ concat $ map showContent $ map diffFile diffs
    |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Network/Gitit/Feed.hs:124:32: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Text.Atom.Feed.URI
        Actual type: [Char]
    • In the first argument of ‘nullEntry’, namely ‘url’
      In the expression: nullEntry url title (formatFeedTime rdt)
      In an equation for ‘baseEntry’:
          baseEntry = nullEntry url title (formatFeedTime rdt)
    |
124 |    where baseEntry = nullEntry url title (formatFeedTime rdt)
    |                                ^^^

src/Network/Gitit/Feed.hs:124:43: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Date
        Actual type: String
    • In the third argument of ‘nullEntry’, namely
        ‘(formatFeedTime rdt)’
      In the expression: nullEntry url title (formatFeedTime rdt)
      In an equation for ‘baseEntry’:
          baseEntry = nullEntry url title (formatFeedTime rdt)
    |
124 |    where baseEntry = nullEntry url title (formatFeedTime rdt)
    |                                           ^^^^^^^^^^^^^^^^^^

src/Network/Gitit/Feed.hs:126:25: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Text.Atom.Feed.URI
        Actual type: [Char]
    • In the first argument of ‘nullLink’, namely ‘url’
      In the expression: (nullLink url)
      In the expression:
        (nullLink url) {linkRel = Just (Left "alternate")}
    |
126 |          ln = (nullLink url) {linkRel = Just (Left "alternate")}
    |                         ^^^

src/Network/Gitit/Feed.hs:126:41: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Maybe
                       (Either Text.Atom.Feed.NCName Text.Atom.Feed.URI)
        Actual type: Maybe (Either [Char] Text.Atom.Feed.URI)
    • In the ‘linkRel’ field of a record
      In the expression:
        (nullLink url) {linkRel = Just (Left "alternate")}
      In an equation for ‘ln’:
          ln = (nullLink url) {linkRel = Just (Left "alternate")}
    |
126 |          ln = (nullLink url) {linkRel = Just (Left "alternate")}
    |                                         ^^^^^^^^^^^^^^^^^^^^^^^

src/Network/Gitit/Feed.hs:127:31: error:
    • Couldn't match expected type ‘Data.Text.Internal.Text’
                  with actual type ‘[Char]’
    • In the second argument of ‘($)’, namely
        ‘(takeWhile ('\n' /=) rd)
           ++ " - " ++ (intercalate ", " $ map show rv)’
      In the expression:
        TextString
          $ (takeWhile ('\n' /=) rd)
              ++ " - " ++ (intercalate ", " $ map show rv)
      In an equation for ‘title’:
          title
            = TextString
                $ (takeWhile ('\n' /=) rd)
                    ++ " - " ++ (intercalate ", " $ map show rv)
    |
127 |          title = TextString $ (takeWhile ('\n' /=) rd) ++ " - " ++ (intercalate ", " $ map show rv)
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Network/Gitit/Feed.hs:152:46: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: Data.Text.Internal.Text
        Actual type: String
    • In the ‘personName’ field of a record
      In the expression: nullPerson {personName = authorName ra}
      In an equation for ‘authorToPerson’:
          authorToPerson ra = nullPerson {personName = authorName ra}
    |
152 | authorToPerson ra = nullPerson {personName = authorName ra}
    |                                              ^^^^^^^^^^^^^

so a bit of refactoring work is required.

@stale
Copy link

stale bot commented Jun 5, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 5, 2020
@dotlambda
Copy link
Member

Gitit seems to be fixed on master (but is still marked as broken) because it was updated to 0.13.0.0. Can you confirm?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 7, 2020
@Profpatsch
Copy link
Member

Yes, I can build it. I will mark it unbroken.

@Profpatsch
Copy link
Member

Actually I have no idea to mark a building haskellPackage as not broken that is marked as such cc @peti

@peti
Copy link
Member

peti commented Jun 8, 2020

@Profpatsch
Copy link
Member

Yes, it does. Can we link these videos into the Haskell section of the nixpkgs manual?

I already looked into the yaml file, but I missed that it’s in the brokenPackages section (I skipped too fast upwards).

Here’s the PR which makes it into a first-class package: #89795

Profpatsch added a commit to Profpatsch/nixpkgs that referenced this issue Jun 8, 2020
This was broken in `haskellPackages` for a long time, but it’s back!

Time to give it a place in the toplevel and a prope) treatment:

* Semi-static binary
* Remove all references to `Paths_` modules of dependencies
* gitit tries very hard to have a runtime dependency on GHC, disable
  that by default.

Also added myself as a maintainer, let’s try to keep this working from
now on.

Fixes NixOS#32377
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants