1 # This setup hook adds every propagated lisp system to CL_SOURCE_REGISTRY
5 for dep
in $propagatedBuildInputs; do
10 addFileToSearchPathWithCustomDelimiter
() {
14 if [[ -f "$file" && "${!varName:+${delimiter}${!varName}${delimiter}}" \
15 != *"${delimiter}${file}${delimiter}"* ]]; then
16 export "${varName}=${!varName:+${!varName}${delimiter}}${file}"
20 addFileToSearchPath
() {
21 addFileToSearchPathWithCustomDelimiter
":" "$@"
26 if [ -v seen
[$dep] ]; then
36 jar
) addFileToSearchPath
"CLASSPATH" "$file" ;;
37 class
) addToSearchPath
"CLASSPATH" "${file%/*}" ;;
38 so
) addToSearchPath
"LD_LIBRARY_PATH" "${file%/*}" ;;
39 dylib
) addToSearchPath
"DYLD_LIBRARY_PATH" "${file%/*}" ;;
40 asd
) addToSearchPath
"CL_SOURCE_REGISTRY" "$path//" ;;
42 done < <(find "$path" -type f
,l
-name '*.asd' -o -name '*.jar' \
43 -o -name '*.class' -o -name '*.so' -o -name '*.dylib')
45 local prop
="$dep/nix-support/propagated-build-inputs"
47 if [ -e "$prop" ]; then
49 for new_system
in $
(cat $prop); do
50 _addToAsdfPath
"$new_system"
56 # addEnvHooks "$targetOffset" buildAsdfPath