at 22.05-pre 48 lines 1.1 kB view raw
1{ lib, stdenv, fetchFromGitHub, coreutils, git, gnugrep, gnused, makeWrapper, inotify-tools }: 2 3stdenv.mkDerivation rec { 4 pname = "git-sync"; 5 version = "unstable-2021-07-14"; 6 7 src = fetchFromGitHub { 8 owner = "simonthum"; 9 repo = "git-sync"; 10 rev = "7d3d34bf3ee2483fba00948f5b97f964b849a590"; 11 sha256 = "sha256-PuYREW5NBkYF1tlcLTbOI8570nvHn5ifN8OIInfNNxI="; 12 }; 13 14 nativeBuildInputs = [ makeWrapper ]; 15 16 dontBuild = true; 17 18 installPhase = '' 19 mkdir -p $out/bin 20 cp -a git-* $out/bin/ 21 ''; 22 23 wrapperPath = with lib; makeBinPath [ 24 inotify-tools 25 coreutils 26 git 27 gnugrep 28 gnused 29 ]; 30 31 postFixup = '' 32 wrap_path="${wrapperPath}":$out/bin 33 34 wrapProgram $out/bin/git-sync \ 35 --prefix PATH : $wrap_path 36 37 wrapProgram $out/bin/git-sync-on-inotify \ 38 --prefix PATH : $wrap_path 39 ''; 40 41 meta = { 42 description = "A script to automatically synchronize a git repository"; 43 homepage = "https://github.com/simonthum/git-sync"; 44 maintainers = with lib.maintainers; [ imalison ]; 45 license = lib.licenses.cc0; 46 platforms = with lib.platforms; unix; 47 }; 48}