git.iko.soy/typeable/cabal2nix
on master help sign in
README.md for hackage2nix
commite8ad79ece534868fa71148ec0b7f77c8c9caed28 authorHamish Mackenzie <Hamish.K.Mackenzie@googlemail.com> dateTue 11 Apr 2017, 15:37 (10 years ago) parent9e55aab
1 file changed+34
hackage2nix/README.md+34
hackage2nix/README.mdnew file+34
@@ -0,0 +1,34 @@
1+# Hackage2nix
2+
3+This tool is used to update the `hackage-packages.nix` file in the nixpkgs repo.
4+Most of the time we will not need run this manually (since it is run automatically
5+on the upstream nixpkgs). The cases when we would need to run this manually are:
6+
7+* We have changed hackage2nix in some way and we want to check that it
8+behaves correctly.
9+
10+* We have a fork of nixpkgs where we have added or changed
11+the name or location in nixpkgs of a native package used by a hackage package
12+and we want to check that hackage-packages.nix will be updated correctly.
13+
14+**Important:** this must be run on a **case sensitive file system**.
15+On macOS you can use [this](https://gist.github.com/dixson3/8360571) to create one
16+(you can replace 60g with 4g as that should be plenty).
17+
18+#### Setup
19+Replace `git@github.com:NixOS/nixpkgs.git` with a fork you have access to.
20+```
21+git clone git@github.com:NixOS/cabal2nix.git
22+cd cabal2nix
23+git clone git@github.com:NixOS/nixpkgs.git
24+git clone git@github.com:commercialhaskell/all-cabal-hashes.git
25+mv all-cabal-hashes hackage
26+cabal install
27+```
28+
29+#### Running Hackage2nix
30+This will run hackage2nix and push a commit with the updated `hackage-packages.nix`
31+file to your fork of `nixpkgs`.
32+```
33+./update-nixpkgs.sh
34+```