Skip to content

Haskell.nix cannot build stackage packages #1857

Closed
@andreabedini

Description

@andreabedini

E.g.

$ nix-build -A 'pkgs-unstable.haskell-nix.snapshots."lts-20.10".tasty-discover'

fails with

building '/nix/store/xw1lbyk17ywd4yj2724ib5m7ljikwf4a-unix-lib-unix-2.7.2.2.drv'...
unpacking sources
unpacking source archive /nix/store/6fv3psnba96vr26xgd1dzv40vbmmwn9m-unix-2.7.2.2.tar.gz
source root is unix-2.7.2.2
setting SOURCE_DATE_EPOCH to timestamp 1500501876 of file unix-2.7.2.2/unix.cabal
patching sources
configuring
Configure flags:
--prefix=/nix/store/ivyzwrga2gv4qxgg31q2waw5s708fik9-unix-lib-unix-2.7.2.2 lib:unix --package-db=clear --package-db=/nix/store/jbns7dp118zp5df1wknpp40pcinp9y3p-unix-lib-unix-2.7.2.2-config/lib/ghc-9.2.5/package.conf.d --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ld=ld.gold --ghc-option=-optl-fuse-ld=gold --ld-option=-fuse-ld=gold --with-ar=ar --with-strip=strip --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-profiling --enable-static --enable-shared --disable-coverage --enable-library-for-ghci --datadir=/nix/store/p607d39a632lsp87wc21mckrcijb47ch-unix-lib-unix-2.7.2.2-data/share/ghc-9.2.5 --enable-split-sections 
Configuring library for unix-2.7.2.2..
Setup: Encountered missing or private dependencies:
base >=4.5 && <4.11,
bytestring >=0.9.2 && <0.11,
time >=1.2 && <1.9

error: builder for '/nix/store/xw1lbyk17ywd4yj2724ib5m7ljikwf4a-unix-lib-unix-2.7.2.2.drv' failed with exit code 1;
       last 10 log lines:
       > patching sources
       > configuring
       > Configure flags:
       > --prefix=/nix/store/ivyzwrga2gv4qxgg31q2waw5s708fik9-unix-lib-unix-2.7.2.2 lib:unix --package-db=clear --package-db=/nix/store/jbns7dp118zp5df1wknpp40pcinp9y3p-unix-lib-unix-2.7.2.2-config/lib/ghc-9.2.5/package.conf.d --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ld=ld.gold --ghc-option=-optl-fuse-ld=gold --ld-option=-fuse-ld=gold --with-ar=ar --with-strip=strip --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-profiling --enable-static --enable-shared --disable-coverage --enable-library-for-ghci --datadir=/nix/store/p607d39a632lsp87wc21mckrcijb47ch-unix-lib-unix-2.7.2.2-data/share/ghc-9.2.5 --enable-split-sections
       > Configuring library for unix-2.7.2.2..
       > Setup: Encountered missing or private dependencies:
       > base >=4.5 && <4.11,
       > bytestring >=0.9.2 && <0.11,
       > time >=1.2 && <1.9
       >
       For full logs, run 'nix log /nix/store/xw1lbyk17ywd4yj2724ib5m7ljikwf4a-unix-lib-unix-2.7.2.2.drv'.

This is a bug I introduced in #1775. I adjusted the package builder to use the cabal file directly from the cabal plan (to support revisions) but I didn't consider that stackage snapshots (from stackage.nix) can only get the cabal file revisions from hackage.nix (since cabal is not involved in making the plan).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions