stackage2nix icon indicating copy to clipboard operation
stackage2nix copied to clipboard

Support new stack syntax

Open nc6 opened this issue 8 years ago • 4 comments

Stack is adding new syntax, which should actually be somewhat nicer (and in particular allows pinning of cabal revision). See https://www.fpcomplete.com/blog/2017/07/stacks-new-extensible-snapshots for details.

nc6 avatar Aug 18 '17 14:08 nc6

Hi, today I've been bitten by this too, and I can't find any workarounds. Seems like the latest stack doesn't use (i.e. use them as dependencies) the git repositories under the packages section, so I have to add them to the extra-deps section using the new syntax. But then stackage2nix complains about it. I couldn't come up with a stack.yaml file that pleases both stack and stackage2nix. Am I missing an obvious workaround?

enobayram avatar Mar 07 '18 04:03 enobayram

If yaml format has changed, I don't see a workaround for this issue. The version of the stack binary I am currently using still supports the old format, so maybe you can temporarily switch back to this version:

stack --version
Version 1.6.5, Git revision 24ab0d6ff07f28276e082c3ce74dfdeb1a2ca9e9 (5514 commits) x86_64 hpack-0.20.0

I'll see what has been changed. Ideally, I would like stackage2nix support both formats.

I'll put this issue on the stack (pun intended)

4e6 avatar Mar 07 '18 18:03 4e6

Awesome, thanks

enobayram avatar Mar 09 '18 07:03 enobayram

TODO:

  • Custom snapshots.
    • [ ] Generate Stackage from a snapshot config file
    • [ ] --resolver arg should accept a path to yaml config with a custom Stackage snapshot
    • [ ] resolver in a stack.yaml file should also support a path to yaml config
  • support new package definition
    • [ ] acme-missiles-0.3@sha256:2ba66a092
    • [ ] acme-missiles-0.3@rev:0
    • [x] (#56) archive: url with subdirs
    • [x] (#55) packages and extra-deps sections in stack.yaml should support all package formats
  • can we support package-indices other than Hackage?

4e6 avatar Mar 11 '18 19:03 4e6