mirror of
https://github.com/NixOS/nix
synced 2025-06-27 12:41:15 +02:00
Move code around
This commit is contained in:
parent
d14b1c261c
commit
d33dd6e6c0
7 changed files with 22 additions and 6 deletions
|
@ -7,3 +7,5 @@ libutil_DIR := $(d)
|
|||
libutil_SOURCES := $(wildcard $(d)/*.cc)
|
||||
|
||||
libutil_LDFLAGS = $(LIBLZMA_LIBS) -lbz2 -pthread $(OPENSSL_LIBS) $(LIBBROTLI_LIBS) $(BOOST_LDFLAGS) -lboost_context
|
||||
|
||||
libutil_LIBS = libnixrust
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "logging.hh"
|
||||
#include "rust.hh"
|
||||
#include "rust-ffi.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
14
src/libutil/tarfile.cc
Normal file
14
src/libutil/tarfile.cc
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include "rust-ffi.hh"
|
||||
|
||||
extern "C" {
|
||||
rust::CBox2<rust::Result<std::tuple<>>> unpack_tarfile(rust::Source source, rust::StringSlice dest_dir);
|
||||
}
|
||||
|
||||
namespace nix {
|
||||
|
||||
void unpackTarfile(Source & source, Path destDir)
|
||||
{
|
||||
unpack_tarfile(source, destDir).use()->unwrap();
|
||||
}
|
||||
|
||||
}
|
7
src/libutil/tarfile.hh
Normal file
7
src/libutil/tarfile.hh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "serialise.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
void unpackTarfile(Source & source, Path destDir);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue