softethe v5 (dev) building perfectly fine with nix and cmake
This commit is contained in:
commit
3d620ad53e
4 changed files with 102 additions and 0 deletions
59
package.nix
Normal file
59
package.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
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"
|
||||
];
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue