nixpkgs/pkgs/applications/version-management/git-sync/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, coreutils, git, gnugrep, gnused, makeWrapper, inotify-tools }:
2018-06-12 02:21:51 +00:00
stdenv.mkDerivation rec {
pname = "git-sync";
version = "unstable-2022-03-20";
2018-06-12 02:21:51 +00:00
src = fetchFromGitHub {
owner = "simonthum";
repo = "git-sync";
rev = "8466b77a38b3d5e8b4ed9e3cb1b635e475eeb415";
sha256 = "sha256-8rCwpmHV6wgFCLzPJOKzwN5mG8uD5KIlGFwcgQD+SK4=";
2018-06-12 02:21:51 +00:00
};
nativeBuildInputs = [ makeWrapper ];
2018-06-12 02:21:51 +00:00
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp -a git-* $out/bin/
cp -a contrib/git-* $out/bin/
2018-06-12 02:21:51 +00:00
'';
wrapperPath = with lib; makeBinPath ([
2018-06-12 02:21:51 +00:00
coreutils
git
gnugrep
gnused
] ++ lib.optionals stdenv.isLinux [ inotify-tools ]);
2018-06-12 02:21:51 +00:00
postFixup = ''
wrap_path="${wrapperPath}":$out/bin
2018-06-12 02:21:51 +00:00
wrapProgram $out/bin/git-sync \
--prefix PATH : $wrap_path
wrapProgram $out/bin/git-sync-on-inotify \
--prefix PATH : $wrap_path
2018-06-12 02:21:51 +00:00
'';
meta = {
description = "A script to automatically synchronize a git repository";
homepage = "https://github.com/simonthum/git-sync";
2021-01-15 13:21:58 +00:00
maintainers = with lib.maintainers; [ imalison ];
license = lib.licenses.cc0;
platforms = with lib.platforms; unix;
2018-06-12 02:21:51 +00:00
};
}