From d7942ac12ad51615cd43d3debb8b561a503e8fc0 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Mon, 19 Jul 2021 11:08:40 +0200 Subject: packages: Use 'lookup-package-input' and friends instead of 'package-input'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/packages.scm (package-input, package-native-input): Remove. (this-package-input): Use 'lookup-package-input' and 'lookup-package-propagated-input' instead of 'package-input'. (this-package-native-input): Use 'lookup-package-native-input' instead of 'package-input'. Signed-off-by: Ludovic Courtès --- guix/packages.scm | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index d3fa72fd09..2349bb4340 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -550,32 +550,18 @@ object." #f))) (_ #f))) -(define (package-input package name) - "Return the package input NAME of PACKAGE--i.e., an input -from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not -considered. If this input does not exist, return #f instead." - (and=> (or (assoc-ref (package-inputs package) name) - (assoc-ref (package-propagated-inputs package) name)) - car)) - -(define (package-native-input package name) - "Return the native package input NAME of PACKAGE--i.e., an input -from the ‘native-inputs’ field. If this native input does not exist, -return #f instead." - (and=> (assoc-ref (package-native-inputs package) name) - car)) - (define-syntax-rule (this-package-input name) "Return the input NAME of the package being defined--i.e., an input from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not considered. If this input does not exist, return #f instead." - (package-input this-package name)) + (or (lookup-package-input this-package name) + (lookup-package-propagated-input this-package name))) (define-syntax-rule (this-package-native-input name) "Return the native package input NAME of the package being defined--i.e., an input from the ‘native-inputs’ field. If this native input does not exist, return #f instead." - (package-native-input this-package name)) + (lookup-package-native-input this-package name)) ;; Error conditions. -- cgit v1.2.3 nowrap'>AgeCommit message (Expand)Author 2023-03-03services: base: Deprecate 'mingetty-service' procedure....* doc/guix.texi (Base Services): Replace mingetty-service with mingetty-service-type. * gnu/services/base.scm (mingetty-service): Deprecate procedure. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Bruno Victal 2023-03-03services: base: Deprecate 'login-service' procedure....* doc/guix.texi (Base Services): Replace with login-service-type. * gnu/services/base.scm (login-service): Deprecate procedure. * gnu/system/install.scm (%installation-services): Use login-service-type. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Bruno Victal 2023-02-26file-systems: Validate 'no-diratime flag....This follows up on commit c0773455397746b10194bc14c7cef144f4095b65, and adds a comment to avoid this in future. * gnu/system/file-systems.scm (invalid-file-system-flags): Add 'no-diratime to the list of KNOWN-FLAGS. Tobias Geerinckx-Rice 2023-02-08system: Source .profile in skeleton bash_profile....Make it consistent with bash_profile generated by Guix Home. * gnu/system/shadow.scm (default-skeletons)[bash_profile]: Source .profile in skeleton bash_profile. Andrew Tropin 2023-01-30Merge remote-tracking branch 'origin/master' into core-updates... Conflicts: doc/guix.texi gnu/local.mk gnu/packages/admin.scm gnu/packages/base.scm gnu/packages/chromium.scm gnu/packages/compression.scm gnu/packages/databases.scm gnu/packages/diffoscope.scm gnu/packages/freedesktop.scm gnu/packages/gnome.scm gnu/packages/gnupg.scm gnu/packages/guile.scm gnu/packages/inkscape.scm gnu/packages/llvm.scm gnu/packages/openldap.scm gnu/packages/pciutils.scm gnu/packages/ruby.scm gnu/packages/samba.scm gnu/packages/sqlite.scm gnu/packages/statistics.scm gnu/packages/syndication.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/copy.scm guix/scripts/home.scm Efraim Flashner 2023-01-05system: Define default 'PS1' in /etc/bashrc rather than ~/.bashrc....Users can override 'PS1' in ~/.bashrc if they wish. Previously, on Guix Home, the "default" 'PS1' would be set in ~/.bashrc when 'home-bash-configuration-guix-defaults?' is true, preventing users from overriding it via the 'environment-variables' field of 'home-bash-extension'. * gnu/system/shadow.scm (%default-bashrc): Remove 'PS1' setting. * gnu/system.scm (operating-system-etc-service): Define PS1 in /etc/bashrc. * gnu/home/services/shells.scm (add-bash-configuration): When 'home-bash-configuration-guix-defaults?' is true, add a default 'PS1' to ~/.bash_profile. Ludovic Courtès 2023-01-05system, home: Factorize default '.bashrc'....* gnu/system/shadow.scm (%default-bashrc): New variable. Source /etc/bashrc only if it exists. (default-skeletons): Use it. * gnu/home/services/shells.scm (guix-bashrc): Remove. (add-bash-configuration): Refer to '%default-bashrc' instead. Ludovic Courtès 2022-12-26image: Enhance compatibility of the root ext4 partition....Generating a raw-with-offset image would previously not be bootable with U-Boot. * gnu/system/image.scm (root-partition) [file-system-options]: New field. Maxim Cournoyer 2022-12-26images: wsl2: Create XDG_RUNTIME_DIR on first login....* gnu/system/images/wsl2.scm (wsl-boot-program): Create XDG_RUNTIME_DIR on first login and set it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> dan 2022-12-19Merge branch 'version-1.4.0'Ludovic Courtès 2022-12-15install: Make sure uvesafb can be loaded....Fixes <https://issues.guix.gnu.org/60010>. Reported by pelzflorian (Florian Pelz) <pelzflorian@pelzflorian.de>. Previously, the 'modprobe' executable would try and fail to load the module from /lib/modules/*. Set 'LINUX_MODULE_DIRECTORY' to make sure 'modprobe' looks for the module in the right place. * gnu/system/install.scm (uvesafb-shepherd-service)[modprobe]: New variable. In 'start' method, invoke it instead of KMOD/bin/modprobe. Ludovic Courtès 2022-12-16system: examples: Add mode prop line....* gnu/system/examples/asus-c201.tmpl: Add a mode prop line. * gnu/system/examples/bare-bones.tmpl: Likewise. * gnu/system/examples/beaglebone-black.tmpl: Likewise. * gnu/system/examples/desktop.tmpl: Likewise. * gnu/system/examples/docker-image.tmpl: Likewise. * gnu/system/examples/lightweight-desktop.tmpl: Likewise. * gnu/system/examples/raspberry-pi-64-nfs-root.tmpl: Likewise. * gnu/system/examples/raspberry-pi-64.tmpl: Likewise. * gnu/system/examples/vm-image.tmpl: Likewise. Maxim Cournoyer 2022-12-11install: Add lvm2-static system package....* gnu/system/install.scm (%installer-disk-utilities): Add lvm2-static. Tobias Geerinckx-Rice 2022-12-12Merge branch 'version-1.4.0'Ludovic Courtès 2022-12-09system: Remove unused yggdrasil OS template....This file was added in fe1cd098d2b83737e96f19438612291f5a9316e4 but it's not referenced from anywhere, not even gnu/local.mk. Furthermore, we don't normally add full OS examples for the purposes of illustrating the use of a single service. * gnu/system/examples/yggdrasil.tmpl: Remove. Ludovic Courtès 2022-12-06image: Clarify comment....* gnu/system/image.scm: Adjust comment. Ludovic Courtès 2022-12-06system: vm: Non-volatile 'run-vm.sh' creates a CoW image....Previously, copying the image would consume a lot of space and was I/O-intensive, to the point that the marionette connection timeout of 20s could be reached when running tests like "docker-system". * gnu/system/vm.scm (common-qemu-options): Pass 'format=' for each '-drive' option. (system-qemu-image/shared-store-script)[copy-image]: New variable. [builder]: Use it when VOLATILE? is false. Ludovic Courtès 2022-12-06install: Add missing e2fsprogs utility....* gnu/system/install.scm (%installer-disk-utilities): Add e2fsprogs. Reported-by: Adam Kandur <kefironpremise@gmail.com> Maxim Cournoyer 2022-12-06system: Rename and move %base-packages-disk-utilities....Rationale: It is only used in INSTALLATION-OS and doesn't make sense to be used in another context, given that file systems now automatically pull their dependencies since commit 45eac6cdf5c8d9d7b0c564b105c790d2d2007799 (services: Add file system utilities to profile). * gnu/system.scm (%base-packages-disk-utilities): Deprecate and rename to... * gnu/system/install.scm (%installer-disk-utilities): ... this. (installation-os) [packages]: Adjust accordingly. Maxim Cournoyer 2022-12-09system: images: Add networking support to pine64 image....* gnu/system/images/pine64.scm (pine64-barebones-os) [services]: Add dhcp-client-service-type and ntp-service-type to the list of services. [packages]: Add nss-certs to the list of packages. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Gabriel Wicki