on iko/ghcjs-patch-master help sign in
Updated the haskell.nix imports to overlay style (#357)
7874debToon Nolten
docs/user-guide/cabal-projects.md+3−1
@@ -81,7 +81,9 @@ instantiate a package set.
81# default.nix
81# default.nix
82let
82let
83 # Import the Haskell.nix library,
83 # Import the Haskell.nix library,
84− haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
84+ src = builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz;
85+ nixpkgs = import (src + "/nixpkgs") (import src);
86+ haskell = nixpkgs.haskell-nix;
85
87
86 # Instantiate a package set using the generated file.
88 # Instantiate a package set using the generated file.
87 pkgSet = haskell.mkCabalProjectPkgSet {
89 pkgSet = haskell.mkCabalProjectPkgSet {
docs/user-guide/development.md+6−2
@@ -108,7 +108,9 @@ selects packages from the larger package set.
108```nix
108```nix
109# shell.nix
109# shell.nix
110let
110let
111− haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
111+ src = builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz;
112+ nixpkgs = import (src + "/nixpkgs") (import src);
113+ haskell = nixpkgs.haskell-nix;
112in
114in
113 haskell.haskellPackages.ghcWithPackages (ps: with ps;
115 haskell.haskellPackages.ghcWithPackages (ps: with ps;
114 [ lens conduit conduit-extra ])
116 [ lens conduit conduit-extra ])
@@ -125,7 +127,9 @@ project.
125
127
126```nix
128```nix
127let
129let
128− haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
130+ src = builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz;
131+ nixpkgs = import (src + "/nixpkgs") (import src);
132+ haskell = nixpkgs.haskell-nix;
129in
133in
130 haskell.snapshots."lts-13.18".alex.components.exes.alex
134 haskell.snapshots."lts-13.18".alex.components.exes.alex
131```
135```
docs/user-guide/stack-projects.md+3−1
@@ -43,7 +43,9 @@ instantiate a package set.
43# default.nix
43# default.nix
44let
44let
45 # Import the Haskell.nix library,
45 # Import the Haskell.nix library,
46− haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
46+ src = builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz;
47+ nixpkgs = import (src + "/nixpkgs") (import src);
48+ haskell = nixpkgs.haskell-nix;
47
49
48 # Instantiate a package set using the generated file.
50 # Instantiate a package set using the generated file.
49 pkgSet = haskell.mkStackPkgSet {
51 pkgSet = haskell.mkStackPkgSet {