1# Find the resolver in the stack.yaml file and fetch it if a sha256 value is provided
4, stackYaml ? "stack.yaml"
8 # Using origSrcSubDir bypasses any cleanSourceWith so that it will work when
9 # access to the store is restricted. If origSrc was already in the store
10 # you can pass the project in as a string.
11 rawStackYaml = builtins.readFile ((src.origSrcSubDir or src) + ("/" + stackYaml));
13 # Determine the resolver as it may point to another file we need
17 rs = pkgs.lib.lists.concatLists (
18 pkgs.lib.lists.filter (l: l != null)
19 (builtins.map (l: builtins.match "^resolver: *(.*)" l)
20 (pkgs.lib.splitString "\n" rawStackYaml)));
22 pkgs.lib.lists.head (rs ++ [ null ]);
24 # If we found a resolver and we have a resolverSha256 then we should download it.
26 if resolver != null && resolverSha256 != null
29 sha256 = resolverSha256;
33in { inherit resolver fetchedResolver; }
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list