@@ -1,12 +1,13 @@
11{ lib, stdenv, fetchgit, fetchFromGitHub, makeWrapper, git
2−, python3, sshfs-fuse, torsocks, sshuttle, conntrack-tools }:
2+, python3, sshfs-fuse, torsocks, sshuttle, conntrack-tools
3+, openssh, which, coreutils, iptables, bash }:
34
45let
56 sshuttle-telepresence = lib.overrideDerivation sshuttle (p: {
67 src = fetchgit {
78 url = "https://github.com/datawire/sshuttle.git";
8− rev = "8f881d131a0d5cb203c5a530d233996077f1da1e";
9− sha256 = "0c760xhblz5mpcn5ddqpvivvgn0ixqbhpjsy50dkhgn6lymrx9bx";
9+ rev = "32226ff14d98d58ccad2a699e10cdfa5d86d6269";
10+ sha256 = "1q20lnljndwcpgqv2qrf1k0lbvxppxf98a4g5r9zd566znhcdhx3";
1011 leaveDotGit = true;
1112 };
1213
@@ -16,26 +17,43 @@ let
1617 });
1718in stdenv.mkDerivation rec {
1819 pname = "telepresence";
19− version = "0.67";
20+ version = "0.85";
2021 name = "${pname}-${version}";
2122
2223 src = fetchFromGitHub {
2324 owner = "datawire";
2425 repo = "telepresence";
2526 rev = version;
26− sha256 = "1bpyzgvrf43yvhwp5bzkp2qf3z9dhjma165w8ssca9g00v4b5vg9";
27+ sha256 = "1iypqrx9pnhaz3p5bvl6g0c0c3d1799dv0xdjrzc1z5wa8diawvj";
2728 };
2829
29− buildInputs = [ makeWrapper ];
30+ buildInputs = [ makeWrapper python3 ];
3031
3132 phases = ["unpackPhase" "installPhase"];
3233
3334 installPhase = ''
3435 mkdir -p $out/libexec $out/bin
35− cp cli/telepresence $out/libexec/telepresence
3636
37− makeWrapper $out/libexec/telepresence $out/bin/telepresence \
38− --prefix PATH : ${lib.makeBinPath [python3 sshfs-fuse torsocks conntrack-tools sshuttle-telepresence]}
37+ export PREFIX=$out
38+ substituteInPlace ./install.sh \
39+ --replace "#!/bin/bash" "#!${stdenv.shell}" \
40+ --replace '"''${VENVDIR}/bin/pip" -q install "git+https://github.com/datawire/sshuttle.git@telepresence"' "" \
41+ --replace '"''${VENVDIR}/bin/sshuttle-telepresence"' '"${sshuttle-telepresence}/bin/sshuttle-telepresence"'
42+ ./install.sh
43+
44+ wrapProgram $out/bin/telepresence \
45+ --prefix PATH : ${lib.makeBinPath [
46+ python3
47+ sshfs-fuse
48+ torsocks
49+ conntrack-tools
50+ sshuttle-telepresence
51+ openssh
52+ which
53+ coreutils
54+ iptables
55+ bash
56+ ]}
3957 '';
4058
4159 meta = {