[Nix-dev] stack2nix first public release (0.1.3.0)

Domen Kožar domen at dev.si
Wed Jun 28 16:37:18 CEST 2017


Hi all,

I have just pushed to nixpkgs master `stack2nix` package that was developed
at IOHK
with the purpose of automating package set curated by stack tool into Nix
expressions.

Quick start (using latest master branch) using pandoc:

  $(nix-build -A stack2nix)/bin/stack2nix --revision
242e2a064f6a32b22e1599bbfe72e64d7b6203b8 https://github.com/jgm/pandoc.git
> demo.nix
  nix-build -A pandoc demo.nix -I nixpkgs=`pwd`

How does stack2nix work? It uses cabal2nix under the hood based on package
list returned by `stack list-dependencies` output.

Note that calling stack2nix is impure, it will call "git clone",
"cabal2nix", "cabal update", etc., so
ideally when used with a CI, one needs to verify that the returned package
set is always up to date.

Note that since different Nix packages are generated than what is shipped
with nixpkgs, there is no binary cache.

Source code & issues: https://github.com/input-output-hk/stack2nix

The work was mostly done by Jake Mitchell.

Domen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170628/70efcb04/attachment.html>


More information about the nix-dev mailing list