Merge pull request #41876 from IvanMalison/addGitSync

Add git sync
This commit is contained in:
xeji 2018-06-26 13:06:49 +02:00 committed by GitHub
commit b8ad7ec94b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 1 deletions

View File

@ -581,7 +581,7 @@
email = "brandon.barker@gmail.com";
github = "bbarker";
name = "Brandon Elam Barker";
};
};
bcarrell = {
email = "brandoncarrell@gmail.com";
github = "bcarrell";
@ -1717,6 +1717,11 @@
github = "ilya-kolpakov";
name = "Ilya Kolpakov";
};
imalison = {
email = "IvanMalison@gmail.com";
github = "IvanMalison";
name = "Ivan Malison";
};
infinisil = {
email = "infinisil@icloud.com";
github = "infinisil";

View File

@ -95,6 +95,8 @@ rec {
git-stree = callPackage ./git-stree { };
git-sync = callPackage ./git-sync { };
git2cl = callPackage ./git2cl { };
gitFastExport = callPackage ./fast-export { };

View File

@ -0,0 +1,45 @@
{ stdenv, fetchFromGitHub, coreutils, gnugrep, gnused, makeWrapper, git
}:
stdenv.mkDerivation rec {
name = "git-sync-${version}";
version = "20151024";
src = fetchFromGitHub {
owner = "simonthum";
repo = "git-sync";
rev = "eb9adaf2b5fd65aac1e83d6544b9076aae6af5b7";
sha256 = "01if8y93wa0mwbkzkzx2v1vqh47zlz4k1dysl6yh5rmppd1psknz";
};
buildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp -a git-sync $out/bin/git-sync
'';
wrapperPath = with stdenv.lib; makeBinPath [
coreutils
git
gnugrep
gnused
];
fixupPhase = ''
patchShebangs $out/bin
wrapProgram $out/bin/git-sync \
--prefix PATH : "${wrapperPath}"
'';
meta = {
description = "A script to automatically synchronize a git repository";
homepage = https://github.com/simonthum/git-sync;
maintainers = with stdenv.lib.maintainers; [ imalison ];
license = stdenv.lib.licenses.cc0;
platforms = with stdenv.lib.platforms; unix;
};
}