git.iko.soy/typeable/cabal2nix
on master help sign in
hackage2nix.hs: cosmetic
commitce022d56fc6de71ee3b432ce34c98ac302848f74 authorPeter Simons <simons@cryp.to> dateWed 28 Jan 2015, 23:21 (12 years ago) parent7d44913
1 file changed+20
src/hackage2nix.hs+20
src/hackage2nix.hs+20
@@ -2,6 +2,26 @@
22
33module Main ( main ) where
44
5+{-
6+ I use the following shell script to re-build "hackage-packages.nix":
7+
8+ | #! /bin/sh
9+ |
10+ | set -eu -o pipefail
11+ |
12+ | cd ~/src/cabal2nix
13+ | make --quiet cabal2nix.cabal
14+ | cabal build -j hackage2nix
15+ | time dist/build/hackage2nix/hackage2nix >hackage-packages.nix
16+ | mv hackage-packages.nix ~/.nix-defexpr/pkgs/development/haskell-modules/hackage-packages.nix
17+ | nix-env -qaP -A haskellngPackages | tail -1
18+
19+ Make sure that "nix-env -qaP" shows the top-level Nixpkgs attributes at the
20+ top level, i.e. without any prefix like "nixos.pkgs". Otherwise, the code
21+ that resolver in Distribution/Nixpkgs/PackageMap.hs will produce bogus
22+ results.
23+-}
24+
525-- Run: cabal build -j hackage2nix && time dist/build/hackage2nix/hackage2nix >hackage-packages.nix && mv hackage-packages.nix ~/.nix-defexpr/pkgs/development/haskell-modules/hackage-packages.nix && nix-env -qaP -A haskellngPackages | tail -1
626
727import Cabal2Nix.Flags ( configureCabalFlags )