New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
findlib: make scripts using #use "topfind"
work
#45799
Conversation
Thanks for working on this. If this makes As a minor remark, I find the wording “make [it] work” a bit misleading: it still does not work but is automatically rewritten into something that does; right? |
#use "topfind"
work
dd885e8
to
bd94b11
Compare
bd94b11
to
a747669
Compare
OK, I did this. Tried running nox-review but my nix daemon ran out of memory :( |
@GrahamcOfBorg build ocamlPackages.decompress |
Failure on x86_64-linux (full log) Attempted: ocamlPackages.decompress Partial log (click to expand)
|
Failure on aarch64-linux (full log) Attempted: ocamlPackages.decompress Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: ocamlPackages.decompress Partial log (click to expand)
|
Ugh, thanks for finding that ... looks like the substituter needs to be a bit more generous with the syntax it allows... |
You can also try nix-review instead of |
Hm. So I fixed decompress, but digestif fails because it has a |
I’m starting to wonder whether this is a good thing to do (to rewrite source code so as to turn relative paths into absolute ones). It does not really help. Thinking aloud: maybe a way to address this issue would be to acknowledge that |
Honestly i'm not too against that idea. Another alternative would be to have a wrapper of I really only want these scripts to work out of the box, I am not wedded to this method. |
Make sense to have a wrapper, than people do not have to patch there source code as well. |
This pull request has been mentioned on Nix community. There might be relevant details there: https://discourse.nixos.org/t/ocaml-utop-on-nixos-not-detecting-libraries/1587/5 |
Are there any updates on this pull request, please? |
Thank you for your contributions.
|
Closing due to inactivity. Feel free to reopen the discussion. |
Motivation for this change
Up to now packages that use Ocaml as a scripting language have needed special handholding to work in nix (see
pkgs/development/ocaml-modules/topkg
for instance, becausetopfind
which is used by most of them to find libraries is installed as part of this package, notocaml
itself, and therefore isn't in the default library search path for the Ocaml toplevel. This patch solves that issue by adding a setup hook to rewrite uses oftopfind
to use the full path.This improves the situation for #16085 although it does not fully address interactive use.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)