git.iko.soy/typeable/cabal2nix
on v2.13 help sign in
33 lines 1.2 kB history raw
1# Hackage2nix
3This tool is used to update the `hackage-packages.nix` file in the nixpkgs repo.
4Most of the time we will not need run this manually (since it is run automatically
5on the upstream nixpkgs). The cases when we would need to run this manually are:
7* We have changed hackage2nix in some way and we want to check that it
8behaves correctly.
10* We have a fork of nixpkgs where we have added or changed
11the name or location in nixpkgs of a native package used by a hackage package
12and we want to check that hackage-packages.nix will be updated correctly.
14**Important:** this must be run on a **case sensitive file system**.
15On 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).
18#### Setup
19Replace `git@github.com:NixOS/nixpkgs.git` with a fork you have access to.
20```
21git clone git@github.com:NixOS/cabal2nix.git
22cd cabal2nix
23git clone git@github.com:NixOS/nixpkgs.git
24git clone git@github.com:commercialhaskell/all-cabal-hashes.git --branch hackage hackage
25cabal install
26```
28#### Running Hackage2nix
29Runs hackage2nix and pushes a commit with the updated `hackage-packages.nix`
30file to your fork of `nixpkgs`.
31```
32./update-nixpkgs.sh
33```