From 2e45234acfb5db2c339dcc252b7b206a953ca12f Mon Sep 17 00:00:00 2001 From: Rick Yang Date: Thu, 15 Feb 2018 16:52:30 +0800 Subject: [PATCH] softether: 4.20 -> 4.25 --- pkgs/servers/softether/4.25.nix | 53 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 pkgs/servers/softether/4.25.nix diff --git a/pkgs/servers/softether/4.25.nix b/pkgs/servers/softether/4.25.nix new file mode 100644 index 000000000000..b1e9c5c1a455 --- /dev/null +++ b/pkgs/servers/softether/4.25.nix @@ -0,0 +1,53 @@ +{ stdenv, fetchurl +, openssl, readline, ncurses, zlib }: + +let + os = if stdenv.isLinux then "1" + else if stdenv.isFreeBSD then "2" + else if stdenv.isSunOS then "3" + else if stdenv.isDarwin then "4" + else if stdenv.isOpenBSD then "5" + else ""; + cpuBits = if stdenv.is64bit then "2" else "1"; + +in + +stdenv.mkDerivation rec { + name = "softether-${version}"; + version = "4.25"; + build = "9656"; + compiledDate = "2018.01.15"; + dataDir = "/var/lib/softether"; + + src = fetchurl { + url = "http://www.softether-download.com/files/softether/v${version}-${build}-rtm-${compiledDate}-tree/Source_Code/softether-src-v${version}-${build}-rtm.tar.gz"; + sha256 = "1y1m8lf0xfh7m70d15wj2jjf5a5qhi3j49ciwqmsscsqvb1xwimr"; + }; + + buildInputs = [ openssl readline ncurses zlib ]; + + preConfigure = '' + echo "${os} + ${cpuBits} + " | ./configure + rm configure + ''; + + buildPhase = '' + mkdir -p $out/bin + sed -i \ + -e "/INSTALL_BINDIR=/s|/usr/bin|/bin|g" \ + -e "/_DIR=/s|/usr|${dataDir}|g" \ + -e "s|\$(INSTALL|$out/\$(INSTALL|g" \ + -e "/echo/s|echo $out/|echo |g" \ + Makefile + ''; + + meta = with stdenv.lib; { + description = "An Open-Source Free Cross-platform Multi-protocol VPN Program"; + homepage = https://www.softether.org/; + license = licenses.gpl2; + maintainers = [ maintainers.rick68 ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9cd275c84bf3..bf29ecc4b289 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12305,7 +12305,8 @@ with pkgs; softether_4_18 = callPackage ../servers/softether/4.18.nix { }; softether_4_20 = callPackage ../servers/softether/4.20.nix { }; - softether = softether_4_20; + softether_4_25 = callPackage ../servers/softether/4.25.nix { }; + softether = softether_4_25; qboot = callPackage ../applications/virtualization/qboot { stdenv = stdenv_32bit; };