mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
logmein-hamachi: init at 2.1.0.139, add nixos service
This commit is contained in:
parent
c5fcab987b
commit
e6e7c1e914
@ -338,6 +338,7 @@
|
|||||||
./services/networking/kippo.nix
|
./services/networking/kippo.nix
|
||||||
./services/networking/lambdabot.nix
|
./services/networking/lambdabot.nix
|
||||||
./services/networking/libreswan.nix
|
./services/networking/libreswan.nix
|
||||||
|
./services/networking/logmein-hamachi.nix
|
||||||
./services/networking/mailpile.nix
|
./services/networking/mailpile.nix
|
||||||
./services/networking/mfi.nix
|
./services/networking/mfi.nix
|
||||||
./services/networking/mjpg-streamer.nix
|
./services/networking/mjpg-streamer.nix
|
||||||
|
50
nixos/modules/services/networking/logmein-hamachi.nix
Normal file
50
nixos/modules/services/networking/logmein-hamachi.nix
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.logmein-hamachi;
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
services.logmein-hamachi.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Whether to enable LogMeIn Hamachi, a proprietary
|
||||||
|
(closed source) commercial VPN software.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
systemd.services.logmein-hamachi = {
|
||||||
|
description = "LogMeIn Hamachi Daemon";
|
||||||
|
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" "local-fs.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "forking";
|
||||||
|
ExecStart = "${pkgs.logmein-hamachi}/bin/hamachid";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.logmein-hamachi ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
45
pkgs/tools/networking/logmein-hamachi/default.nix
Normal file
45
pkgs/tools/networking/logmein-hamachi/default.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
}
|
@ -2263,6 +2263,8 @@ in
|
|||||||
inherit (perlPackages) mimeConstruct;
|
inherit (perlPackages) mimeConstruct;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
logmein-hamachi = callPackage ../tools/networking/logmein-hamachi { };
|
||||||
|
|
||||||
logkeys = callPackage ../tools/security/logkeys { };
|
logkeys = callPackage ../tools/security/logkeys { };
|
||||||
|
|
||||||
logrotate = callPackage ../tools/system/logrotate { };
|
logrotate = callPackage ../tools/system/logrotate { };
|
||||||
|
Loading…
Reference in New Issue
Block a user