Hi Sergey,

> Instead, per-compiler-version package sets are (re-)introduced, which
> are mostly Hackage-oriented.

FWIW, the compiler-specific package sets have existed for several years,
and they still do. The LTS-Haskell package sets, however, have been

> So compiling Haskell projects is still possible, as long as .cabal
> files are provided.

I'm not sure what you mean. Nix can compile Haskell packages using a
*Nix* file, it doesn't know about Cabal.

> Stack provides 'hpack' tool which is in fact a .yaml parser, a
> replacement for good old .cabals.

Actually, hpack is a tool that generates Cabal files from simple YAML
input. Stack supports that set transparently, but the build is still
driven by Cabal, of course.

> I am to package Stack project which
>   1) depends on old lts-2.21 package set from stackage
>   2) doesn't have .cabals anymore, only .yamls.
> The question is basically How to do it?

Run "hpack" to generate the Cabal files. Then run "cabal2nix" to
generate the Nix files. Add those Nix builds to Nixpkgs as explained in
the user's manual at:


You will also have to package older versions of other libraries to be
able to build your project, though, because Nixpkgs has moved to LTS 7.3
meanwhile, so many packages suggested by LTS 2.x don't exist in the
default package set any more.

Best regards,

nix-dev mailing list

Reply via email to