add piston nix pkg for julia
This commit is contained in:
parent
93fa1a9755
commit
25ae43df69
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Install location
|
||||
PREFIX=$(realpath $(dirname $0))
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
# Download and extract Julia source
|
||||
curl -L "https://github.com/JuliaLang/julia/releases/download/v1.5.4/julia-1.5.4.tar.gz" -o julia.tar.gz
|
||||
tar xzf julia.tar.gz --strip-components=1
|
||||
|
||||
# Build
|
||||
echo "JULIA_CPU_TARGET=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)
|
||||
prefix=$PREFIX" > Make.user
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
|
||||
# Cleanup
|
||||
cd ..
|
||||
rm -rf build
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Add Julia binary to path
|
||||
export PATH=$PWD/bin:$PATH
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"language": "julia",
|
||||
"version": "1.5.4",
|
||||
"aliases": ["jl"]
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Run without startup or history file
|
||||
julia --startup-file=no --history-file=no "$@"
|
|
@ -1 +0,0 @@
|
|||
println("OK")
|
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Install location
|
||||
PREFIX=$(realpath $(dirname $0))
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
# Download and extract Julia source
|
||||
curl -L "https://github.com/JuliaLang/julia/releases/download/v1.6.1/julia-1.6.1.tar.gz" -o julia.tar.gz
|
||||
tar xzf julia.tar.gz --strip-components=1
|
||||
|
||||
# Build
|
||||
echo "JULIA_CPU_TARGET=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)
|
||||
prefix=$PREFIX" > Make.user
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
|
||||
# Cleanup
|
||||
cd ..
|
||||
rm -rf build
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Add Julia binary to path
|
||||
export PATH=$PWD/bin:$PATH
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"language": "julia",
|
||||
"version": "1.6.1",
|
||||
"aliases": ["jl"]
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Run without startup or history file
|
||||
julia --startup-file=no --history-file=no "$@"
|
|
@ -1 +0,0 @@
|
|||
println("OK")
|
|
@ -38,4 +38,5 @@ args: {
|
|||
"lolcode" = import ./lolcode.nix args;
|
||||
"sbcl-lisp" = import ./sbcl-lisp.nix args;
|
||||
"jvm-kotlin" = import ./jvm-kotlin.nix args;
|
||||
"julia" = import ./julia.nix args;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
{pkgs, piston, ...}:
|
||||
let
|
||||
pkg = pkgs.julia-bin;
|
||||
in piston.mkRuntime {
|
||||
language = "julia";
|
||||
version = pkg.version;
|
||||
|
||||
aliases = [
|
||||
"jl"
|
||||
];
|
||||
|
||||
run = ''
|
||||
${pkg}/bin/julia --startup-file=no --history-file=no "$@"
|
||||
'';
|
||||
|
||||
tests = [
|
||||
(piston.mkTest {
|
||||
files = {
|
||||
"test.jl" = ''
|
||||
println("OK")
|
||||
'';
|
||||
};
|
||||
args = [];
|
||||
stdin = "";
|
||||
packages = [];
|
||||
main = "test.jl";
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue