mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 01:24:09 +01:00
tests.fetchgit.withGitConfig: fix build
This commit is contained in:
parent
2e270245c4
commit
348bfd5f6d
1 changed files with 12 additions and 19 deletions
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
stdenv,
|
||||
config,
|
||||
lib,
|
||||
runCommand,
|
||||
testers,
|
||||
fetchgit,
|
||||
|
|
@ -238,21 +237,15 @@
|
|||
hash = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
|
||||
};
|
||||
|
||||
withGitConfig =
|
||||
let
|
||||
pkgs = import ../../.. {
|
||||
system = stdenv.hostPlatform.system;
|
||||
config = config // {
|
||||
gitConfig = {
|
||||
url."https://github.com".insteadOf = "https://doesntexist.forsure";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
pkgs.testers.invalidateFetcherByDrvHash pkgs.fetchgit {
|
||||
name = "fetchgit-with-config";
|
||||
url = "https://doesntexist.forsure/NixOS/nix";
|
||||
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
|
||||
sha256 = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
|
||||
};
|
||||
withGitConfig = testers.invalidateFetcherByDrvHash fetchgit {
|
||||
name = "fetchgit-with-config";
|
||||
url = "https://doesntexist.forsure/NixOS/nix";
|
||||
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
|
||||
sha256 = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
|
||||
gitConfigFile = lib.toFile "gitconfig" (
|
||||
lib.generators.toGitINI {
|
||||
url."https://github.com".insteadOf = "https://doesntexist.forsure";
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue