(define-content-hash-constructor build-content-hash
(sha256 32)
- (sha512 64))
+ (sha512 64)
+ (sha3-256 32)
+ (sha3-512 64)
+ (blake2s-256 64))
(define-syntax content-hash
(lambda (s)
(define (print-content-hash hash port)
(format port "#<content-hash ~a:~a>"
(content-hash-algorithm hash)
- (bytevector->nix-base32-string (content-hash-value hash))))
+ (and=> (content-hash-value hash)
+ bytevector->nix-base32-string)))
(set-record-type-printer! <content-hash> print-content-hash)
(define (bag-transitive-inputs bag)
"Same as 'package-transitive-inputs', but applied to a bag."
- (parameterize ((%current-target-system #f))
+ (parameterize ((%current-target-system #f)
+ (%current-system (bag-system bag)))
(transitive-inputs (bag-direct-inputs bag))))
(define (bag-transitive-build-inputs bag)
"Same as 'package-transitive-native-inputs', but applied to a bag."
- (parameterize ((%current-target-system #f))
+ (parameterize ((%current-target-system #f)
+ (%current-system (bag-system bag)))
(transitive-inputs (bag-build-inputs bag))))
(define (bag-transitive-host-inputs bag)
"Same as 'package-transitive-target-inputs', but applied to a bag."
- (parameterize ((%current-target-system (bag-target bag)))
+ (parameterize ((%current-target-system (bag-target bag))
+ (%current-system (bag-system bag)))
(transitive-inputs (bag-host-inputs bag))))
(define (bag-transitive-target-inputs bag)
"Return the \"target inputs\" of BAG, recursively."
- (parameterize ((%current-target-system (bag-target bag)))
+ (parameterize ((%current-target-system (bag-target bag))
+ (%current-system (bag-system bag)))
(transitive-inputs (bag-target-inputs bag))))
(define* (package-closure packages #:key (system (%current-system)))