ngrok: 1.7.1 -> 2.2.8, added ngrok1 1.1.7

ngrok now releases a proprietary version (2.x). 1.1.7 can still be used
with a self-hosted ngrokd, but it won't work out of the box.

Therefore ngrok 2.2.8 is now the default for the `ngrok` package and
ngrok 1.1.7 can be installed using the `ngrok1` package.
This commit is contained in:
Bob van der Linden 2017-08-27 23:08:18 +02:00 committed by Domen Kožar
parent 45971ebb3e
commit db59381a5d
4 changed files with 59 additions and 24 deletions

View File

@ -1,31 +1,31 @@
{ stdenv, lib, pkgconfig, buildGoPackage, go-bindata, fetchFromGitHub }:
{ stdenv, fetchurl, unzip }:
buildGoPackage rec {
stdenv.mkDerivation rec {
name = "ngrok-${version}";
version = "1.7.1";
rev = "${version}";
version = "2.2.8";
goPackagePath = "ngrok";
src = if stdenv.system == "i686-linux" then fetchurl {
url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-i386.tgz";
sha256 = "0s5ymlaxrvm13q3mlvfirh74sx60qh56c5sgdma2r7q5qlsq41xg";
} else if stdenv.system == "x86_64-linux" then fetchurl {
url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.tgz";
sha256 = "1mn9iwgy6xzrjihikwc2k2j59igqmph0cwx17qp0ziap9lp5xxad";
} else throw "platform ${stdenv.system} not supported!";
src = fetchFromGitHub {
inherit rev;
owner = "inconshreveable";
repo = "ngrok";
sha256 = "1r4nc9knp0nxg4vglg7v7jbyd1nh1j2590l720ahll8a4fbsx5a4";
};
sourceRoot = ".";
goDeps = ./deps.nix;
buildInputs = [ go-bindata ];
preConfigure = ''
sed -e '/jteeuwen\/go-bindata/d' \
-e '/export GOPATH/d' \
-e 's/go get/#go get/' \
-e 's|bin/go-bindata|go-bindata|' -i Makefile
make assets BUILDTAGS=release
export sourceRoot=$sourceRoot/src/ngrok
installPhase = ''
install -D ngrok $out/bin/ngrok
'';
buildFlags = [ "-tags release" ];
meta = with stdenv.lib; {
description = "ngrok";
longDescription = ''
Allows you to expose a web server running on your local machine to the internet.
'';
homepage = https://ngrok.com/;
license = stdenv.lib.licenses.unfree;
platforms = [ "i686-linux" "x86_64-linux" ];
maintainers = [ maintainers.bobvanderlinden ];
};
}

View File

@ -0,0 +1,31 @@
{ stdenv, lib, pkgconfig, buildGoPackage, go-bindata, fetchFromGitHub }:
buildGoPackage rec {
name = "ngrok1-${version}";
version = "1.7.1";
rev = "${version}";
goPackagePath = "ngrok";
src = fetchFromGitHub {
inherit rev;
owner = "inconshreveable";
repo = "ngrok";
sha256 = "1r4nc9knp0nxg4vglg7v7jbyd1nh1j2590l720ahll8a4fbsx5a4";
};
goDeps = ./deps.nix;
buildInputs = [ go-bindata ];
preConfigure = ''
sed -e '/jteeuwen\/go-bindata/d' \
-e '/export GOPATH/d' \
-e 's/go get/#go get/' \
-e 's|bin/go-bindata|go-bindata|' -i Makefile
make assets BUILDTAGS=release
export sourceRoot=$sourceRoot/src/ngrok
'';
buildFlags = [ "-tags release" ];
}

View File

@ -3418,7 +3418,11 @@ with pkgs;
ngrep = callPackage ../tools/networking/ngrep { };
ngrok = callPackage ../tools/networking/ngrok { };
ngrok = ngrok2;
ngrok2 = callPackage ../tools/networking/ngrok { };
ngrok1 = callPackage ../tools/networking/ngrok1 { };
noice = callPackage ../applications/misc/noice { };