Files
nixpkgs/pkgs/by-name/gi/git-sync/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

77 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
coreutils,
fswatch,
gitMinimal,
gnugrep,
gnused,
makeBinaryWrapper,
inotify-tools,
nix-update-script,
}:
stdenv.mkDerivation {
pname = "git-sync";
version = "0-unstable-2025-06-26";
src = fetchFromGitHub {
owner = "simonthum";
repo = "git-sync";
rev = "15af8a43cb4d8354f0b7e7c8d27e09587a9a3994";
hash = "sha256-7sCncPxVMiDGi1PSoFhA9emSY2Jit35/FaBbinCdS/A=";
};
nativeBuildInputs = [ makeBinaryWrapper ];
dontBuild = true;
installPhase =
let
wrapperPath = lib.makeBinPath (
[
coreutils
fswatch
gitMinimal
gnugrep
gnused
]
++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ]
);
in
''
runHook preInstall
for file in git-*; do
install -D -m 755 "$file" -t $out/bin
done
for file in contrib/git-*; do
install -D -m 755 "$file" -t $out/bin
done
wrap_path="${wrapperPath}":$out/bin
for file in $out/bin/*; do
wrapProgram $file \
--prefix PATH : $wrap_path
done
runHook postInstall
'';
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Script to automatically synchronize a git repository";
homepage = "https://github.com/simonthum/git-sync";
maintainers = with lib.maintainers; [ imalison ];
license = lib.licenses.cc0;
platforms = with lib.platforms; unix;
};
}