Skip to content

Commit b943bca

Browse files
authored
Update building-package-from-stackage-hackage.md (#1789)
1 parent a256503 commit b943bca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/tutorials/building-package-from-stackage-hackage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
To build a package, say [lens][], from a Stackage snapshot, say
77
[lts-13.28][], you could run:
88
```shell
9-
nix build '(with import <nixpkgs> (import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}).nixpkgsArgs; haskell-nix.snapshots."lts-13.28").lens.components.library'
9+
nix-build -E '(with import <nixpkgs> (import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}).nixpkgsArgs; haskell-nix.snapshots."lts-13.28").lens.components.library'
1010
```
1111
This would build the (public) library component of the [lens][] package as
1212
fixed by the [lts-13.28][] stackage snapshot. Nightly snapshots like
@@ -17,7 +17,7 @@ fixed by the [lts-13.28][] stackage snapshot. Nightly snapshots like
1717
To build any package from hackage, say [lens][], at any version, say 4.17.1,
1818
you could run:
1919
```shell
20-
nix build '(with import <nixpkgs> (import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}).nixpkgsArgs; (haskell-nix.hackage-package { name = "lens"; version = "4.17.1"; compiler-nix-name = "ghc8102"; })).components.library'
20+
nix-build -E '(with import <nixpkgs> (import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}).nixpkgsArgs; (haskell-nix.hackage-package { name = "lens"; version = "4.17.1"; compiler-nix-name = "ghc8102"; })).components.library'
2121
```
2222
This would build the (public) library component of the [lens-4.17.1][] package
2323
from hackage.
@@ -28,7 +28,7 @@ The dependencies would be resolved against the most recent
2828
[hackage-index-state][] which comes with your [haskell.nix][] checkout via the
2929
[hackage.nix][] pin. A specific one can be specified as well:
3030
```shell
31-
nix build '(with import <nixpkgs> (import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}).nixpkgsArgs; (haskell-nix.hackage-package { name = "lens"; version = "4.17.1"; compiler-nix-name = "ghc8102"; index-state = "2019-07-14T00:00:00Z"; })).components.library'
31+
nix-build -E '(with import <nixpkgs> (import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}).nixpkgsArgs; (haskell-nix.hackage-package { name = "lens"; version = "4.17.1"; compiler-nix-name = "ghc8102"; index-state = "2019-07-14T00:00:00Z"; })).components.library'
3232
```
3333
This would use the hackage index as of `2019-07-14T00:00:00Z` to produce a
3434
build plan for the [lens-4.17.1][] package.

0 commit comments

Comments
 (0)