nixpacks: Problems with zlib in a haskell project

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I’m trying to deploy a fairly straightforward haskell (servant project).

I’ve specified zlib and zlib.dev in --pkgs but I’m still running into:

#12 119.8
#12 119.8 --  While building package zlib-0.6.2.1 (scroll up to its section to see the error) using:
 
#12 119.8       /root/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1 configure --with-ghc=/root/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/bin/ghc-8.6.5 --with-ghc-pkg=/root/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/bin/ghc-pkg-8.6.5 --user --package-db=clear --package-db=global --package-db=/root/.stack/snapshots/x86_64-linux-tinfo6/1d8d3d2d1848c85724a4602c53666fa3959874eda6c0f7830bd85ea082eb5f39/8.6.5/pkgdb --libdir=/root/.stack/snapshots/x86_64-linux-tinfo6/1d8d3d2d1848c85724a4602c53666fa3959874eda6c0f7830bd85ea082eb5f39/8.6.5/lib --bindir=/root/.stack/snapshots/x86_64-linux-tinfo6/1d8d3d2d1848c85724a4602c53666fa3959874eda6c0f7830bd85ea082eb5f39/8.6.5/bin --datadir=/root/.stack/snapshots/x86_64-linux-tinfo6/1d8d3d2d1848c85724a4602c53666fa3959874eda6c0f7830bd85ea082eb5f39/8.6.5/share --libexecdir=/root/.stack/snapshots/x86_64-linux-tinfo6/1d8d3d2d1848c85724a4602c53666fa3959874eda6c0f7830bd85ea082eb5f39/8.6.5/libexec --sysconfdir=/root/.stack/snapshots/x86_64-linux-tinfo6/1d8d3d2d1848c85724a4602c53666fa3959874eda6c0f7830bd85ea082eb5f39/8.6.5/etc --docdir=/root/.stack/snapshots/x86_64-linux-tinfo6/1d8d3d2d1848c85724a4602c53666fa3959874eda6c0f7830bd85ea082eb5f39/8.6.5/doc/zlib-0.6.2.1 --htmldir=/root/.stack/snapshots/x86_64-linux-tinfo6/1d8d3d2d1848c85724a4602c53666fa3959874eda6c0f7830bd85ea082eb5f39/8.6.5/doc/zlib-0.6.2.1 --haddockdir=/root/.stack/snapshots/x86_64-linux-tinfo6/1d8d3d2d1848c85724a4602c53666fa3959874eda6c0f7830bd85ea082eb5f39/8.6.5/doc/zlib-0.6.2.1 --dependency=base=base-4.12.0.0 --dependency=bytestring=bytestring-0.10.8.2 -f-non-blocking-ffi -f-pkg-config --exact-configuration --ghc-option=-fhide-source-paths
#12 119.8     Process exited with code: ExitFailure 1
 
#12 ERROR: executor failed running [/bin/bash -ol pipefail -c stack build]: exit code: 1
-----
> [8/9] RUN  stack build:
-----
executor failed running [/bin/bash -ol pipefail -c stack build]: exit code: 1
 
Error: Docker build failed

To reproduce

I would guess this should reproduce with most haskell project (zlib is a common pain).

I will try to repro and fix in vanilla nix locally.

Expected behavior

I would have expected the stack build to succeed.

Environment

Local:

Ubuntu

❯ nixpacks --version
nixpacks 0.0.17

Railway project ID is 042095d5-6077-432c-ac60-351f0dffc072/service/267f19e6-9a03-428f-ab79-2f2beace373f

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (10 by maintainers)

Most upvoted comments

Yes I would say so

I can make this change then 😄

I guess I could set NIXPACKS_INSTALL_CACHE_DIRS myself right?

Ya for sure! NIXPACKS_BUILD_CACHE_DIRS can also be used for build specific caches.