on master help sign in
haskell.nix/default.nix
29 lines 1.3 kB history raw
1{...}@args:
3let
4 nixpkgsSrc =
5 builtins.fetchTarball {
6 url = "https://github.com/NixOS/nixpkgs/archive/110a2c9ebbf5d4a94486854f18a37a938cfacbbb.tar.gz";
7 sha256 = "sha256-leWXLchbAbqOlLT6tju631G40SzQWPqaAXQG3zH1Imw=";
8 };
9 pkgs = args.pkgs or (import nixpkgsSrc {});
10 flake-compat =
11 pkgs.fetchzip {
12 url = "https://github.com/edolstra/flake-compat/archive/5523c47f13259b981c49b26e28499724a5125fd8.tar.gz";
13 sha256 = "sha256-7IySNHriQjzOZ88DDk6VDPf1GoUaOrOeUdukY62o52o=";
14 };
15 self = import flake-compat {
16 # We bypass flake-compat's rootSrc cleaning by evading its detection of this as a git
17 # repo.
18 # This is done for 3 reasons:
19 # * To workaround https://github.com/edolstra/flake-compat/issues/25
20 # * Make `updateMaterilized` scripts work (if filtering is done by `flake-compat`
21 # the `updateMaterilized` scripts will try to update the copy in the store).
22 # * Allow more granular filtering done by the tests (the use of `cleanGit` and `cleanSourceWith`
23 # in `test/default.nix`). If `flake-compat` copies the whole git repo, any change to the
24 # repo causes a change of input for all tests.
25 src = { outPath = ./.; };
26 inherit pkgs;
27 };
28in self.defaultNix // (self.defaultNix.internal.compat
29({ system = args.pkgs.system or builtins.currentSystem; } // args))