aboutsummaryrefslogtreecommitdiff
path: root/contrib/nix/taler-exchange-dev.nix
blob: 2e5e068e597e9100659361cdde6819c8be567932 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ stdenv, makeWrapper, pkgconfig, autoconf, automake, libtool, ccache, ccache_dir ? ""
, gnunet-dev, postgresql, jansson, libgcrypt, libgnurl, libmicrohttpd }:

stdenv.mkDerivation rec {
  src = ./.;
  name = "taler-exchange-dev";

  buildInputs = [
    makeWrapper pkgconfig autoconf automake libtool ccache
    gnunet-dev postgresql jansson libgcrypt libgnurl libmicrohttpd
  ];

  patchPhase = ''
    if [ -e Makefile ]; then
      make distclean
    fi
  '';

  NIX_CFLAGS_COMPILE = "-ggdb -O0";

  configureFlags = [
    "--enable-gcc-hardening"
    "--enable-linker-hardening"

    "--enable-logging=verbose"
    "--enable-poisoning"
  ];

  preConfigure = ''
    ./bootstrap

    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;

  postInstall = ''
    # Tests can be run this way
    #export GNUNET_PREFIX="$out"
    #export PATH="$out/bin:$PATH"
    #make -k check
  '';

  meta = with stdenv.lib; {
    description = "Exchange for GNU Taler";

    longDescription = ''
    '';

    homepage = https://taler.net/;

    license = licenses.gpl3Plus;
    platforms = platforms.gnu;
    maintainers = with maintainers; [ ];
  };
}