I’m trying to package something and autoPatchelfHook is complaining:
autoPatchelfHook could not satisfy dependency libcom_err.so.2 wanted by /nix/store/rsrgkb6rkm52fsg6dxb5cdms2l7rrs4b-nsight_systems-2021.5.2.53/nsight-systems/2021.5.2/target-linux-x64/CollectX/RedHat/x86_64/libssl.so.10
But despite my googling, I haven’t been able to track down which package contains this library. How do I located such a file?
You need to build an initial DB using nix-index which will query hydra for path contents and write it to disk. On my machine with my internet connection this took 10 minutes and the file has a size of ~43 MiB.
After that you can use nix-locate to query the database.
I usually rebuild the DB once in a while, roughly after a new release, or whenever I have searched something where I know it has to be there (as I use it already) but nothing was found.