Created
March 3, 2021 09:13
-
-
Save idontgetoutmuch/36d2ffab77defd453b779f2261890a89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
with pkgs; | |
let | |
# The base Julia version | |
baseJulia = julia_15; | |
# Extra libraries for Julia's LD_LIBRARY_PATH. | |
# Recent Julia packages that use Artifacts.toml to specify their dependencies | |
# shouldn't need this. | |
# But if a package implicitly depends on some library being present, you can | |
# add it here. | |
extraLibs = []; | |
# Wrapped Julia with libraries and environment variables. | |
# Note: setting The PYTHON environment variable is recommended to prevent packages | |
# from trying to obtain their own with Conda. | |
julia = runCommand "julia-wrapped" { buildInputs = [makeWrapper]; } '' | |
mkdir -p $out/bin | |
makeWrapper ${baseJulia}/bin/julia $out/bin/julia \ | |
--suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath extraLibs}" \ | |
--set PYTHON ${python3}/bin/python | |
''; | |
in | |
callPackage ./common.nix { | |
inherit julia; | |
# Run Pkg.precompile() to precompile all packages? | |
precompile = true; | |
# Extra arguments to makeWrapper when creating the final Julia wrapper. | |
# By default, it will just put the new depot at the end of JULIA_DEPOT_PATH. | |
# You can add additional flags here. | |
makeWrapperArgs = ""; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> { config.allowBroken = true; } }: | |
let | |
julia = pkgs.julia_15.override { | |
# stdenv = pkgs.overrideCC pkgs.stdenv pkgs.gcc; | |
blas = pkgs.openblas; | |
}; | |
in | |
pkgs.mkShell { | |
buildInputs = [ | |
julia | |
]; | |
MYVARIABLE = "hello"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment