Julia2Nix.jl
Julia2Nix.jl copied to clipboard
The artifacts solution for Julia project
@samuela
As one of Julia's nix users, I have some questions for you.
- What do you think about the artifacts issue?
- The pathelf can only relieve some pain, but how to path them automatically in different - projecl.toml paths that are still an issue.
- What are your thoughts on how to replace artifacts with nix-store?
What is the "artifacts issue"? I don't have any context for what's going on here
Also what's the relation between this issue and https://github.com/olynch/scientific-fhs/issues/6#event-6655419832?
I'm looking for a solution when Julia packages download pre-built binaries. like https://discourse.nixos.org/t/system-with-nixos-how-to-add-another-extra-distribution/5767/22 mentioned.
Currently, I try to use julia2nix.jl which is like Crane to provide a way to build julia project with nix.
Also, You can try the following command to understand this behavior.
nix build github:JuliaCN/Julia2Nix.jl#packages.x86_64-linux.build-project --print-build-logs
Or nix run
. Totally building and running with nix.
nix run github:JuliaCN/Julia2Nix.jl#packages.x86_64-linux.build-project -- -e "import Julia2Nix"
- But You can't run any artifacts.
./result/artifacts/02d9b78ed041cc654102f58897ae46fac83ca63f/bin/openssl
zsh: no such file or directory: ./result/artifacts/02d9b78ed041cc654102f58897ae46fac83ca63f/bin/openssl
Also what's the relation between this issue and olynch/scientific-fhs#6 (comment)?
sorry to bother you, but this question should be here. (related to https://github.com/olynch/scientific-fhs/issues/5)
This was a crude approach to solve the pathelf issue with artifacts.
Ahh, ok. Hmm, I'm not sure I know exactly what to do, but I would try creating some kind of derivation that does patchelf --add-needed
and then uses autoPatchelfHook
to resolve things.
I don't know that there's a great way to do this. It looks like https://pkgdocs.julialang.org/v1/artifacts/#Overriding-artifact-locations would also be a useful ingredient
I don't know that there's a great way to do this. It looks like https://pkgdocs.julialang.org/v1/artifacts/#Overriding-artifact-locations would also be a useful ingredient
Agreed. It looks like we need a mapping of nixpkgs to the current hashes of artifacts.