Skip to content

Commit 66dd6a0

Browse files
committed
nix: Oops, linuxism in library name
1 parent 3676460 commit 66dd6a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

flake.nix

+5-1
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,13 @@
114114
]);
115115
preBuild = lib.optionalString enablePython ''
116116
make -C python bifrost/libbifrost_generated.py
117-
sed "s:\(load_library\)(\"bifrost\"):\1('$out/lib/libbifrost.so'):"\
117+
sed -e "s:^add_library_search_dirs(\[:&'$out/lib':" \
118+
-e 's:name_formats = \["%s":&,"lib%s","lib%s.so":' \
118119
-i python/bifrost/libbifrost_generated.py
119120
'';
121+
# This can be a helpful addition to above sed; prints each path
122+
# tried when loading library:
123+
# -e "s:return self\.Lookup(path):print(path); &:" \
120124
makeFlags =
121125
lib.optionals enableCuda [ "CUDA_LIBDIR64=$(CUDA_HOME)/lib" ];
122126
preInstall = ''

0 commit comments

Comments
 (0)