-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.nix
34 lines (30 loc) · 1.29 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
let
sources = {
haskellNix = builtins.fetchTarball {
name = "haskell-nix-snap";
url = "https://github.com/input-output-hk/haskell.nix/archive/c6a5afba7e259e9908f9dc56ce711173cda4549b.tar.gz";
sha256 = "0g58zvyqd47c1y2w84qbf1x29yp4pfdz2gqligvgn1jlx972i53n";
};
};
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 = ["docs" ".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 = "interval-int-map";
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);
};
}