mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
Fix perl build
This commit is contained in:
parent
ef28c7329c
commit
b7eb26e362
1 changed files with 2 additions and 4 deletions
|
@ -256,9 +256,8 @@ SV *
|
||||||
hashPath(char * algo, int base32, char * path)
|
hashPath(char * algo, int base32, char * path)
|
||||||
PPCODE:
|
PPCODE:
|
||||||
try {
|
try {
|
||||||
auto [accessor, canonPath] = PosixSourceAccessor::createAtRoot(path);
|
|
||||||
Hash h = hashPath(
|
Hash h = hashPath(
|
||||||
accessor, canonPath,
|
PosixSourceAccessor::createAtRoot(path),
|
||||||
FileIngestionMethod::Recursive, parseHashAlgo(algo));
|
FileIngestionMethod::Recursive, parseHashAlgo(algo));
|
||||||
auto s = h.to_string(base32 ? HashFormat::Nix32 : HashFormat::Base16, false);
|
auto s = h.to_string(base32 ? HashFormat::Nix32 : HashFormat::Base16, false);
|
||||||
XPUSHs(sv_2mortal(newSVpv(s.c_str(), 0)));
|
XPUSHs(sv_2mortal(newSVpv(s.c_str(), 0)));
|
||||||
|
@ -336,10 +335,9 @@ StoreWrapper::addToStore(char * srcPath, int recursive, char * algo)
|
||||||
PPCODE:
|
PPCODE:
|
||||||
try {
|
try {
|
||||||
auto method = recursive ? FileIngestionMethod::Recursive : FileIngestionMethod::Flat;
|
auto method = recursive ? FileIngestionMethod::Recursive : FileIngestionMethod::Flat;
|
||||||
auto [accessor, canonPath] = PosixSourceAccessor::createAtRoot(srcPath);
|
|
||||||
auto path = THIS->store->addToStore(
|
auto path = THIS->store->addToStore(
|
||||||
std::string(baseNameOf(srcPath)),
|
std::string(baseNameOf(srcPath)),
|
||||||
accessor, canonPath,
|
PosixSourceAccessor::createAtRoot(srcPath),
|
||||||
method, parseHashAlgo(algo));
|
method, parseHashAlgo(algo));
|
||||||
XPUSHs(sv_2mortal(newSVpv(THIS->store->printStorePath(path).c_str(), 0)));
|
XPUSHs(sv_2mortal(newSVpv(THIS->store->printStorePath(path).c_str(), 0)));
|
||||||
} catch (Error & e) {
|
} catch (Error & e) {
|
||||||
|
|
Loading…
Reference in a new issue