Merge branch 'staging-next' into staging
This commit is contained in:
@@ -2,23 +2,23 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "git-trim";
|
||||
version = "0.2.4";
|
||||
version = "0.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "foriequal0";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0gfmv9bwhh6bv0s9kfbxq9wsvrk3zz3ibavbpp9l8cpqc3145pqy";
|
||||
sha256 = "06wni47s8yq274bh5f7bcy0sah23938kjiw5pdxnma5kwwnrccrr";
|
||||
};
|
||||
|
||||
cargoSha256 = "0xklczk4vbh2mqf76r3rsfyclyza9imf6yss7vbkm9w4ir3ar9f3";
|
||||
cargoSha256 = "06ndja8212xy4rybh1117wijsyj70w4z8h6km538a7598s49vzdk";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 docs/git-trim.md.1 $out/share/man/man1/git-trim.1
|
||||
install -Dm644 -t $out/share/man/man1/ docs/git-trim.1
|
||||
'';
|
||||
|
||||
# fails with sandbox
|
||||
|
||||
@@ -5,14 +5,15 @@ set -eu -o pipefail
|
||||
|
||||
oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion git" | tr -d '"')"
|
||||
latestTag="$(git ls-remote --tags --sort="v:refname" git://github.com/git/git.git | grep -v '\{\}' | grep -v '\-rc' | tail -1 | sed 's|^.*/v\(.*\)|\1|')"
|
||||
targetVersion="${1:-latestTag}"
|
||||
|
||||
if [ ! "${oldVersion}" = "${latestTag}" ]; then
|
||||
update-source-version git "${latestTag}"
|
||||
if [ ! "${oldVersion}" = "${targetVersion}" ]; then
|
||||
update-source-version git "${targetVersion}"
|
||||
nixpkgs="$(git rev-parse --show-toplevel)"
|
||||
default_nix="$nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix"
|
||||
nix-build -A git
|
||||
git add "${default_nix}"
|
||||
git commit -m "git: ${oldVersion} -> ${latestTag}"
|
||||
git commit -m "git: ${oldVersion} -> ${targetVersion}"
|
||||
else
|
||||
echo "git is already up-to-date"
|
||||
fi
|
||||
|
||||
@@ -31,10 +31,13 @@ stdenv.mkDerivation rec {
|
||||
make install
|
||||
make install-doc
|
||||
|
||||
substituteInPlace contrib/tig-completion.zsh \
|
||||
--replace 'e=$(dirname ''${funcsourcetrace[1]%:*})/tig-completion.bash' "e=$out/etc/bash_completion.d/tig-completion.bash"
|
||||
# fixes tig-completion __git-complete dependency
|
||||
sed -i '1s;^;source ${git}/share/bash-completion/completions/git\n;' contrib/tig-completion.bash
|
||||
|
||||
install -D contrib/tig-completion.bash $out/etc/bash_completion.d/tig-completion.bash
|
||||
substituteInPlace contrib/tig-completion.zsh \
|
||||
--replace 'e=$(dirname ''${funcsourcetrace[1]%:*})/tig-completion.bash' "e=$out/share/bash-completion/completions/tig"
|
||||
|
||||
install -D contrib/tig-completion.bash $out/share/bash-completion/completions/tig
|
||||
install -D contrib/tig-completion.zsh $out/share/zsh/site-functions/_tig
|
||||
cp contrib/vim.tigrc $out/etc/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user