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

Haskell.nix cannot build stackage packages #1857

Closed
andreabedini opened this issue Feb 23, 2023 · 0 comments
Closed

Haskell.nix cannot build stackage packages #1857

andreabedini opened this issue Feb 23, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@andreabedini
Copy link
Member

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).

@andreabedini andreabedini added the bug Something isn't working label Feb 23, 2023
dhess added a commit to hackworthltd/primer that referenced this issue Feb 23, 2023
Note that the new `haskell.nix` pin necessitates the following
additional changes:

* We switch temporarily to our own `haskell.nix` fork, as recent
versions no longer work with `nixpkgs`'s NixOS test framework. See
input-output-hk/haskell.nix#1859.

* We include a workaround for
input-output-hk/haskell.nix#1857 (which
itself is a workaround for
input-output-hk/haskell.nix#839).

* We no longer need the `hostPkgs` hack to make the NixOS tests build.

* We need to bump the NixOS VM disk size, as it's no longer large
enough to build the `primer-service` Docker image.
@andreabedini andreabedini self-assigned this Feb 24, 2023
andreabedini added a commit to andreabedini/haskell.nix that referenced this issue Feb 24, 2023
andreabedini added a commit to andreabedini/haskell.nix that referenced this issue Feb 24, 2023
andreabedini added a commit to andreabedini/haskell.nix that referenced this issue Mar 10, 2023
angerman pushed a commit to andreabedini/haskell.nix that referenced this issue Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant