cabal2nix: Convert Cabal files into Nix build instructions
This utility converts Cabal files into Nix build instructions. The commandline syntax is:
cabal2nix cabal-file-uri [sha256-hash]
The first argument is the path to the cabal file. That path can be an HTTP URL or local file path. For example:
cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.5/cabal2nix.cabal cabal2nix file:///tmp/cabal2nix.cabal 0m7zgsd1pxmw504xpvl7dg25ana6dkk1mcyjj4c1wdbkvhvbn3gn cabal2nix /tmp/cabal2nix.cabal 0m7zgsd1pxmw504xpvl7dg25ana6dkk1mcyjj4c1wdbkvhvbn3gn
The second argument -- the hash of the source
tarball -- is optional. If it's not specified,
cabal2nix calls nix-prefetch-url
to determine
the hash automatically. This causes network
traffic, obviously.
Downloads
- cabal2nix-1.5.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates