1{ testers, fetchgit, ... }:
2{
3 simple = testers.invalidateFetcherByDrvHash fetchgit {
4 name = "simple-nix-source";
5 url = "https://github.com/NixOS/nix";
6 rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
7 sha256 = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
8 };
9
10 sparseCheckout = testers.invalidateFetcherByDrvHash fetchgit {
11 name = "sparse-checkout-nix-source";
12 url = "https://github.com/NixOS/nix";
13 rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
14 sparseCheckout = [
15 "src"
16 "tests"
17 ];
18 sha256 = "sha256-g1PHGTWgAcd/+sXHo1o6AjVWCvC6HiocOfMbMh873LQ=";
19 };
20
21 sparseCheckoutNonConeMode = testers.invalidateFetcherByDrvHash fetchgit {
22 name = "sparse-checkout-non-cone-nix-source";
23 url = "https://github.com/NixOS/nix";
24 rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
25 sparseCheckout = [
26 "src"
27 "tests"
28 ];
29 nonConeMode = true;
30 sha256 = "sha256-FknO6C/PSnMPfhUqObD4vsW4PhkwdmPa9blNzcNvJQ4=";
31 };
32
33 leave-git = testers.invalidateFetcherByDrvHash fetchgit {
34 name = "leave-git-nix-source";
35 url = "https://github.com/NixOS/nix";
36 rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
37 sha256 = "sha256-VmQ38+lr+rNPaTnjjV41uC2XSN4fkfZAfytE2uKyLfo=";
38 leaveDotGit = true;
39 };
40
41 submodule-simple = testers.invalidateFetcherByDrvHash fetchgit {
42 name = "submodule-simple-source";
43 url = "https://github.com/pineapplehunter/nix-test-repo-with-submodule";
44 rev = "26473335b84ead88ee0a3b649b1c7fa4a91cfd4a";
45 sha256 = "sha256-rmP8PQT0wJBopdtr/hsB7Y/L1G+ZPdHC2r9LB05Qrj4=";
46 fetchSubmodules = true;
47 };
48
49 submodule-leave-git = testers.invalidateFetcherByDrvHash fetchgit {
50 name = "submodule-leave-git-source";
51 url = "https://github.com/pineapplehunter/nix-test-repo-with-submodule";
52 rev = "26473335b84ead88ee0a3b649b1c7fa4a91cfd4a";
53 sha256 = "sha256-EC2PMEEtA7f5OFdsluHn7pi4QXhCZuFML8tib4pV7Ek=";
54 leaveDotGit = true;
55 fetchSubmodules = true;
56 };
57
58 submodule-deep = testers.invalidateFetcherByDrvHash fetchgit {
59 name = "submodule-deep-source";
60 url = "https://github.com/pineapplehunter/nix-test-repo-with-submodule";
61 rev = "26473335b84ead88ee0a3b649b1c7fa4a91cfd4a";
62 sha256 = "sha256-3zWogs6EZBnzUfz6gBnigETTKGYl9KFKFgsy6Bl4DME=";
63 deepClone = true;
64 fetchSubmodules = true;
65 # deepClone implies leaveDotGit, so delete the .git directory after
66 # fetching to distinguish from the submodule-leave-git-deep test.
67 postFetch = "rm -r $out/.git";
68 };
69
70 submodule-leave-git-deep = testers.invalidateFetcherByDrvHash fetchgit {
71 name = "submodule-leave-git-deep-source";
72 url = "https://github.com/pineapplehunter/nix-test-repo-with-submodule";
73 rev = "26473335b84ead88ee0a3b649b1c7fa4a91cfd4a";
74 sha256 = "sha256-ieYn9I/0RgeSwQkSqwKaU3RgjKFlRqMg7zw0Nvu3azA=";
75 deepClone = true;
76 leaveDotGit = true;
77 fetchSubmodules = true;
78 };
79
80 dumb-http-signed-tag = testers.invalidateFetcherByDrvHash fetchgit {
81 name = "dumb-http-signed-tag-source";
82 url = "https://git.scottworley.com/pub/git/pinch";
83 rev = "v3.0.14";
84 sha256 = "sha256-bd0Lx75Gd1pcBJtwz5WGki7XoYSpqhinCT3a77wpY2c=";
85 };
86
87 fetchTags = testers.invalidateFetcherByDrvHash fetchgit {
88 name = "fetchgit-fetch-tags-test";
89 url = "https://github.com/NixOS/nix";
90 rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
91 fetchTags = true;
92 leaveDotGit = true;
93 sha256 = "sha256-2vfZnYjZlnC8ODz6B6aOqAqtb1Wbjojnn/5TmzwUrmo=";
94 postFetch = ''
95 cd $out && git describe --tags --always > describe-output.txt 2>&1 || echo "git describe failed" > describe-output.txt
96 '';
97 };
98}