2017-06-28 14:37:18 UTC
I have just pushed to nixpkgs master `stack2nix` package that was developed
with the purpose of automating package set curated by stack tool into Nix
Quick start (using latest master branch) using pandoc:
$(nix-build -A stack2nix)/bin/stack2nix --revision
demo.nixnix-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.