@@ -198,3 +198,31 @@ (define-public pkgconf
such as compilers and IDEs to discover and use libraries configured by
pkgconf.")
(license isc)))
+
+(define-public pkgconf-as-pkg-config
+ (package/inherit pkgconf
+ (name "pkgconf-as-pkg-config")
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((pkgconf (search-input-file inputs "bin/pkgconf")))
+ (mkdir-p (string-append #$output "/bin"))
+ (symlink pkgconf (string-append #$output "/bin/pkg-config"))
+
+ ;; Also make 'pkg.m4' available, some packages might expect it.
+ (mkdir-p (string-append #$output "/share"))
+ ;; XXX: Using '#$(this-package-input "pkgconf") here would
+ ;; create a cycle.
+ (symlink (string-append (dirname (dirname pkgconf))
+ "/share/aclocal")
+ (string-append #$output "/share/aclocal"))))))))
+ (native-inputs '())
+ (inputs (list pkgconf))
+ (propagated-inputs '())))