Skip to content

Commit

Permalink
feat: enrich julia example
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Oct 29, 2023
1 parent 945f765 commit 7ffbf50
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
11 changes: 11 additions & 0 deletions examples/julia/minimal/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{pkgs, ...}: {
kernel.julia.minimal-example = {
enable = true;
override = {
augmentedRegistry = pkgs.fetchFromGitHub {
owner = "CodeDownIO";
repo = "General";
rev = "840f93574326361e2614fc5a4c2413f07840215a";
sha256 = "sha256-UedaTpQwkuSZ/o4kLX/Jg8eDnL5IFI4XfYsJMRwBAKE=";
};
};
extraJuliaPackages = [
"Plots"
];
};
}
6 changes: 3 additions & 3 deletions modules/kernels/julia/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
displayName ? "Julia",
requiredRuntimePackages ? [],
runtimePackages ? [],
julia ? pkgs.julia,
julia,
ijuliaRev ? "Vo51o",
extraJuliaPackages ? [],
override ? {},
Expand All @@ -35,7 +35,7 @@

allRuntimePackages = requiredRuntimePackages ++ runtimePackages;

env = (self.inputs.nixpkgs-julia.legacyPackages.${system}.julia_19.withPackages.override override) ([
env = (julia.withPackages.override override) ([
"IJulia"
]
++ extraJuliaPackages);
Expand Down Expand Up @@ -78,7 +78,7 @@
};
julia = lib.mkOption {
type = types.package;
default = config.nixpkgs.julia;
default = config.nixpkgs.julia_19;
description = lib.mdDoc ''
Julia Version
'';
Expand Down
2 changes: 2 additions & 0 deletions modules/types/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ in
default =
if kernelName == "scala"
then nixpkgsArg self.inputs.nixpkgs-stable
else if kernelName == "julia"
then nixpkgsArg self.inputs.nixpkgs-julia
else nixpkgsArg self.inputs.nixpkgs;
defaultText = lib.literalExpression "self.inputs.nixpkgs";
example = lib.literalExpression "self.inputs.nixpkgs";
Expand Down

0 comments on commit 7ffbf50

Please sign in to comment.