1{ stdenv, fetchFromGitHub, openssl, coreutils, which }:
2
3stdenv.mkDerivation rec {
4
5 name = "${pname}-${version}";
6 pname = "bdsync";
7 version = "0.10.1";
8
9 src = fetchFromGitHub {
10 owner = "TargetHolding";
11 repo = pname;
12 rev = "v${version}";
13 sha256 = "144hlbk3k29l7sja6piwhd2jsnzzsak13fcjbahd6m8yimxyb2nf";
14 };
15
16 postPatch = ''
17 patchShebangs ./tests.sh
18 patchShebangs ./tests/
19 '';
20
21 buildInputs = [ openssl coreutils which ];
22
23 doCheck = true;
24 checkPhase = ''
25 make test
26 '';
27
28 installPhase = ''
29 mkdir -p $out/bin
30 mkdir -p $out/share/man/man1
31 cp bdsync $out/bin/
32 cp bdsync.1 $out/share/man/man1/
33 '';
34
35 meta = with stdenv.lib; {
36 description = "Fast block device synchronizing tool";
37 homepage = https://github.com/TargetHolding/bdsync;
38 license = licenses.gpl2;
39 platforms = platforms.all;
40 maintainers = with maintainers; [ jluttine ];
41 };
42
43}