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