-
Notifications
You must be signed in to change notification settings - Fork 24
/
release.nix
38 lines (34 loc) · 1.49 KB
/
release.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ checkMaterialization ? false }:
let
sources = {
haskellNix = builtins.fetchTarball {
name = "haskell-nix-snap";
url = "https://github.com/input-output-hk/haskell.nix/archive/a7f031ac146666657824f3c4603bf87d3507c1a6.tar.gz";
sha256 = "1p4rrq2apw2lnswj6km7ni9zc6gvr1ly03pkparyjslmcf5d57n4";
};
};
haskellNix = import sources.haskellNix { };
# Import nixpkgs and pass the haskell.nix provided nixpkgsArgs
pkgs = import
# haskell.nix provides access to the nixpkgs pins which are used by our CI,
# hence you will be more likely to get cache hits when using these.
# But you can also just use your own, e.g. '<nixpkgs>'.
haskellNix.sources.nixpkgs-unstable
# These arguments passed to nixpkgs, include some patches and also
# the haskell.nix functionality itself as an overlay.
haskellNix.nixpkgsArgs;
ignoredPaths = ["tests" "docs" "run-tests.sh" ".github"];
in pkgs.haskell-nix.stackProject {
# 'cleanGit' cleans a source directory based on the files known by git
src = pkgs.lib.cleanSourceWith {
src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "NGLess";
src = ./.;
};
# ignore paths that change frequently, but do not contribute to the result
filter = path: type: let baseName = baseNameOf (toString path); in !(pkgs.lib.elem baseName ignoredPaths);
};
materialized = ./build-scripts/release.materialized;
stack-sha256 = "12zp3w2mpcv2fx5h631nxpi2m0fzrxi3pn1b916b0vlbyglk71y6";
inherit checkMaterialization;
}