3## [iohk-nix](https://github.com/input-output-hk/iohk-nix)
5iohk-nix is IOHK's shared nix library. It provides some templates to
6make working with haskell.nix trivial but is non-essential to use
7haskell.nix infrastructure.
12 # iohk-nix can be overridden for debugging purposes by setting
13 # NIX_PATH=iohk_nix=/path/to/iohk-nix
15 let try = builtins.tryEval <iohk_nix>;
17 then builtins.trace "using host <iohk_nix>" try.value
20 spec = builtins.fromJSON (builtins.readFile ./iohk-nix.json);
21 in builtins.fetchTarball {
22 url = "${spec.url}/archive/${spec.rev}.tar.gz";
23 inherit (spec) sha256;
28in lib // { inherit iohkNix pkgs; inherit (iohkNix) nix-tools; }
34 "url": "https://github.com/input-output-hk/iohk-nix",
35 "rev": "c92f0119ef5814b0ed1f445c2fdcf8894e326294",
36 "sha256": "05r90x6x3yp1nb66rkc4n0i8q15c634rrdsr2zvb118s3sdcmmrm",
37 "fetchSubmodules": false
43{ pkgs ? import <nixpkgs> {}
53 stack-pkgs = import ./.stack-pkgs.nix;
55 # Build the packageset with module support.
56 # We can essentially override anything in the modules
59 # packages.cbors.patches = [ ./one.patch ];
60 # packages.cbors.flags.optimize-gmp = false;
62 compiler = (stack-pkgs.extras hackage).compiler.nix-name;
63 pkgSet = haskell.mkNewPkgSet {
65 pkg-def = stackage.${stack-pkgs.resolver};
66 # These extras allow extension or restriction of the set of
67 # packages we are interested in. By using the stack-pkgs.extras
68 # we restrict our package set to the ones provided in stack.yaml.
71 iohk-extras.${compiler}
73 # package customizations
75 # This module will ensure that we get the necessary
76 # patches ontop of GHC packages that for which the
77 # ones that GHC ships are not identical to the ones
78 # we find on hackage. These patches will make sure
79 # they are identical by augmenting the packages on
80 # hackage to match those that ship with ghc.
81 haskell.ghcHackagePatches.${compiler}
83 # the iohk-module will supply us with the necessary
84 # cross compilation plumbing to make Template Haskell
85 # work when cross compiling. For now we need to
86 # list the packages that require template haskell
92 pkgSet.config.hsPkgs // { _config = pkgSet.config; }
99 localLib = import ./lib.nix;
101# This file needs to export a function that takes
102# the arguments it is passed and forwards them to
103# the default-nix template from iohk-nix. This is
104# important so that the release.nix file can properly
105# parameterize this file when targetting different
108# We will instantiate the defaul-nix template with the
109# nix/pkgs.nix file...
110localLib.nix-tools.default-nix ./nix/pkgs.nix args
111# ... and add a few custom packages as well.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list