mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
gitSetupHook: init
This commit is contained in:
parent
c53782d17c
commit
05401247c6
2 changed files with 24 additions and 0 deletions
10
pkgs/by-name/gi/gitSetupHook/gitSetupHook.sh
Normal file
10
pkgs/by-name/gi/gitSetupHook/gitSetupHook.sh
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
gitSetup () {
|
||||||
|
GIT_CONFIG_GLOBAL=$(mktemp -t gitconfig.XXXXXX)
|
||||||
|
export GIT_CONFIG_GLOBAL
|
||||||
|
@gitMinimal@ config --global user.name GitSetupHook
|
||||||
|
@gitMinimal@ config --global user.email GitSetupHook@nixpkgs.invalid
|
||||||
|
}
|
||||||
|
|
||||||
|
postHooks+=(gitSetup)
|
14
pkgs/by-name/gi/gitSetupHook/package.nix
Normal file
14
pkgs/by-name/gi/gitSetupHook/package.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
gitMinimal,
|
||||||
|
makeSetupHook,
|
||||||
|
}:
|
||||||
|
|
||||||
|
makeSetupHook {
|
||||||
|
name = "gitSetupHook";
|
||||||
|
|
||||||
|
substitutions = {
|
||||||
|
gitMinimal = lib.getExe gitMinimal;
|
||||||
|
};
|
||||||
|
|
||||||
|
} ./gitSetupHook.sh
|
Loading…
Add table
Add a link
Reference in a new issue