diff --git a/docs/user-guide/cabal-projects.md b/docs/user-guide/cabal-projects.md index 9a15362348..00431b4281 100644 --- a/docs/user-guide/cabal-projects.md +++ b/docs/user-guide/cabal-projects.md @@ -81,7 +81,9 @@ instantiate a package set. # default.nix let # Import the Haskell.nix library, - haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {}; + src = builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz; + nixpkgs = import (src + "/nixpkgs") (import src); + haskell = nixpkgs.haskell-nix; # Instantiate a package set using the generated file. pkgSet = haskell.mkCabalProjectPkgSet { diff --git a/docs/user-guide/development.md b/docs/user-guide/development.md index 4aa3244eed..03aea45187 100644 --- a/docs/user-guide/development.md +++ b/docs/user-guide/development.md @@ -108,7 +108,9 @@ selects packages from the larger package set. ```nix # shell.nix let - haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {}; + src = builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz; + nixpkgs = import (src + "/nixpkgs") (import src); + haskell = nixpkgs.haskell-nix; in haskell.haskellPackages.ghcWithPackages (ps: with ps; [ lens conduit conduit-extra ]) @@ -125,7 +127,9 @@ project. ```nix let - haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {}; + src = builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz; + nixpkgs = import (src + "/nixpkgs") (import src); + haskell = nixpkgs.haskell-nix; in haskell.snapshots."lts-13.18".alex.components.exes.alex ``` diff --git a/docs/user-guide/stack-projects.md b/docs/user-guide/stack-projects.md index 6e8711ca60..b93573ec0f 100644 --- a/docs/user-guide/stack-projects.md +++ b/docs/user-guide/stack-projects.md @@ -43,7 +43,9 @@ instantiate a package set. # default.nix let # Import the Haskell.nix library, - haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {}; + src = builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz; + nixpkgs = import (src + "/nixpkgs") (import src); + haskell = nixpkgs.haskell-nix; # Instantiate a package set using the generated file. pkgSet = haskell.mkStackPkgSet {