2022-01-03 16:56:52 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, openssl, nss, pkg-config, nspr, bash, debug ? false }:
|
2021-01-15 22:18:51 +00:00
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "badvpn";
|
|
|
|
version = "1.999.130";
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ambrop72";
|
|
|
|
repo = "badvpn";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-bLTDpq3ohUP+KooPvhv1/AZfdo0HwB3g9QOuE2E/pmY=";
|
2021-12-24 04:21:11 +00:00
|
|
|
};
|
2022-01-03 16:56:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [
|
2021-12-24 04:21:11 +00:00
|
|
|
openssl
|
|
|
|
nss
|
|
|
|
nspr
|
2021-01-15 22:18:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
find . -name '*.sh' -exec sed -e 's@#!/bin/sh@${stdenv.shell}@' -i '{}' ';'
|
|
|
|
find . -name '*.sh' -exec sed -e 's@#!/bin/bash@${bash}/bin/bash@' -i '{}' ';'
|
2021-12-24 04:21:11 +00:00
|
|
|
cmakeFlagsArray=("-DCMAKE_BUILD_TYPE=" "-DCMAKE_C_FLAGS=-O3 ${lib.optionalString (!debug) "-DNDEBUG"}");
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
meta = with lib; {
|
2021-02-05 17:12:51 +00:00
|
|
|
description = "A set of network-related (mostly VPN-related) tools";
|
2021-12-24 04:21:11 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ raskin ];
|
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|