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
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/result
|
||||||
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1751984180,
|
||||||
|
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
15
flake.nix
Normal file
15
flake.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
description = "softether-5";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs }:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
pname = "softether-5";
|
||||||
|
version = "5.02.5187";
|
||||||
|
in {
|
||||||
|
packages.${system}.default = pkgs.callPackage ./package.nix { inherit pname version; };
|
||||||
|
};
|
||||||
|
}
|
||||||
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