1{ buildGoPackage, fetchFromGitHub, lib, openssh, makeWrapper }:
2
3buildGoPackage rec {
4 pname = "diskrsync";
5 version = "unstable-2019-01-02";
6
7 src = fetchFromGitHub {
8 owner = "dop251";
9 repo = pname;
10 rev = "e8598ef71038527a8a77d1a6cf2a73cfd96d9139";
11 sha256 = "1dqpmc4hp81knhdk3mrmwdr66xiibsvj5lagbm5ciajg9by45mcs";
12 };
13
14 goPackagePath = "github.com/dop251/diskrsync";
15 goDeps = ./deps.nix;
16
17 nativeBuildInputs = [ makeWrapper ];
18
19 preFixup = ''
20 wrapProgram "$out/bin/diskrsync" --argv0 diskrsync --prefix PATH : ${openssh}/bin
21 '';
22
23 meta = with lib; {
24 description = "Rsync for block devices and disk images";
25 homepage = "https://github.com/dop251/diskrsync";
26 license = licenses.mit;
27 maintainers = with maintainers; [ jluttine ];
28 };
29
30}