aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-03-29 18:57:10 +0200
committerLudovic Courtès <ludo@gnu.org>2020-03-29 23:14:28 +0200
commit71d17a09ee133ee4232f08cd8b60ae4373eea6cf (patch)
tree11e681aa758a7fd6f3b93c3520049e005f17ded1
parent5a17b9b673c9509ac31401fa60aa0a010656e8ac (diff)
downloadpatches-71d17a09ee133ee4232f08cd8b60ae4373eea6cf.tar
patches-71d17a09ee133ee4232f08cd8b60ae4373eea6cf.tar.gz
gnu: commencement: Micro-optimize the package graph.
This removes 2 'add-data-to-store-cache' lookups. * gnu/packages/commencement.scm (flex-boot0): Move (package (inherit …)) outside the 'propagated-inputs' field to avoid creating a new node each time the field is accessed.
-rw-r--r--gnu/packages/commencement.scm31
1 files changed, 16 insertions, 15 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 42d1132fba..9da0f77879 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
@@ -1760,20 +1760,21 @@ exec " gcc "/bin/" program
(define flex-boot0
;; This Flex is needed to build MiG as well as Linux-Libre headers.
- (package
- (inherit flex)
- (native-inputs `(("bison" ,bison-boot0)))
- (propagated-inputs
- ;; XXX: Here we use an 'm4-boot0' package that's not eq? so that it
- ;; appears twice in '%build-inputs', like when we were using
- ;; 'package-with-explicit-inputs'.
- ;; TODO: Remove this hack on the next rebuild cycle.
- `(("m4" ,(package (inherit m4-boot0*)))))
- (inputs (%boot0-inputs))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:tests? #f))))
+ (let ((m4-boot0* (package (inherit m4-boot0*))))
+ (package
+ (inherit flex)
+ (native-inputs `(("bison" ,bison-boot0)))
+ (propagated-inputs
+ ;; XXX: Here we use an 'm4-boot0' package that's not eq? so that it
+ ;; appears twice in '%build-inputs', like when we were using
+ ;; 'package-with-explicit-inputs'.
+ ;; TODO: Remove this hack on the next rebuild cycle.
+ `(("m4" ,m4-boot0*)))
+ (inputs (%boot0-inputs))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f)))))
(define linux-libre-headers-boot0
(mlambda ()