59 lines
No EOL
1.3 KiB
Nix
59 lines
No EOL
1.3 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
pname ? "softether",
|
|
logDir ? "/var/log/${pname}",
|
|
pidDir ? "/run/${pname}",
|
|
dbDir ? "/var/lib/${pname}",
|
|
dataDir ? "/var/lib/${pname}",
|
|
version ? "master",
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
inherit pname version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "SoftEtherVPN";
|
|
repo = "SoftEtherVPN";
|
|
tag = "${finalAttrs.version}";
|
|
hash = "sha256-KGcQNsHwEtJ0CR35XcW89UPqnnLlGus/zAGBZDgz5uo=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
cmake
|
|
pkg-config
|
|
libsodium
|
|
# Add other build tools here
|
|
];
|
|
|
|
buildInputs = with pkgs; [
|
|
openssl
|
|
readline
|
|
ncurses
|
|
zlib
|
|
bash
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DSE_PIDDIR=${pidDir}" "-DSE_LOGDIR=${logDir}" "-DSE_DBDIR=${dbDir}" "-DCMAKE_INSTALL_SYSTEMD_UNITDIR="
|
|
"-DCMAKE_BUILD_TYPE=Debug"
|
|
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
|
"-DCMAKE_INSTALL_LIBEXECDIR=libexec"
|
|
];
|
|
|
|
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"
|
|
];
|
|
};
|
|
}) |