Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / softether / default.nix
blob976521f061d9354c772932d3d8fe474fabcbf111
1 { lib, stdenv, fetchurl
2 , openssl, readline, ncurses, zlib
3 , dataDir ? "/var/lib/softether" }:
5 stdenv.mkDerivation rec {
6   pname = "softether";
7   version = "4.38";
8   build = "9760";
10   src = fetchurl {
11     url = "https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v${version}-${build}-rtm/softether-src-v${version}-${build}-rtm.tar.gz";
12     sha256 = "0d8zahi9lkv72jh8yj66pwrsi4451vk113d3khzrzgbic6s2i0g6";
13   };
15   buildInputs = [ openssl readline ncurses zlib ];
17   preConfigure = ''
18     ./configure
19   '';
21   buildPhase = ''
22     mkdir -p $out/bin
23     sed -i \
24       -e "/INSTALL_BINDIR=/s|/usr/bin|/bin|g" \
25       -e "/_DIR=/s|/usr|${dataDir}|g" \
26       -e "s|\$(INSTALL|$out/\$(INSTALL|g" \
27       -e "/echo/s|echo $out/|echo |g" \
28       Makefile
29   '';
31   meta = with lib; {
32     description = "Open-Source Free Cross-platform Multi-protocol VPN Program";
33     homepage = "https://www.softether.org/";
34     license = licenses.asl20;
35     maintainers = [ maintainers.rick68 ];
36     platforms = [ "x86_64-linux" ];
37   };