2015-08-19 11:09:47 +02:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
arch =
|
|
|
|
if stdenv.system == "x86_64-linux" then "x64"
|
|
|
|
else if stdenv.system == "i686-linux" then "x86"
|
2017-12-06 00:06:43 +01:00
|
|
|
else throwSystem;
|
|
|
|
throwSystem = throw "Unsupported system: ${stdenv.system}";
|
2015-08-19 11:09:47 +02:00
|
|
|
sha256 =
|
2018-07-10 21:29:10 +02:00
|
|
|
if stdenv.system == "x86_64-linux" then "11mxa4kls5xjj3462ycrfvfxb1xkk23p5m9iirvwsi0zdmhpnwm8"
|
2016-11-23 16:07:47 +01:00
|
|
|
else if stdenv.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62"
|
2017-12-06 00:06:43 +01:00
|
|
|
else throwSystem;
|
2015-08-19 11:09:47 +02:00
|
|
|
libraries = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ];
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2016-08-13 02:20:44 +02:00
|
|
|
name = "logmein-hamachi-${version}";
|
2018-07-10 21:29:10 +02:00
|
|
|
version = "2.1.0.198";
|
2015-08-19 11:09:47 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-08-13 02:20:44 +02:00
|
|
|
url = "https://www.vpn.net/installers/${name}-${arch}.tgz";
|
2015-08-19 11:09:47 +02:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
|
|
|
|
--set-rpath ${libraries} \
|
|
|
|
hamachid
|
|
|
|
install -D -m755 hamachid $out/bin/hamachid
|
|
|
|
ln -s $out/bin/hamachid $out/bin/hamachi
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A hosted VPN service that lets you securely extend LAN-like networks to distributed teams";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://secure.logmein.com/products/hamachi/;
|
2015-08-19 11:09:47 +02:00
|
|
|
license = licenses.unfreeRedistributable;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|