Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
69 lines
1.7 KiB
Nix
69 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
openssl,
|
|
readline,
|
|
ncurses,
|
|
zlib,
|
|
bash,
|
|
dataDir ? "/var/lib/softether",
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "softether";
|
|
version = "4.44-9807-rtm";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "SoftEtherVPN";
|
|
repo = "SoftEtherVPN_Stable";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-roi5M/YmSBH44pRPSVZcADIHDbSpAfASiPbTdijisUM=";
|
|
};
|
|
|
|
buildInputs = [
|
|
openssl
|
|
readline
|
|
ncurses
|
|
zlib
|
|
bash
|
|
];
|
|
|
|
preConfigure = ''
|
|
./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
|
|
'';
|
|
|
|
postInstall = ''
|
|
substituteInPlace $out/bin/vpnbridge --replace-fail /var/lib/softether/vpnbridge/vpnbridge $out/var/lib/softether/vpnbridge/vpnbridge
|
|
substituteInPlace $out/bin/vpnclient --replace-fail /var/lib/softether/vpnclient/vpnclient $out/var/lib/softether/vpnclient/vpnclient
|
|
substituteInPlace $out/bin/vpncmd --replace-fail /var/lib/softether/vpncmd/vpncmd $out/var/lib/softether/vpncmd/vpncmd
|
|
substituteInPlace $out/bin/vpnserver --replace-fail /var/lib/softether/vpnserver/vpnserver $out/var/lib/softether/vpnserver/vpnserver
|
|
'';
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
"-Wno-incompatible-pointer-types"
|
|
"-Wno-implicit-function-declaration"
|
|
];
|
|
|
|
meta = {
|
|
description = "Open-Source Free Cross-platform Multi-protocol VPN Program";
|
|
homepage = "https://www.softether.org/";
|
|
license = lib.licenses.asl20;
|
|
maintainers = [ lib.maintainers.rick68 ];
|
|
platforms = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
};
|
|
})
|