index-debuginfo: support building with Nix >= 2.19
This commit is contained in:
parent
c09f3125d5
commit
50daba62af
|
@ -17,14 +17,17 @@
|
||||||
sqlite
|
sqlite
|
||||||
];
|
];
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = let
|
||||||
|
nixHasSignalsHh = nixpkgs.lib.strings.versionAtLeast nix.version "2.19";
|
||||||
|
in ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|
||||||
g++ -Os -g ${./index-debuginfo.cc} -Wall -std=c++14 -o $out/bin/index-debuginfo -I . \
|
g++ -Os -g ${./index-debuginfo.cc} -Wall -std=c++14 -o $out/bin/index-debuginfo -I . \
|
||||||
$(pkg-config --cflags nix-main) \
|
$(pkg-config --cflags nix-main) \
|
||||||
$(pkg-config --libs nix-main) \
|
$(pkg-config --libs nix-main) \
|
||||||
$(pkg-config --libs nix-store) \
|
$(pkg-config --libs nix-store) \
|
||||||
-lsqlite3
|
-lsqlite3 \
|
||||||
|
${nixpkgs.lib.optionalString nixHasSignalsHh "-DHAS_SIGNALS_HH"}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
#include "thread-pool.hh"
|
#include "thread-pool.hh"
|
||||||
#include "nar-info.hh"
|
#include "nar-info.hh"
|
||||||
|
|
||||||
|
// https://github.com/NixOS/nix/commit/ac89bb064aeea85a62b82a6daf0ecca7190a28b7
|
||||||
|
#ifdef HAS_SIGNALS_HH
|
||||||
|
#include "signals.hh"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
// cache.nixos.org/debuginfo/<build-id>
|
// cache.nixos.org/debuginfo/<build-id>
|
||||||
|
|
Loading…
Reference in a new issue