I see that instead of symlinking shared libraries are copied in the Nix store. For instance:
ls -ilh /nix/store/j9bsib85kmxrv67w7xwyq9pjnv0cfgr4-mkl-2021.1.1.52/lib/libmkl_sycl.*
34489078 -r-xr-xr-x 1 root root 617M Dec 31 1969 /nix/store/j9bsib85kmxrv67w7xwyq9pjnv0cfgr4-mkl-2021.1.1.52/lib/libmkl_sycl.so
34489079 -r-xr-xr-x 1 root root 617M Dec 31 1969 /nix/store/j9bsib85kmxrv67w7xwyq9pjnv0cfgr4-mkl-2021.1.1.52/lib/libmkl_sycl.so.1
Is that expected? Are symlinks for shared libraries not used at all? Is nix optimise-store the proper way to turn them all to hard links? If the hard links are what I should be using, how to use them in Docker images created with the dockerTools?
I’ve kinda wondered if it would make sense (in terms of speed, accuracy, legibility, maintainability, etc.) to have some sort of ~declarative filesystem-operations tool with a DSL for describing what goes where, what states should be errors, what the permissions should be, etc., with the tool applying the rules in a single invocation.