Skip to content

Commit

Permalink
telepresence: 0.85 -> 0.93 (#47966)
Browse files Browse the repository at this point in the history
  • Loading branch information
offlinehacker authored and xeji committed Oct 6, 2018
1 parent d2608d2 commit a134b9a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
32 changes: 10 additions & 22 deletions pkgs/tools/networking/telepresence/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, stdenv, fetchgit, fetchFromGitHub, makeWrapper, git
, python3, sshfs-fuse, torsocks, sshuttle, conntrack-tools
, openssh, which, coreutils, iptables, bash }:
{ lib, stdenv, pythonPackages, fetchgit, fetchFromGitHub, makeWrapper, git
, sshfs-fuse, torsocks, sshuttle, conntrack-tools , openssh, coreutils
, iptables, bash }:

let
sshuttle-telepresence = lib.overrideDerivation sshuttle (p: {
Expand All @@ -15,47 +15,35 @@ let
postPatch = "rm sshuttle/tests/client/test_methods_nat.py";
postInstall = "mv $out/bin/sshuttle $out/bin/sshuttle-telepresence";
});
in stdenv.mkDerivation rec {
in pythonPackages.buildPythonPackage rec {
pname = "telepresence";
version = "0.85";
name = "${pname}-${version}";
version = "0.93";

src = fetchFromGitHub {
owner = "datawire";
repo = "telepresence";
rev = version;
sha256 = "1iypqrx9pnhaz3p5bvl6g0c0c3d1799dv0xdjrzc1z5wa8diawvj";
sha256 = "1x8yjcqj8v35a5pxy2rxaixbznb4vk8ll958b4l46gnkfxf1kh1d";
};

buildInputs = [ makeWrapper python3 ];

phases = ["unpackPhase" "installPhase"];

installPhase = ''
mkdir -p $out/libexec $out/bin
export PREFIX=$out
substituteInPlace ./install.sh \
--replace "#!/bin/bash" "#!${stdenv.shell}" \
--replace '"''${VENVDIR}/bin/pip" -q install "git+https://github.com/datawire/sshuttle.git@telepresence"' "" \
--replace '"''${VENVDIR}/bin/sshuttle-telepresence"' '"${sshuttle-telepresence}/bin/sshuttle-telepresence"'
./install.sh
buildInputs = [ makeWrapper ];

postInstall = ''
wrapProgram $out/bin/telepresence \
--prefix PATH : ${lib.makeBinPath [
python3
sshfs-fuse
torsocks
conntrack-tools
sshuttle-telepresence
openssh
which
coreutils
iptables
bash
]}
'';

doCheck = false;

meta = {
homepage = https://www.telepresence.io/;
description = "Local development against a remote Kubernetes or OpenShift cluster";
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5543,7 +5543,9 @@ with pkgs;

teleport = callPackage ../servers/teleport {};

telepresence = callPackage ../tools/networking/telepresence { };
telepresence = callPackage ../tools/networking/telepresence {
pythonPackages = python3Packages;
};

termplay = callPackage ../tools/misc/termplay { };

Expand Down

0 comments on commit a134b9a

Please sign in to comment.