about summary refs log tree commit diff
path: root/pkgs/tools/networking
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2015-08-19 12:09:47 +0300
committerNikolay Amiantov <ab@fmap.me>2016-04-27 16:15:01 +0300
commite6e7c1e914b816397836d1508c2bee345e0518e0 (patch)
tree0618f0051cb31a1102cea898e45b4ff1675cbb99 /pkgs/tools/networking
parentc5fcab987b819aa2dcb1c5cec788cb5fb7106c6d (diff)
downloadnixlib-e6e7c1e914b816397836d1508c2bee345e0518e0.tar
nixlib-e6e7c1e914b816397836d1508c2bee345e0518e0.tar.gz
nixlib-e6e7c1e914b816397836d1508c2bee345e0518e0.tar.bz2
nixlib-e6e7c1e914b816397836d1508c2bee345e0518e0.tar.lz
nixlib-e6e7c1e914b816397836d1508c2bee345e0518e0.tar.xz
nixlib-e6e7c1e914b816397836d1508c2bee345e0518e0.tar.zst
nixlib-e6e7c1e914b816397836d1508c2bee345e0518e0.zip
logmein-hamachi: init at 2.1.0.139, add nixos service
Diffstat (limited to 'pkgs/tools/networking')
-rw-r--r--pkgs/tools/networking/logmein-hamachi/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/tools/networking/logmein-hamachi/default.nix b/pkgs/tools/networking/logmein-hamachi/default.nix
new file mode 100644
index 000000000000..28fb39db5719
--- /dev/null
+++ b/pkgs/tools/networking/logmein-hamachi/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchurl }:
+
+with stdenv.lib;
+
+assert stdenv.isLinux;
+
+let
+  arch =
+    if stdenv.system == "x86_64-linux" then "x64"
+    else if stdenv.system == "i686-linux" then "x86"
+    else abort "Unsupported architecture";
+  sha256 =
+    if stdenv.system == "x86_64-linux" then "1j9sba5prpihlmxr98ss3vls2qjfc6hypzlakr1k97z0a8433nif"
+    else if stdenv.system == "i686-linux" then "100x6gib2np72wrvcn1yhdyn4fplf5x8xm4x0g77izyfdb3yjg8h"
+    else abort "Unsupported architecture";
+  libraries = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ];
+
+in stdenv.mkDerivation rec {
+  name = "logmein-hamachi-2.1.0.139";
+
+  src = fetchurl {
+    url = "https://secure.logmein.com/labs/${name}-${arch}.tgz";
+    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";
+    homepage = https://secure.logmein.com/products/hamachi/;
+    license = licenses.unfreeRedistributable;
+    maintainers = with maintainers; [ abbradar ];
+    platforms = platforms.linux;
+  };
+}