diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2024-01-31 11:57:11 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2024-02-02 09:46:51 -0500 |
commit | 1ebdd93e655eac0eda03dce35697fe16cb88d354 (patch) | |
tree | 559a9db534f7fb09a115dee2722104c02cc92278 | |
parent | 508f981c6168b3297ba9f2c0bc411759b10156e1 (diff) |
gnu: pkg-config: Alias to pkgconf-as-pkg-config.origin/wip-cu-switch-to-pkgconf
This switches the default pkg-config implementation used in Guix to pkgconf.
* gnu/packages/pkg-config.scm (pkg-config): Define as pkgconf-as-pkg-config.
(%pkgconf-with-tests): Renamed from %pkgconf.
(%pkgconf): New minimal variant to avoid circular dependencies for bootstrap
sensitive packages.
(%pkgconf-as-pkg-config): Delete now inherited hidden property.
Change-Id: Id2b9f40f8f09babae9c6dfc47d1de071ce78e011
-rw-r--r-- | gnu/packages/pkg-config.scm | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm index 17b3358dfd..3056921232 100644 --- a/gnu/packages/pkg-config.scm +++ b/gnu/packages/pkg-config.scm @@ -31,7 +31,9 @@ #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (guix memoization) - #:export (pkg-config + #:use-module (srfi srfi-1) + #:export (old-pkg-config ;the original + pkg-config ;alias for pkgconf-as-pkg-config pkgconf pkgconf-as-pkg-config)) @@ -89,7 +91,9 @@ on where to find glib (or other libraries). It is language-agnostic, so it can be used for defining the location of documentation tools, for instance."))) -(define-public %pkgconf +;;; This is the package exposed to the CLI, to ease updates via 'guix +;;; refresh'. +(define-public %pkgconf-with-tests (package (name "pkgconf") (version "2.1.0") @@ -119,6 +123,13 @@ such as compilers and IDEs to discover and use libraries configured by pkgconf.") (license isc))) +;;; This is the minimal, untested variant used to avoid circular dependencies. +(define-public %pkgconf + (hidden-package + (package/inherit %pkgconf-with-tests + (arguments (list #:tests? #f)) + (native-inputs '())))) + (define-public %pkgconf-as-pkg-config (package (inherit %pkgconf) @@ -141,7 +152,8 @@ pkgconf.") (string-append #$output "/share/aclocal")))))) (native-inputs '()) (inputs '()) - (propagated-inputs '()))) + (propagated-inputs '()) + (properties (alist-delete 'hidden? (package-properties %pkgconf))))) ;;; @@ -216,7 +228,7 @@ GNU triplet." ;; These are a hacks for automatically choosing the native or the cross ;; `pkg-config' depending on whether it's being used in a cross-build ;; environment or not. -(define-syntax pkg-config +(define-syntax old-pkg-config (identifier-syntax (pkg-config-for-target (%current-target-system)))) (define-syntax pkgconf @@ -226,6 +238,11 @@ GNU triplet." (identifier-syntax (pkgconf-as-pkg-config-for-target (%current-target-system)))) +;;; This alias is to ensure we use pkgconf instead of pkg-config across Guix, +;;; which includes welcome refinements such as proper handling of the +;;; Requires.private field. +(define pkg-config pkgconf-as-pkg-config) + ;;; ;;; pkg-config packages for native use (build-time only). |