mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
f6b07f0e2f
The `sparseCheckout` argument allows the user to specify directories or patterns of files, which Git uses to filter files it should check-out. Git expects a multi-line string on stdin ("newline-delimited list", see `git-sparse-checkout(1)`), but within nixpkgs it is more consistent to use a list of strings instead. The list elements are joined to a multi-line string only before passing it to the builder script. A deprecation warning is emitted if a (multi-line) string is passed to `sparseCheckout`, but for the time being it is still accepted.
34 lines
951 B
Nix
34 lines
951 B
Nix
{ testers, fetchgit, ... }:
|
|
|
|
{
|
|
simple = testers.invalidateFetcherByDrvHash fetchgit {
|
|
name = "nix-source";
|
|
url = "https://github.com/NixOS/nix";
|
|
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
|
|
sha256 = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
|
|
};
|
|
|
|
sparseCheckout = testers.invalidateFetcherByDrvHash fetchgit {
|
|
name = "nix-source";
|
|
url = "https://github.com/NixOS/nix";
|
|
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
|
|
sparseCheckout = [
|
|
"src"
|
|
"tests"
|
|
];
|
|
sha256 = "sha256-g1PHGTWgAcd/+sXHo1o6AjVWCvC6HiocOfMbMh873LQ=";
|
|
};
|
|
|
|
sparseCheckoutNonConeMode = testers.invalidateFetcherByDrvHash fetchgit {
|
|
name = "nix-source";
|
|
url = "https://github.com/NixOS/nix";
|
|
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
|
|
sparseCheckout = [
|
|
"src"
|
|
"tests"
|
|
];
|
|
nonConeMode = true;
|
|
sha256 = "sha256-FknO6C/PSnMPfhUqObD4vsW4PhkwdmPa9blNzcNvJQ4=";
|
|
};
|
|
}
|