no description only meoww


I have been meaning to get these off my disk and posted, so here they are. In this release, I've posted two libraries:

nix2cabal.nix

Ever think "cabal2nix is cool but what if you could turn nix into cabal"? This is an experimental script to generate Cabal project files that should reproduce the package set that a Nix Haskell environment sees, by introspecting what the build of some derivation sees.

examples/nix2cabal » nix build .#cabalProject.x86_64-linux
examples/nix2cabal » cat result
source-repository-package
  type: git
  location: https://github.com/gabriella439/haskell-pipes-library.git
  tag: 3997b02a5e226b5ba2eba347cb34616bdf76b596

constraints:
  vector ==0.12.3.1

I'm not fully confident that it is perfect; it may not grab transitive dependencies correctly yet? That would be a pretty easy fix in any case. I'm taking a break from this for now, but PRs are welcome on it.

some-cabal-hashes.nix

An efficient way to generate an overlay overriding several Haskell package versions at once, which is an order of magnitude or two faster than callHackage (it saved minutes of Nix sitting on its hands when I deployed a previous version of it at work).

Code!


You must log in to comment.