diff options
Diffstat (limited to 'guix/store.scm')
-rw-r--r-- | guix/store.scm | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/guix/store.scm b/guix/store.scm index 43cfda9214..7f54b87db1 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -95,8 +95,10 @@ path-info-registration-time path-info-nar-size + built-in-builders references references/substitutes + references* requisites referrers optimize-store @@ -187,7 +189,8 @@ (query-substitutable-paths 32) (query-valid-derivers 33) (optimize-store 34) - (verify-store 35)) + (verify-store 35) + (built-in-builders 80)) (define-enumerate-type hash-algo ;; hash.hh @@ -283,7 +286,7 @@ (write-string (bytevector->base16-string arg) p)))) (define-syntax read-arg - (syntax-rules (integer boolean string store-path store-path-list + (syntax-rules (integer boolean string store-path store-path-list string-list substitutable-path-list path-info base16) ((_ integer p) (read-int p)) @@ -295,6 +298,8 @@ (read-store-path p)) ((_ store-path-list p) (read-store-path-list p)) + ((_ string-list p) + (read-string-list p)) ((_ substitutable-path-list p) (read-substitutable-path-list p)) ((_ path-info p) @@ -914,6 +919,23 @@ that there is no guarantee that the order of the resulting list matches the order of PATHS." substitutable-path-list)) +(define built-in-builders + (let ((builders (operation (built-in-builders) + "Return the built-in builders." + string-list))) + (lambda (store) + "Return the names of the supported built-in derivation builders +supported by STORE." + ;; Check whether STORE's version supports this RPC and built-in + ;; derivation builders in general, which appeared in Guix > 0.11.0. + ;; Return the empty list if it doesn't. Note that this RPC does not + ;; exist in 'nix-daemon'. + (if (or (> (nix-server-major-version store) #x100) + (and (= (nix-server-major-version store) #x100) + (>= (nix-server-minor-version store) #x60))) + (builders store) + '())))) + (define-operation (optimize-store) "Optimize the store by hard-linking identical files (\"deduplication\".) Return #t on success." @@ -1149,6 +1171,9 @@ where FILE is the entry's absolute file name and STAT is the result of (define set-build-options* (store-lift set-build-options)) +(define references* + (store-lift references)) + (define-inlinable (current-system) ;; Consult the %CURRENT-SYSTEM fluid at bind time. This is equivalent to ;; (lift0 %current-system %store-monad), but inlinable, thus avoiding |