From 81d9d36ea9176b910425d9bee802f649a1bb2e05 Mon Sep 17 00:00:00 2001 From: Dietmar Winkler Date: Fri, 19 Jan 2024 19:32:04 +0100 Subject: [PATCH] bsync: init at unstable-2023-12-21 No release so using unstable-DATE convention for version --- pkgs/by-name/bs/bsync/package.nix | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 pkgs/by-name/bs/bsync/package.nix diff --git a/pkgs/by-name/bs/bsync/package.nix b/pkgs/by-name/bs/bsync/package.nix new file mode 100644 index 000000000000..0a49bea9eefa --- /dev/null +++ b/pkgs/by-name/bs/bsync/package.nix @@ -0,0 +1,50 @@ +{ lib +, fetchFromGitHub +, stdenv +, makeWrapper +, python3 +, openssh +, rsync +, findutils +, which +}: + +stdenv.mkDerivation { + pname = "bsync"; + version = "unstable-2023-12-21"; + + src = fetchFromGitHub { + owner = "dooblem"; + repo = "bsync"; + rev = "25f77730750720ad68b0ab2773e79d9ca98c3647"; + hash = "sha256-k25MjLis0/dp1TTS4aFeJZq/c0T01LmNcWtC+dw/kKY="; + }; + + installPhase = '' + runHook preInstall + install -Dm555 bsync -t $out/bin + runHook postInstall + ''; + +nativeBuildInputs = [ makeWrapper ]; +buildInputs = [ python3 ]; + +fixupPhase = '' + runHook preFixup + + patchShebangs $out/bin/bsync + wrapProgram $out/bin/bsync \ + --prefix PATH ":" ${lib.makeLibraryPath [ openssh rsync findutils which ]} + + runHook postFixup +''; + + meta = with lib; { + homepage = "https://github.com/dooblem/bsync"; + description = "Bidirectional Synchronization using Rsync"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ dietmarw ]; + platforms = platforms.unix; + mainProgram = "bsync"; + }; +}