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

hnix doesn't build on nixos-unstable #82233

Closed
pmiddend opened this issue Mar 10, 2020 · 9 comments
Closed

hnix doesn't build on nixos-unstable #82233

pmiddend opened this issue Mar 10, 2020 · 9 comments

Comments

@pmiddend
Copy link
Contributor

Describe the bug

nix-shell -p haskellPackages.hnix

results in

copying path '/nix/store/cgwj1yggbds25slahdjklc8lh0kfbl7i-haskell-src-meta-0.8.5' from 'https://cache.nixos.org'...
building '/nix/store/zf9kvw36yn5z9sl491l3fc2bjbrxv7zx-regex-tdfa-text-1.0.0.3.drv'...
building '/nix/store/qhbc5q28szp95d5bvamnx4z3lzhlvbj3-these-0.7.6.drv'...
copying path '/nix/store/07mrkw1hw8yr9vi7yhnqzfpaihvb8m6s-tasty-hspec-1.1.5.1' from 'https://cache.nixos.org'...
setupCompilerEnvironmentPhase
Build with /nix/store/34mx8khxgbf4nhi3lqsbysq5w38pbfbd-ghc-8.8.2.
unpacking sources
unpacking source archive /nix/store/zqwk4fb0ycr8s8jbwzwawclj1q9cha3x-regex-tdfa-text-1.0.0.3.tar.gz
source root is regex-tdfa-text-1.0.0.3
setting SOURCE_DATE_EPOCH to timestamp 1440421992 of file regex-tdfa-text-1.0.0.3/Text/Regex/TDFA/Text/Lazy.hs
patching sources
Replace Cabal file with edited version from mirror://hackage/regex-tdfa-text-1.0.0.3/revision/1.cabal.
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 -threaded
[1 of 1] Compiling Main             ( Setup.lhs, /build/Main.o )
setupCompilerEnvironmentPhase
Build with /nix/store/34mx8khxgbf4nhi3lqsbysq5w38pbfbd-ghc-8.8.2.
Linking Setup ...
copying path '/nix/store/1flg5rfxjrr1slg4878vijvn9fpqhzvf-interpolate-0.2.0' from 'https://cache.nixos.org'...
unpacking sources
unpacking source archive /nix/store/ql1vm9zx9zh9kcc77rfdr36a3xh73hww-these-0.7.6.tar.gz
source root is these-0.7.6
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file these-0.7.6/these.cabal
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.hs, /build/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/rbpsxlm082dpiv8r39fl1ac5zq1yb767-regex-tdfa-text-1.0.0.3 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/chfppam99a9amy7r4ziazdi18v89h8iw-regex-tdfa-text-1.0.0.3-doc/share/doc/regex-tdfa-text-1.0.0.3 --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/wxwzrhjxpzznkxky64965af43l98bjji-ncurses-6.1-20190112/lib --extra-lib-dirs=/nix/store/bxqxy5lnj6cp3lmfw1j0q42ss3b8zgaj-libffi-3.3/lib --extra-lib-dirs=/nix/store/llkj5hw3mnv67cqc69hxysngr74a524g-gmp-6.2.0/lib
Using Parsec parser
Configuring regex-tdfa-text-1.0.0.3...
CallStack (from HasCallStack):
  die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:1022:20 in Cabal-3.0.1.0:Distribution.Simple.Configure
  configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:475:12 in Cabal-3.0.1.0:Distribution.Simple.Configure
  configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:625:20 in Cabal-3.0.1.0:Distribution.Simple
  confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:65:5 in Cabal-3.0.1.0:Distribution.Simple.UserHooks
  configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:180:19 in Cabal-3.0.1.0:Distribution.Simple
  defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:116:27 in Cabal-3.0.1.0:Distribution.Simple
  defaultMain, called at Setup.lhs:3:10 in main:Main
Setup: Encountered missing or private dependencies:
regex-base <0.94

builder for '/nix/store/zf9kvw36yn5z9sl491l3fc2bjbrxv7zx-regex-tdfa-text-1.0.0.3.drv' failed with exit code 1
cannot build derivation '/nix/store/wrwqp82q7azdsh6kn8x7r0abl1a4sz58-hnix-0.6.1.drv': 1 dependencies couldn't be built
error: build of '/nix/store/wrwqp82q7azdsh6kn8x7r0abl1a4sz58-hnix-0.6.1.drv' failed

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.4.23, NixOS, 20.09pre215947.82b54d49066 (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.3
  • channels(philipp): ""
  • channels(root): ""
  • nixpkgs: /nix/store/w8s6mcva9z073fqf6v1jmj6dhjjl0w5f-source

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@cdepillabout
Copy link
Member

@pmiddend Thanks for reporting this.

We'd appreciate a PR fixing this, although it might be easiest just to get upstream to release a version that supports a newer regex-base.

Also, getting hnix in Stackage would help prevent this problem in the future.

@flokli
Copy link
Contributor

flokli commented Mar 11, 2020

At latest zurihac, I tried to take a look getting this into stackage with @sboehler - see haskell-nix/hnix#494 and haskell-nix/hnix#504.

TLDR: we need to get a pure haskell hashing library into stackage first, as cryptonite is a no-no (due to GHCJS).

@cdepillabout
Copy link
Member

@flokli if you're interested in getting hnix into Stackage, you can probably just send a PR to Stackage adding libraries like hashing, monadlist, and ref-tf.

As long as those libraries already build in stackage nightly, this is normally a pretty easy process.

If those libraries don't already build in Stackage nightly, you'll have to send PRs updating them, and then get the maintainer to make a release to Hackage.

@pmiddend
Copy link
Contributor Author

I'm all for fixing this properly, but is there any way to fix this purely in nixpkgs? For now, I mean.

@flokli
Copy link
Contributor

flokli commented Mar 11, 2020 via email

@cdepillabout
Copy link
Member

@pmiddend From the error message, it appears that regex-tdfa-text depends on an older version of regex-base.

There are a couple possible ways to fix this. Some of these may not work depending on the package:

  1. Jailbreak regex-tdfa-text so it uses a later version of regex-base.
  2. Get upstream to release a newer version of regex-tdfa-text so that it is compatible with the version of regex-base in nixpkgs.

@pmiddend
Copy link
Contributor Author

Btw. with the latest nixos-unstable, I now get

Setup: Encountered missing or private dependencies:
pretty-show >=1.9.5 && <1.10

@sorki
Copy link
Member

sorki commented Apr 25, 2020

Feel free to use https://github.com/sorki/hnix-overlay meanwhile

@sorki
Copy link
Member

sorki commented Jun 8, 2020

Builds with unstable since c054bc6, unbroken in c9b67ee

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