Merge pull request #200482 from aaronjheng/git-subrepo
git-subrepo: 0.4.1 -> 0.4.5
This commit is contained in:
commit
1b7970b80c
pkgs/applications/version-management/git-and-tools/git-subrepo
@ -1,19 +1,20 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, git, makeWrapper, which }:
|
{ lib, stdenv, fetchFromGitHub, git, makeWrapper, which, installShellFiles }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "git-subrepo";
|
pname = "git-subrepo";
|
||||||
version = "0.4.1";
|
version = "0.4.5";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ingydotnet";
|
owner = "ingydotnet";
|
||||||
repo = "git-subrepo";
|
repo = "git-subrepo";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0n10qnc8kyms6cv65k1n5xa9nnwpwbjn9h2cq47llxplawzqgrvp";
|
sha256 = "sha256-ZU5yYaiear5AjlBqtzabmMJNUa2ypeJKW3sQPIcyskM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
makeWrapper
|
makeWrapper
|
||||||
which
|
which
|
||||||
|
installShellFiles
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -26,21 +27,9 @@ stdenv.mkDerivation rec {
|
|||||||
"INSTALL_MAN=${placeholder "out"}/share/man/man1"
|
"INSTALL_MAN=${placeholder "out"}/share/man/man1"
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Allow zsh completion to work even though we aren't installing from a git
|
|
||||||
# clone. Also submitted upstream as
|
|
||||||
# https://github.com/ingydotnet/git-subrepo/pull/420
|
|
||||||
./zsh-completion.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
ZSH_COMP_DIR="$out/share/zsh/vendor-completions"
|
installShellCompletion --bash --name git-subrepo.bash share/completion.bash
|
||||||
mkdir -p "$ZSH_COMP_DIR"
|
installShellCompletion --zsh share/zsh-completion/_git-subrepo
|
||||||
cp share/zsh-completion/_git-subrepo "$ZSH_COMP_DIR/"
|
|
||||||
|
|
||||||
BASH_COMP_DIR="$out/share/bash-completion/completions"
|
|
||||||
mkdir -p "$BASH_COMP_DIR"
|
|
||||||
cp share/completion.bash "$BASH_COMP_DIR/git-subrepo"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
@ -52,7 +41,7 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = "https://github.com/ingydotnet/git-subrepo";
|
homepage = "https://github.com/ingydotnet/git-subrepo";
|
||||||
description = "Git submodule alternative";
|
description = "Git submodule alternative";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = platforms.unix ++ platforms.darwin;
|
platforms = platforms.unix;
|
||||||
maintainers = [ maintainers.ryantrinkle ];
|
maintainers = with maintainers; [ ryantrinkle ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
diff --git a/pkg/bin/generate-completion.pl b/pkg/bin/generate-completion.pl
|
|
||||||
index 85ae3b8..d3e423c 100644
|
|
||||||
--- a/pkg/bin/generate-completion.pl
|
|
||||||
+++ b/pkg/bin/generate-completion.pl
|
|
||||||
@@ -82,11 +82,6 @@ sub generate_zsh {
|
|
||||||
|
|
||||||
# DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl.
|
|
||||||
|
|
||||||
-if [[ -z $GIT_SUBREPO_ROOT ]]; then
|
|
||||||
- echo 'GIT_SUBREPO_ROOT is null; has `/path/to/git-subrepo/.rc` been sourced?'
|
|
||||||
- return 3
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
_git-subrepo() {
|
|
||||||
typeset -A opt_args
|
|
||||||
local curcontext="$curcontext" state line context
|
|
||||||
diff --git a/share/zsh-completion/_git-subrepo b/share/zsh-completion/_git-subrepo
|
|
||||||
index fc82be2..a8069d9 100644
|
|
||||||
--- a/share/zsh-completion/_git-subrepo
|
|
||||||
+++ b/share/zsh-completion/_git-subrepo
|
|
||||||
@@ -3,11 +3,6 @@
|
|
||||||
|
|
||||||
# DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl.
|
|
||||||
|
|
||||||
-if [[ -z $GIT_SUBREPO_ROOT ]]; then
|
|
||||||
- echo 'GIT_SUBREPO_ROOT is null; has `/path/to/git-subrepo/.rc` been sourced?'
|
|
||||||
- return 3
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
_git-subrepo() {
|
|
||||||
typeset -A opt_args
|
|
||||||
local curcontext="$curcontext" state line context
|
|
Loading…
Reference in New Issue
Block a user