mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
* download-using-manifests: use the Perl bindings.
This commit is contained in:
parent
b1eb8f4249
commit
1749a7b0ae
3 changed files with 45 additions and 38 deletions
|
@ -12,7 +12,11 @@ our %EXPORT_TAGS = ( 'all' => [ qw( ) ] );
|
|||
|
||||
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||
|
||||
our @EXPORT = qw(isValidPath topoSortPaths computeFSClosure followLinksToStorePath exportPaths);
|
||||
our @EXPORT = qw(
|
||||
isValidPath queryReferences queryPathInfo queryDeriver queryPathHash
|
||||
topoSortPaths computeFSClosure followLinksToStorePath exportPaths
|
||||
hashPath
|
||||
);
|
||||
|
||||
our $VERSION = '0.15';
|
||||
|
||||
|
|
|
@ -159,3 +159,14 @@ void exportPaths(int fd, int sign, ...)
|
|||
} catch (Error & e) {
|
||||
croak(e.what());
|
||||
}
|
||||
|
||||
|
||||
SV * hashPath(char * algo, int base32, char * path)
|
||||
PPCODE:
|
||||
try {
|
||||
Hash h = hashPath(parseHashType(algo), path).first;
|
||||
string s = base32 ? printHash32(h) : printHash(h);
|
||||
XPUSHs(sv_2mortal(newSVpv(s.c_str(), 0)));
|
||||
} catch (Error & e) {
|
||||
croak(e.what());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue