nixpkgs/pkgs/tools/backup/diskrsync/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

32 lines
794 B
Nix

{ buildGoModule, fetchFromGitHub, lib, openssh, makeWrapper }:
buildGoModule rec {
pname = "diskrsync";
version = "1.3.0";
src = fetchFromGitHub {
owner = "dop251";
repo = pname;
rev = "v${version}";
sha256 = "sha256-hM70WD+M3jwze0IG84WTFf1caOUk2s9DQ7pR+KNIt1M=";
};
vendorHash = "sha256-lJaM/sC5/qmmo7Zu7nGR6ZdXa1qw4SuVxawQ+d/m+Aw=";
ldflags = [ "-s" "-w" ];
nativeBuildInputs = [ makeWrapper ];
preFixup = ''
wrapProgram "$out/bin/diskrsync" --argv0 diskrsync --prefix PATH : ${openssh}/bin
'';
meta = with lib; {
description = "Rsync for block devices and disk images";
mainProgram = "diskrsync";
homepage = "https://github.com/dop251/diskrsync";
license = licenses.mit;
maintainers = with maintainers; [ jluttine ];
};
}