Closed idontgetoutmuch closed 3 years ago
They are referenced by the generated Nix derivation, specifically in common.nix
. Is it a problem to include them?
Do I need to write a devShell for newbie users to julia2nix frendly?
I was a bit suspicious that I had done something wrong and that somehow julia was just using the toml and not using nix. Looking at the output below, it still feels like that is what is happening though.
julia> using Distributions
using Distributions
ERROR: ArgumentError: Package Distributions not found in current path:
- Run `import Pkg; Pkg.add("Distributions")` to install the Distributions package.
julia> pkg"status"
pkg"status"
Status `~/.julia/environments/v1.5/Project.toml` (empty project)
julia> pkg"activate ."
pkg"activate ."
Activating environment at `~/Dropbox/Tidy/depot/Project.toml`
julia> using Distributions
using Distributions
julia> pkg"status"
pkg"status"
Status `~/Dropbox/Tidy/depot/Project.toml`
[31c24e10] Distributions v0.24.14
Do I need to write a devShell for newbie users to julia2nix frendly?
@GTrunSec if you mean me, I am not sure. What would a devShell
do?
One of my problems was that julia wasn't building in nix in macos and so I had to patch the derivation and use my local nixpkgs.
first, modify { pkgs ? import <nixpkgs>) { } }
to { pkgs ? import (import <your local-nixpkgs path>") { } }:
in default.nix
second, make sure you have done to generated packages.nix with julia2nix
third, run $(nix-build . --no-out-link)/bin/julia
to enter julia
please, check ENV
first, make sure you got DEPOT_PATH as following:
"JULIA_DEPOT_PATH" => "./.julia_depot:/nix/store/w7rzd4jvhcr60j3fgy9j148vmzbhjs5f-julia-depot"
finally, activate your packages.toml in julia repl:
using Pkg
Pkg.activate(".")
using <your package>
the devShell just help your https://github.com/GTrunSec/my-julia2nix-env/blob/main/shell.nix to use direnv or some commands, envrs easily and simply.
first, modify
{ pkgs ? import <nixpkgs>) { } }
to{ pkgs ? import (import <your local-nixpkgs path>") { } }:
indefault.nix
second, make sure you have done to generated packages.nix with
julia2nix
third, run
$(nix-build . --no-out-link)/bin/julia
to enter julia
I have $(nix-build -I nixpkgs=/Users/dom/nixpkgs . --no-out-link)/bin/julia
which should do the same?
to { pkgs ? import (import /Users/dom/nixpkgs") { } }:
then run $(nix-build . --no-out-link)/bin/julia
please, check
ENV
first, make sure you got DEPOT_PATH as following:"JULIA_DEPOT_PATH" => "./.julia_depot:/nix/store/w7rzd4jvhcr60j3fgy9j148vmzbhjs5f-julia-depot"
I have
"JULIA_DEPOT_PATH" => "/Users/dom/.julia:/nix/store/pcsy2x5wivay4fhzk2gm6qiggq29pds6-julia-depot"
so it looks like it is working :-) thanks for your help
Cool, glad things are working. Is there anything else needed on this issue? I didn't totally understand the devShell suggestion so not sure if any action items are desired there.
I think we can close this.
I read the documentation but I don't know why I still need the toml files.