2021-07-16 19:40:57 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, coreutils, git, gnugrep, gnused, makeWrapper, inotify-tools }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "git-sync";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "unstable-2022-03-20";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simonthum";
|
|
|
|
repo = "git-sync";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "8466b77a38b3d5e8b4ed9e3cb1b635e475eeb415";
|
|
|
|
sha256 = "sha256-8rCwpmHV6wgFCLzPJOKzwN5mG8uD5KIlGFwcgQD+SK4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2021-07-16 19:40:57 +00:00
|
|
|
cp -a git-* $out/bin/
|
2022-05-18 14:49:53 +00:00
|
|
|
cp -a contrib/git-* $out/bin/
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
wrapperPath = with lib; makeBinPath [
|
2021-07-16 19:40:57 +00:00
|
|
|
inotify-tools
|
2020-04-24 23:36:52 +00:00
|
|
|
coreutils
|
|
|
|
git
|
|
|
|
gnugrep
|
|
|
|
gnused
|
|
|
|
];
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
postFixup = ''
|
|
|
|
wrap_path="${wrapperPath}":$out/bin
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
wrapProgram $out/bin/git-sync \
|
2021-07-24 12:14:16 +00:00
|
|
|
--prefix PATH : $wrap_path
|
|
|
|
|
|
|
|
wrapProgram $out/bin/git-sync-on-inotify \
|
|
|
|
--prefix PATH : $wrap_path
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A script to automatically synchronize a git repository";
|
|
|
|
homepage = "https://github.com/simonthum/git-sync";
|
2021-01-17 00:15:33 +00:00
|
|
|
maintainers = with lib.maintainers; [ imalison ];
|
|
|
|
license = lib.licenses.cc0;
|
|
|
|
platforms = with lib.platforms; unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|