1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 scsh,
6 rsync,
7 unison,
8}:
9
10stdenv.mkDerivation {
11 pname = "usync";
12 version = "0.0.3";
13
14 src = fetchFromGitHub {
15 owner = "ebzzry";
16 repo = "usync";
17 rev = "99f11b0c196a81843f55ca3456abcb85149b6d51";
18 sha256 = "16i1q8f0jmfd43rb8d70l2b383vr5ib4kh7iq3yd345q7xjz9c2j";
19 };
20
21 installPhase = ''
22 install -m 555 -Dt $out/bin $pname
23 '';
24
25 postFixup = ''
26 substituteInPlace $out/bin/$pname --replace "/usr/bin/env scsh" "${scsh}/bin/scsh"
27 substituteInPlace $out/bin/$pname --replace "(rsync " "(${rsync}/bin/rsync "
28 substituteInPlace $out/bin/$pname --replace "(unison " "(${unison}/bin/unison "
29 '';
30
31 meta = with lib; {
32 homepage = "https://github.com/ebzzry/usync";
33 description = "Simple site-to-site synchronization tool";
34 license = licenses.mit;
35 maintainers = [ maintainers.ebzzry ];
36 platforms = platforms.unix;
37 mainProgram = "usync";
38 };
39
40 dontBuild = true;
41}