guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: packages: Adjust to new calling convention for "thunked" fields.


From: guix-commits
Subject: 01/01: packages: Adjust to new calling convention for "thunked" fields.
Date: Tue, 26 Mar 2019 05:26:09 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit e6301fb76d0a8d931ece2e18d197e3c2cc53fc6c
Author: Ludovic Courtès <address@hidden>
Date:   Tue Mar 26 10:22:15 2019 +0100

    packages: Adjust to new calling convention for "thunked" fields.
    
    Fixes <https://bugs.gnu.org/34995>.
    
    This is a followup to abd4d6b33dba4de228e90ad15a8efb456fcf7b6e.
    
    * guix/packages.scm (package->bag): Adjust calls to INPUTS,
    PROPAGATED-INPUTS, NATIVE-INPUTS, and ARGS, passing them SELF as an
    argument.
    * gnu/packages/gnucash.scm (gnucash)[arguments]: Use (package-inputs
    this-record) intead of (inputs).
    * gnu/packages/version-control.scm (git)[arguments]: Likewise.
---
 gnu/packages/gnucash.scm         |  5 +++--
 gnu/packages/version-control.scm |  5 +++--
 guix/packages.scm                | 17 +++++++++--------
 3 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index 2207dd3..84b244c 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -27,6 +27,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module ((guix records) #:select (this-record))
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
@@ -165,14 +166,14 @@
                                         ,@(transitive-input-references
                                            'inputs
                                            (map (lambda (l)
-                                                  (assoc l (inputs)))
+                                                  (assoc l (package-inputs 
this-record)))
                                                 '("perl-finance-quote"
                                                   "perl-date-manip"))))
                                        (list
                                         ,@(transitive-input-references
                                            'inputs
                                            (map (lambda (l)
-                                                  (assoc l (inputs)))
+                                                  (assoc l (package-inputs 
this-record)))
                                                 '("perl-finance-quote")))))))))
                        '("gnucash"
                          "gnc-fq-check"
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9a6f96c..fe9b64b 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -51,6 +51,7 @@
   #:use-module (guix build-system haskell)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
+  #:use-module ((guix records) #:select (this-record))
   #:use-module (gnu packages apr)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages documentation)
@@ -408,7 +409,7 @@ as well as the classic centralized workflow.")
                          ,@(transitive-input-references
                             'inputs
                             (map (lambda (l)
-                                   (assoc l (inputs)))
+                                   (assoc l (package-inputs this-record)))
                                  '("perl-authen-sasl"
                                    "perl-net-smtp-ssl"
                                    "perl-io-socket-ssl")))))))
@@ -421,7 +422,7 @@ as well as the classic centralized workflow.")
                          ,@(transitive-input-references
                             'inputs
                             (map (lambda (l)
-                                   (assoc l (inputs)))
+                                   (assoc l (package-inputs this-record)))
                                  '("perl-cgi")))))))
 
               ;; Tell 'git-submodule' where Perl is.
diff --git a/guix/packages.scm b/guix/packages.scm
index d20a256..9d83de3 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1025,9 +1025,10 @@ and return it."
             (match (if graft?
                        (or (package-replacement package) package)
                        package)
-              (($ <package> name version source build-system
-                            args inputs propagated-inputs native-inputs
-                            self-native-input? outputs)
+              ((and self
+                    ($ <package> name version source build-system
+                                 args inputs propagated-inputs native-inputs
+                                 self-native-input? outputs))
                ;; Even though we prefer to use "@" to separate the package
                ;; name from the package version in various user-facing parts
                ;; of Guix, checkStoreName (in nix/libstore/store-api.cc)
@@ -1036,15 +1037,15 @@ and return it."
                              #:system system
                              #:target target
                              #:source source
-                             #:inputs (append (inputs)
-                                              (propagated-inputs))
+                             #:inputs (append (inputs self)
+                                              (propagated-inputs self))
                              #:outputs outputs
                              #:native-inputs `(,@(if (and target
                                                           self-native-input?)
-                                                     `(("self" ,package))
+                                                     `(("self" ,self))
                                                      '())
-                                               ,@(native-inputs))
-                             #:arguments (args))
+                                               ,@(native-inputs self))
+                             #:arguments (args self))
                    (raise (if target
                               (condition
                                (&package-cross-build-system-error



reply via email to

[Prev in Thread] Current Thread [Next in Thread]