$ nix-env -iA hakyll
$ hakyll-init .
$ stack init
$ stack build
which triggers this error (zlib header missing):
====
Progress 4/130
-- While building custom Setup.hs for package digest-0.0.1.2 using:
/home/teto/.stack/setup-exe-cache/x86_64-linux-nix/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1 configure --with-ghc=/nix/store/yc8an71h8cah8w6fw0xykjxl68a8j1h7-ghc-8.4.3/bin/ghc --with-ghc-pkg=/nix/store/yc8an71h8cah8w6fw0xykjxl68a8j1h7-ghc-8.4.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/teto/.stack/snapshots/x86_64-linux-nix/lts-12.5/8.4.3/pkgdb --libdir=/home/teto/.stack/snapshots/x86_64-linux-nix/lts-12.5/8.4.3/lib --bindir=/home/teto/.stack/snapshots/x86_64-linux-nix/lts-12.5/8.4.3/bin --datadir=/home/teto/.stack/snapshots/x86_64-linux-nix/lts-12.5/8.4.3/share --libexecdir=/home/teto/.stack/snapshots/x86_64-linux-nix/lts-12.5/8.4.3/libexec --sysconfdir=/home/teto/.stack/snapshots/x86_64-linux-nix/lts-12.5/8.4.3/etc --docdir=/home/teto/.stack/snapshots/x86_64-linux-nix/lts-12.5/8.4.3/doc/digest-0.0.1.2 --htmldir=/home/teto/.stack/snapshots/x86_64-linux-nix/lts-12.5/8.4.3/doc/digest-0.0.1.2 --haddockdir=/home/teto/.stack/snapshots/x86_64-linux-nix/lts-12.5/8.4.3/doc/digest-0.0.1.2 --dependency=base=base-4.11.1.0 --dependency=bytestring=bytestring-0.10.8.2 --extra-include-dirs=/nix/store/5ns818rvg3viqcmd908s889q4z94cbnv-git-2.18.0/include --extra-include-dirs=/nix/store/hfb8mwwdacrdr25y1d1hila5f678x0a7-gmp-6.1.2-dev/include --extra-include-dirs=/nix/store/wkfafgwgs1na5f808wybs8l6v8yjrvqz-gcc-wrapper-7.3.0/include --extra-include-dirs=/nix/store/yc8an71h8cah8w6fw0xykjxl68a8j1h7-ghc-8.4.3/include --extra-lib-dirs=/nix/store/5ns818rvg3viqcmd908s889q4z94cbnv-git-2.18.0/lib --extra-lib-dirs=/nix/store/bi9nx8f8kl8apgd544hkx2dsvlvr4zix-gmp-6.1.2/lib --extra-lib-dirs=/nix/store/wkfafgwgs1na5f808wybs8l6v8yjrvqz-gcc-wrapper-7.3.0/lib --extra-lib-dirs=/nix/store/yc8an71h8cah8w6fw0xykjxl68a8j1h7-ghc-8.4.3/lib
Process exited with code: ExitFailure 1
Logs have been written to: /home/teto/blog_hakyll/.stack-work/logs/digest-0.0.1.2.log
Configuring digest-0.0.1.2...
Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3: Missing dependency on a foreign
library:
* Missing (or bad) header file: zlib.h
* Missing (or bad) C library: z
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
===
Could this be an error in the packaging ? stack says it is in nix compatible mode so it should be able to install the
zlib.dev package.
Cheers