-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wcześniej podpinałem pliki conf z użyciem klauzuli :include. Niestety w ten sposób wymagana jest wyczyszczenie konfiguracji asdf żeby podłapać system nowo dodane do profilu. (Jak się potem okazało, nawet z dodaniem całego katalogu i tak trzeba resetować konfigurację) Zamiast tego mogę przetłumaczyć na sztywno cały katalog systems na fasl. Wymaga to zachowania konwencji gdzie są fasle. Niestety w tym przypadku wymagana jest pełna kopia a nie symlink, chyba że ustawi się asdf:*resolve-symlinks*. Ustawienie samych linków do asdków wymagałoby użycia truename na symlinku, jednak nie wiem jak by to działało gdyby pliki źródłowe znajdowały się w katalogu wyżej niż sam asd. Teraz problemem jest to, że zainstalowanie tej samej biblioteki do profilu kilka razy pod rząd postępująco nadpisuje wcześniejsze pliki - to znaczy że nie są wykrywane konflikty. Może ostatecznie będzie trzeba kopiować źródła.
- Loading branch information
1 parent
9c0dcc9
commit 3ceabab
Showing
4 changed files
with
43 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,49 @@ | ||
diff --git a/output-translations.lisp b/output-translations.lisp | ||
index d2512ba0..af750f38 100644 | ||
--- a/output-translations.lisp | ||
+++ b/output-translations.lisp | ||
@@ -146,6 +146,7 @@ and the order is by decreasing length of namestring of the source pathname.") | ||
@@ -146,6 +146,7 @@ | ||
'(environment-output-translations | ||
user-output-translations-pathname | ||
user-output-translations-directory-pathname | ||
+ nix-profile-output-translations | ||
system-output-translations-pathname | ||
system-output-translations-directory-pathname)) | ||
|
||
@@ -184,6 +185,14 @@ and the order is by decreasing length of namestring of the source pathname.") | ||
@@ -184,6 +185,14 @@ | ||
:direction direction)) | ||
(defun environment-output-translations () | ||
(getenv "ASDF_OUTPUT_TRANSLATIONS")) | ||
+ (defun nix-profile-output-translations () | ||
+ `(:output-translations | ||
+ ,@(loop :for profile :in (reverse (split-string (or (getenv "NIX_PROFILES") ""))) | ||
+ :for share := (subpathname (ensure-directory-pathname profile) "share/") | ||
+ :for conf := (subpathname share *output-translations-directory*) | ||
+ :when (probe-file* conf) | ||
+ :collect `(:include ,conf)) | ||
+ :for sysdir := (namestring (subpathname share "common-lisp/systems/")) | ||
+ :for fasldir := (namestring (subpathname share "common-lisp/fasl/")) | ||
+ :collect `(,sysdir (,fasldir :implementation))) | ||
+ :inherit-configuration)) | ||
|
||
|
||
;;; Processing the configuration. | ||
diff --git a/source-registry.lisp b/source-registry.lisp | ||
index a086cc88..cc317591 100644 | ||
|
||
--- a/source-registry.lisp | ||
+++ b/source-registry.lisp | ||
@@ -187,6 +187,7 @@ after having found a .asd file? True by default.") | ||
@@ -187,6 +187,7 @@ | ||
user-source-registry | ||
user-source-registry-directory | ||
default-user-source-registry | ||
+ nix-profile-source-registry | ||
system-source-registry | ||
system-source-registry-directory | ||
default-system-source-registry) | ||
@@ -227,6 +228,14 @@ after having found a .asd file? True by default.") | ||
@@ -227,5 +228,11 @@ | ||
:direction direction)) | ||
(defun environment-source-registry () | ||
(getenv "CL_SOURCE_REGISTRY")) | ||
+ (defun nix-profile-source-registry () | ||
+ `(:source-registry | ||
+ ,@(loop :for profile :in (reverse (split-string (or (getenv "NIX_PROFILES") ""))) | ||
+ :for share := (subpathname (ensure-directory-pathname profile) "share/") | ||
+ :for conf := (subpathname share *source-registry-directory*) | ||
+ :when (probe-file* conf) | ||
+ :collect `(:include ,conf)) | ||
+ :collect `(:tree ,(namestring (subpathname share (parse-unix-namestring "common-lisp/systems/"))))) | ||
+ :inherit-configuration)) | ||
|
||
|
||
;;; Process the source-registry configuration | ||
;;; Process the source-registry configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters