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