2014-11-01 14:15:21 +00:00
|
|
|
{stdenv, fetchurl, cmake, openssl, nss, pkgconfig, nspr, bash, debug ? false}:
|
2013-11-17 17:48:13 +00:00
|
|
|
let
|
|
|
|
s = # Generated upstream information
|
|
|
|
rec {
|
|
|
|
baseName="badvpn";
|
2015-05-10 10:16:33 +01:00
|
|
|
version="1.999.130";
|
2013-11-17 17:48:13 +00:00
|
|
|
name="${baseName}-${version}";
|
2015-05-10 10:16:33 +01:00
|
|
|
hash="02b1fra43l75mljkhrq45vcrrqv0znicjn15g7nbqx3jppzbpm5z";
|
|
|
|
url="https://github.com/ambrop72/badvpn/archive/1.999.130.tar.gz";
|
|
|
|
sha256="02b1fra43l75mljkhrq45vcrrqv0znicjn15g7nbqx3jppzbpm5z";
|
2013-11-17 17:48:13 +00:00
|
|
|
};
|
2017-09-14 20:24:37 +01:00
|
|
|
|
2013-11-17 17:48:13 +00:00
|
|
|
buildInputs = [
|
2017-09-14 20:24:37 +01:00
|
|
|
cmake openssl nss nspr
|
2013-11-17 17:48:13 +00:00
|
|
|
];
|
2014-11-01 14:15:21 +00:00
|
|
|
compileFlags = "-O3 ${stdenv.lib.optionalString (!debug) "-DNDEBUG"}";
|
2013-11-17 17:48:13 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (s) name version;
|
2017-10-10 16:08:00 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2013-11-17 17:48:13 +00:00
|
|
|
inherit buildInputs;
|
|
|
|
src = fetchurl {
|
|
|
|
inherit (s) url sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
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 '{}' ';'
|
2014-11-01 14:15:21 +00:00
|
|
|
cmakeFlagsArray=("-DCMAKE_BUILD_TYPE=" "-DCMAKE_C_FLAGS=${compileFlags}");
|
2013-11-17 17:48:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
inherit (s) version;
|
|
|
|
description = ''A set of network-related (mostly VPN-related) tools'';
|
|
|
|
license = stdenv.lib.licenses.bsd3 ;
|
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|