aboutsummaryrefslogtreecommitdiff
path: root/perl/lib
diff options
context:
space:
mode:
Diffstat (limited to 'perl/lib')
-rw-r--r--perl/lib/Nix/Store.pm1
-rw-r--r--perl/lib/Nix/Store.xs11
2 files changed, 12 insertions, 0 deletions
diff --git a/perl/lib/Nix/Store.pm b/perl/lib/Nix/Store.pm
index 8312a732c..2e79c74fe 100644
--- a/perl/lib/Nix/Store.pm
+++ b/perl/lib/Nix/Store.pm
@@ -14,6 +14,7 @@ our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw(
isValidPath queryReferences queryPathInfo queryDeriver queryPathHash
+ queryPathFromHashPart
topoSortPaths computeFSClosure followLinksToStorePath exportPaths
hashPath hashFile hashString
addToStore makeFixedOutputPath
diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs
index 2ebff5575..76de674e6 100644
--- a/perl/lib/Nix/Store.xs
+++ b/perl/lib/Nix/Store.xs
@@ -108,6 +108,17 @@ SV * queryPathInfo(char * path, int base32)
}
+SV * queryPathFromHashPart(char * hashPart)
+ PPCODE:
+ try {
+ doInit();
+ Path path = store->queryPathFromHashPart(hashPart);
+ XPUSHs(sv_2mortal(newSVpv(path.c_str(), 0)));
+ } catch (Error & e) {
+ croak(e.what());
+ }
+
+
SV * computeFSClosure(int flipDirection, int includeOutputs, ...)
PPCODE:
try {