Fix build

This commit is contained in:
Eelco Dolstra 2020-07-08 13:25:30 +02:00
parent 08e879c1fa
commit 940d71c32d
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 6 additions and 5 deletions

View file

@ -129,7 +129,7 @@ public:
contains a JSON serialisation of the listing of the NAR
contents) from the binary cache. */
auto now1 = std::chrono::steady_clock::now();
auto s = binaryCache->getFile(storePathToHash(storePath) + ".ls");
auto s = binaryCache->getFile(std::string(baseNameOf(storePath).substr(0, StorePath::HashLen)) + ".ls");
if (!s)
printInfo("warning: no listing of %s in binary cache", storePath);
else {

View file

@ -32,13 +32,13 @@
$(pkg-config --libs nix-main) \
$(pkg-config --libs nix-expr) \
$(pkg-config --libs nix-store) \
-lsqlite3 -lgc -lnixrust
-lsqlite3 -lgc
g++ -Os -g ${./index-debuginfo.cc} -Wall -std=c++14 -o $out/bin/index-debuginfo -I . \
$(pkg-config --cflags nix-main) \
$(pkg-config --libs nix-main) \
$(pkg-config --libs nix-store) \
-lsqlite3 -lnixrust
-lsqlite3
'';
};

View file

@ -11,6 +11,7 @@
#include "thread-pool.hh"
#include "sqlite.hh"
#include "binary-cache-store.hh"
#include "logging.hh"
#include "file-cache.hh"
@ -40,7 +41,7 @@ void mainWrapped(int argc, char * * argv)
Path nixpkgsPath = argv[5];
settings.readOnlyMode = true;
settings.showTrace = true;
loggerSettings.showTrace = true;
auto localStore = openStore();
std::string binaryCacheUri = argv[3];
@ -121,7 +122,7 @@ void mainWrapped(int argc, char * * argv)
}
} catch (AssertionError & e) {
} catch (Error & e) {
e.addPrefix(fmt("in package %s: ", package.attrPath));
e.addTrace({}, hintfmt("in package '%s': ", package.attrPath));
throw;
}