nixpkgs/pkgs/by-name/gi/git-sync/package.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 = "0-unstable-2024-02-15";
2018-06-12 02:21:51 +00:00
src = fetchFromGitHub {
owner = "simonthum";
repo = "git-sync";
rev = "493b0155fb974b477b6ea623d6e41e13ddad8500";
hash = "sha256-hsq+kpB+akjbFKBeHMsP8ibrtygEG2Yf2QW9vFFIano=";
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
'';
2024-08-16 17:29:03 +00:00
wrapperPath = lib.makeBinPath ([
2018-06-12 02:21:51 +00:00
coreutils
git
gnugrep
gnused
] ++ lib.optionals stdenv.hostPlatform.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 = "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
};
}