Skip to content

Updated the haskell.nix imports to overlay style #357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/user-guide/cabal-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 6 additions & 2 deletions docs/user-guide/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ])
Expand All @@ -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
```
Expand Down
4 changes: 3 additions & 1 deletion docs/user-guide/stack-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down