diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-12-29 17:35:56 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-12-29 18:24:54 +0100 |
commit | 7a241c63503c81a0f9ed284c7cc66da058aa00cf (patch) | |
tree | ba88a37b0b4bd2fb09edb753f0ed1bb608e73a0a | |
parent | 975183a1c428198fe639fa37552ae069692b1f15 (diff) | |
download | guix-7a241c63503c81a0f9ed284c7cc66da058aa00cf.tar guix-7a241c63503c81a0f9ed284c7cc66da058aa00cf.tar.gz |
inferior: Add 'inferior-package-provenance'.
* guix/inferior.scm (inferior-package-provenance): New procedure.
-rw-r--r-- | guix/inferior.scm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/guix/inferior.scm b/guix/inferior.scm index 71dae89e92..c4969cd56a 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -82,6 +82,7 @@ inferior-package-native-search-paths inferior-package-transitive-native-search-paths inferior-package-search-paths + inferior-package-provenance inferior-package-derivation inferior-package->manifest-entry @@ -416,6 +417,19 @@ package." (define inferior-package-transitive-native-search-paths (cut %inferior-package-search-paths <> 'package-transitive-native-search-paths)) +(define (inferior-package-provenance package) + "Return a \"provenance sexp\" for PACKAGE, an inferior package. The result +is similar to the sexp returned by 'package-provenance' for regular packages." + (inferior-package-field package + '(let* ((describe + (false-if-exception + (resolve-interface '(guix describe)))) + (provenance + (false-if-exception + (module-ref describe + 'package-provenance)))) + (or provenance (const #f))))) + (define (proxy client backend) ;adapted from (guix ssh) "Proxy communication between CLIENT and BACKEND until CLIENT closes the connection, at which point CLIENT is closed (both CLIENT and BACKEND must be |