mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
badvpn: Add debug flag to enable assertions.
This commit is contained in:
parent
faaa8a6acf
commit
4664321cd3
@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl, cmake, openssl, nss, pkgconfig, nspr, bash}:
|
||||
{stdenv, fetchurl, cmake, openssl, nss, pkgconfig, nspr, bash, debug ? false}:
|
||||
let
|
||||
s = # Generated upstream information
|
||||
rec {
|
||||
@ -12,6 +12,7 @@ let
|
||||
buildInputs = [
|
||||
cmake openssl nss pkgconfig nspr
|
||||
];
|
||||
compileFlags = "-O3 ${stdenv.lib.optionalString (!debug) "-DNDEBUG"}";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit (s) name version;
|
||||
@ -23,6 +24,7 @@ stdenv.mkDerivation {
|
||||
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 '{}' ';'
|
||||
cmakeFlagsArray=("-DCMAKE_BUILD_TYPE=" "-DCMAKE_C_FLAGS=${compileFlags}");
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
Loading…
Reference in New Issue
Block a user