Skip to content

Commit e814e33

Browse files
committed
Add mkStackSnapshotPkgSet
This function is convenient to use with shellFor
1 parent 5273d11 commit e814e33

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

default.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ let
8888
modules = [ patchesModule ] ++ modules;
8989
};
9090

91+
# Create a package set based on a Stackage snapshot.
92+
mkStackSnapshotPkgSet =
93+
{ resolver # name of the snapshot, e.g. lts-13.18
94+
, pkg-def-extras ? []
95+
, modules ? []
96+
}@args:
97+
self.mkStackPkgSet {
98+
stack-pkgs = {
99+
extras = _: {};
100+
inherit resolver;
101+
};
102+
inherit pkg-def-extras modules;
103+
};
104+
91105
# Create a Haskell package set based on a Cabal configuration.
92106
mkCabalProjectPkgSet =
93107
{ plan-pkgs # Path to the output of plan-to-nix

0 commit comments

Comments
 (0)