summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2026-03-12 10:00:55 +0100
committerLudovic Courtès <ludo@gnu.org>2026-03-20 13:28:19 +0100
commit6b1a15189e9f02f2962c4885092533f817d0375c (patch)
tree48d47c08476a35a2841f9df3e6a75e9ec35ec17d /etc
parent72e724cef438a7e16052dd1a38bf03027635f2bc (diff)
news: Add entry for record field inherited values.
* etc/news.scm: Add entry. Change-Id: Id4d40ee995f03a8fe785782513f9451c8bd71389 Merges: #6955
Diffstat (limited to 'etc')
-rw-r--r--etc/news.scm40
1 files changed, 39 insertions, 1 deletions
diff --git a/etc/news.scm b/etc/news.scm
index a67f8901e43..de3f24edef6 100644
--- a/etc/news.scm
+++ b/etc/news.scm
@@ -1,6 +1,6 @@
;; GNU Guix news, for use by 'guix pull'.
;;
-;; Copyright © 2019-2025 Ludovic Courtès <ludo@gnu.org>
+;; Copyright © 2019-2026 Ludovic Courtès <ludo@gnu.org>
;; Copyright © 2019–2021, 2024 Tobias Geerinckx-Rice <me@tobias.gr>
;; Copyright © 2019, 2020 Miguel Ángel Arruga Vivas <rosen644835@gmail.com>
;; Copyright © 2019, 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
@@ -43,6 +43,44 @@
(channel-news
(version 0)
+ (entry (commit "a7c8e68dc51144a6d3981b770aca9c4897fc7c0c")
+ (title
+ (en "Records such as packages can refer to inherited values"))
+ (body
+ (en "A new feature has been added to records—the facility used when
+defining packages, services, operating systems, and many other things—that,
+when inheriting from another record, allows you to refer to inherited field
+values. When defining package variants, you may have seen this pattern:
+
+@lisp
+(package
+ (inherit gdb)
+ (inputs (modify-inputs (package-inputs gdb)
+ (delete \"guile\"))))
+@end lisp
+
+This can now be written like this:
+
+@lisp
+(package
+ (inherit gdb)
+ (inputs (modify-inputs inputs ;<- notice the change
+ (delete \"guile\"))))
+@end lisp
+
+Within the @code{inputs} body, the @code{inputs} identifier is now bound to
+the @dfn{inherited value}—i.e., the value this field inherits from @code{gdb}.
+The same mechanism can be used when changing other input fields or the
+@code{arguments} field. It is less verbose but also
+@uref{https://issues.guix.gnu.org/50335, more accurate}.
+
+This change applies to all record types produced by
+@code{define-record-type*}: @code{package}, @code{origin},
+@code{operating-system}, @code{home-environment}, and so on.
+
+Note that this is an incompatible change: the newly introduced
+bindings—@code{inputs} in the example above—could shadow same-named bindings.")))
+
(entry (commit "b52ce9041ad58aeababd2d50d3e72bc23dffff60")
(title
(en "GNOME 48 is now available")