@@ -212,17 +212,13 @@ let
212212 sources = [ hackageSrc stackageSrc pkgs.path ];
213213 };
214214
215− # Utility
216− stackage-lts-set = lts:
217− assert (if !(pkgs.lib.hasPrefix "lts-" lts || pkgs.lib.hasPrefix "nightly-" lts) then throw "argument to stackage-lts-set needs to start with either lts- or nightly-!" else true);
218− let src = buildPackages.pkgs.runCommand "stackage-${lts}-set-src" { nativeBuildInputs = [ buildPackages.nix-tools ]; } ''
219− mkdir -p $out
220− echo "resolver: ${lts}" > $out/stack.yaml
221− '';
222− in let stack-pkgs = import (callStackToNix { inherit src; });
223− in let pkg-set = mkStackPkgSet { inherit stack-pkgs; };
224− in pkg-set.config.hsPkgs;
225−
215+ # Build a specific package (name, version) against a given index-stage
216+ # from hackage. This is useful if you want to build an executable from
217+ # a given package.
218+ # NB: If no explicit index-state is provided the most recent one from
219+ # the index-state-hashes is used. This guarantees reproducability wrt
220+ # to the haskell.nix revision. If reproducability beyond haskell.nix
221+ # is required, a specific index-state should be provided!
226222 hackage-package =
227223 { name
228224 , version