nixpkgs/pkgs/tools/networking/badvpn/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
938 B
Nix
Raw Normal View History

2022-01-02 23:30:36 +00:00
{ lib, stdenv, fetchFromGitHub, cmake, openssl, nss, pkg-config, nspr, bash, debug ? false }:
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
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [
2021-12-21 10:44:45 +00:00
openssl
nss
nspr
];
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"}");
'';
2021-12-21 10:44:45 +00:00
meta = with lib; {
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;
};
}