[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r38073 - gnunet
From: |
gnunet |
Subject: |
[GNUnet-SVN] r38073 - gnunet |
Date: |
Thu, 6 Oct 2016 18:01:48 +0200 |
Author: tg
Date: 2016-10-06 18:01:48 +0200 (Thu, 06 Oct 2016)
New Revision: 38073
Modified:
gnunet/default.nix
Log:
nix: debug build, ccache
Modified: gnunet/default.nix
===================================================================
--- gnunet/default.nix 2016-10-06 15:54:30 UTC (rev 38072)
+++ gnunet/default.nix 2016-10-06 16:01:48 UTC (rev 38073)
@@ -34,9 +34,24 @@
# c) use nixpkgs at a given path
# --arg pkgs /path/to/nixpkgs
#
+## CCACHE
+#
+# To enable ccache, use the following:
+#
+# --argstr ccache_dir /var/cache/ccache
-{ pkgs ? null }:
+# or when using nix-shell:
+# --argstr ccache_dir ~/.ccache
+#
+# and make sure the given directory is writable by the nixpkgs group when
using nix-build or nix-env -i,
+# or the current user when using nix-shell
+#
+{
+ pkgs ? null,
+ ccache_dir ? "",
+}:
+
let
syspkgs = import <nixpkgs> { };
pinpkgs = syspkgs.fetchFromGitHub {
@@ -54,13 +69,14 @@
import <nixpkgs> { }
else
import pkgs {};
+ stdenv = usepkgs.stdenvAdapters.keepDebugInfo usepkgs.stdenv;
-in with usepkgs; usepkgs.stdenv.mkDerivation rec {
+in with usepkgs; stdenv.mkDerivation rec {
src = ./.;
name = "gnunet-dev";
buildInputs = [
- makeWrapper pkgconfig
+ makeWrapper pkgconfig autoconf automake ccache
adns curl gettext gmp gnutls gss ncurses openldap zlib sqlite mariadb
postgresql
libextractor libgcrypt libgnurl libidn libmicrohttpd
libpsl libtool libunistring libxml2
@@ -70,6 +86,8 @@
test -e Makefile && make distclean
'';
+ NIX_CFLAGS_COMPILE = "-ggdb -O0";
+
configureFlags = [
"--enable-gcc-hardening"
"--enable-linker-hardening"
@@ -82,6 +100,13 @@
preConfigure = ''
./bootstrap
configureFlags="$configureFlags --with-nssdir=$out/lib"
+
+ if [ -n "${ccache_dir}" ]; then
+ export CC='ccache gcc'
+ export CCACHE_COMPRESS=1
+ export CCACHE_DIR="${ccache_dir}"
+ export CCACHE_UMASK=007
+ fi
'';
doCheck = false;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r38073 - gnunet,
gnunet <=