mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
Merge pull request #4762 from ambrop72/badvpn-debug
badvpn: Add debug flag to enable assertions.
This commit is contained in:
commit
c2d4fd7360
@ -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