Skip to content

Commit

Permalink
Fix build against nix master
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Apr 9, 2020
1 parent 83c1398 commit d11b181
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
10 changes: 5 additions & 5 deletions dwarffs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "logging.hh"
#include "shared.hh"
#include "download.hh"
#include "filetransfer.hh"
#include "archive.hh"
#include "compression.hh"
#include "fs-accessor.hh"
Expand Down Expand Up @@ -163,11 +163,11 @@ std::shared_ptr<DebugFile> haveDebugFileUncached(const std::string & buildId, bo
std::function<std::shared_ptr<DebugFile>(std::string)> tryUri;

tryUri = [&](std::string uri) {
DownloadRequest req(canonUri(uri));
FileTransferRequest req(canonUri(uri));

try {

auto res = getDownloader()->download(req);
auto res = getFileTransfer()->download(req);
assert(res.data);

/* Decompress .xz files. */
Expand Down Expand Up @@ -241,8 +241,8 @@ std::shared_ptr<DebugFile> haveDebugFileUncached(const std::string & buildId, bo
printError("got unsupported data from '%s'", uri);
return std::shared_ptr<DebugFile>();

} catch (DownloadError & e) {
if (e.error != Downloader::NotFound)
} catch (FileTransferError & e) {
if (e.error != FileTransfer::NotFound)
printError("while downloading '%s': %s", uri, e.what());
}

Expand Down
28 changes: 24 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

description = "A filesystem that fetches DWARF debug info from the Internet on demand";

inputs.nixpkgs.url = "nixpkgs/release-20.03";
inputs.nixpkgs.follows = "nix/nixpkgs";

outputs = { self, nixpkgs }:
outputs = { self, nix, nixpkgs }:

let
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
Expand All @@ -16,7 +16,7 @@

overlay = final: prev: {

dwarffs = with final; stdenv.mkDerivation {
dwarffs = with final; let nix = final.nix; in stdenv.mkDerivation {
name = "dwarffs-0.1.${if self ? lastModified then lib.substring 0 8 (self.lastModifiedDate or self.lastModified) else "dirty"}";

buildInputs = [ fuse nix nlohmann_json boost ];
Expand All @@ -41,7 +41,7 @@

defaultPackage = forAllSystems (system: (import nixpkgs {
inherit system;
overlays = [ self.overlay ];
overlays = [ self.overlay nix.overlay ];
}).dwarffs);

checks = forAllSystems (system: {
Expand Down

0 comments on commit d11b181

Please sign in to comment.