summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2020-12-03 14:52:02 +0100
committerGuillaume Le Vaillant <glv@posteo.net>2020-12-05 16:00:57 +0100
commit031fbebafef81244a72e584a46b3fcc219256fcb (patch)
treecd38a73052249dfa4b13abbb7b369634aa25c6da /gnu/packages/patches
parent1ab631d4c043e11e3a820ec929dd4bb14dcbac11 (diff)
downloadguix-031fbebafef81244a72e584a46b3fcc219256fcb.tar.gz
gnu: cl-asdf: Improve priorities of configuration file search.
* gnu/packages/patches/cl-asdf-config-directories.patch: New file.
* gnu/local.mk (dist_PATCH_DATA): Add it.
* gnu/packages/lisp.scm (cl-asdf)[native-inputs]: Add it.
  [arguments]: Apply the new patch.

Co-authored-by: Pierre Neidhardt <mail@ambrevar.xyz>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/cl-asdf-config-directories.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/patches/cl-asdf-config-directories.patch b/gnu/packages/patches/cl-asdf-config-directories.patch
new file mode 100644
index 0000000000..2b1b51932c
--- /dev/null
+++ b/gnu/packages/patches/cl-asdf-config-directories.patch
@@ -0,0 +1,44 @@
+Search for ASDF configuration files first in user directories, and then in
+Guix profiles.
+
+diff -ru a/asdf-3.3.4.lisp b/asdf-3.3.4.lisp
+--- a/asdf-3.3.4.lisp	2020-02-14 20:16:22.000000000 +0100
++++ b/asdf-3.3.4.lisp	2020-12-05 11:09:56.066229482 +0100
+@@ -12535,10 +12535,15 @@
+     (find-preferred-file (system-config-pathnames *output-translations-file*)
+                          :direction direction))
+   (defun user-output-translations-directory-pathname (&key (direction :input))
+-    (xdg-config-pathname *output-translations-directory* direction))
+-  (defun system-output-translations-directory-pathname (&key (direction :input))
+-    (find-preferred-file (system-config-pathnames *output-translations-directory*)
++    (find-preferred-file (list (xdg-config-home *output-translations-directory*))
+                          :direction direction))
++  (defun system-output-translations-directory-pathname (&key (direction :input))
++    `(:output-translations
++      ,@(loop :for dir :in (filter-pathname-set
++                            (xdg-config-dirs
++                             "common-lisp/asdf-output-translations.conf.d/"))
++              :collect `(:include ,dir))
++      :inherit-configuration))
+   (defun environment-output-translations ()
+     (getenv "ASDF_OUTPUT_TRANSLATIONS"))
+ 
+@@ -12921,10 +12926,15 @@
+     (find-preferred-file (system-config-pathnames *source-registry-file*)
+                          :direction direction))
+   (defun user-source-registry-directory (&key (direction :input))
+-    (xdg-config-pathname *source-registry-directory* direction))
+-  (defun system-source-registry-directory (&key (direction :input))
+-    (find-preferred-file (system-config-pathnames *source-registry-directory*)
++    (find-preferred-file (list (xdg-config-home *source-registry-directory*))
+                          :direction direction))
++  (defun system-source-registry-directory (&key (direction :input))
++    `(:source-registry
++      ,@(loop :for dir :in (filter-pathname-set
++                            (xdg-config-dirs
++                             "common-lisp/source-registry.conf.d/"))
++              :collect `(:include ,dir))
++      :inherit-configuration))
+   (defun environment-source-registry ()
+     (getenv "CL_SOURCE_REGISTRY"))
+