2022-01-02 23:30:36 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, openssl, nss, pkg-config, nspr, bash, debug ? false }:
|
2020-12-31 07:48:55 +00:00
|
|
|
|
2021-12-21 10:44:45 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "badvpn";
|
|
|
|
version = "1.999.130";
|
2022-01-02 23:30:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ambrop72";
|
|
|
|
repo = "badvpn";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-bLTDpq3ohUP+KooPvhv1/AZfdo0HwB3g9QOuE2E/pmY=";
|
2021-12-21 10:44:45 +00:00
|
|
|
};
|
2022-01-02 23:30:36 +00:00
|
|
|
|
2020-12-31 07:48:55 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [
|
2021-12-21 10:44:45 +00:00
|
|
|
openssl
|
|
|
|
nss
|
|
|
|
nspr
|
2020-12-31 07:48:55 +00:00
|
|
|
];
|
2013-11-17 17:48:13 +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-21 10:44:45 +00:00
|
|
|
cmakeFlagsArray=("-DCMAKE_BUILD_TYPE=" "-DCMAKE_C_FLAGS=-O3 ${lib.optionalString (!debug) "-DNDEBUG"}");
|
2013-11-17 17:48:13 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-21 10:44:45 +00:00
|
|
|
meta = with lib; {
|
2021-01-24 09:19:10 +00:00
|
|
|
description = "A set of network-related (mostly VPN-related) tools";
|
2021-12-21 10:44:45 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ raskin ];
|
|
|
|
platforms = platforms.linux;
|
2013-11-17 17:48:13 +00:00
|
|
|
};
|
|
|
|
}
|