mirror of
https://github.com/engineer-man/piston.git
synced 2025-06-08 03:06:26 +02:00
octave --> nix
This commit is contained in:
parent
66af61c2cb
commit
e7c5b557f9
7 changed files with 31 additions and 36 deletions
22
packages/octave/6.2.0/build.sh
vendored
22
packages/octave/6.2.0/build.sh
vendored
|
@ -1,22 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Build octave from source
|
|
||||||
PREFIX=$(realpath $(dirname $0))
|
|
||||||
|
|
||||||
mkdir -p build
|
|
||||||
|
|
||||||
cd build
|
|
||||||
|
|
||||||
curl -L "https://ftpmirror.gnu.org/octave/octave-6.2.0.tar.gz" -o octave.tar.gz
|
|
||||||
|
|
||||||
tar xzf octave.tar.gz --strip-components=1
|
|
||||||
|
|
||||||
# === autoconf based ===
|
|
||||||
# Disable support for GUI, HDF5 and Java
|
|
||||||
./configure --prefix "$PREFIX" --without-opengl --without-qt --without-x --without-hdf5 --disable-java
|
|
||||||
|
|
||||||
make -j$(nproc)
|
|
||||||
make install -j$(nproc)
|
|
||||||
|
|
||||||
cd ../
|
|
||||||
rm -rf build
|
|
4
packages/octave/6.2.0/environment
vendored
4
packages/octave/6.2.0/environment
vendored
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Path to octave binary
|
|
||||||
export PATH=$PWD/bin:$PATH
|
|
5
packages/octave/6.2.0/metadata.json
vendored
5
packages/octave/6.2.0/metadata.json
vendored
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"language": "octave",
|
|
||||||
"version": "6.2.0",
|
|
||||||
"aliases": ["matlab", "m"]
|
|
||||||
}
|
|
4
packages/octave/6.2.0/run
vendored
4
packages/octave/6.2.0/run
vendored
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Run octave scripts without gui, history, init scripts and initial message
|
|
||||||
octave --no-gui --no-window-system --no-history --no-init-file --no-site-file --norc --quiet "$@"
|
|
1
packages/octave/6.2.0/test.octave
vendored
1
packages/octave/6.2.0/test.octave
vendored
|
@ -1 +0,0 @@
|
||||||
disp('OK')
|
|
|
@ -28,4 +28,5 @@ args: {
|
||||||
"ponylang" = import ./ponylang.nix args;
|
"ponylang" = import ./ponylang.nix args;
|
||||||
"php" = import ./php.nix args;
|
"php" = import ./php.nix args;
|
||||||
"perl" = import ./perl.nix args;
|
"perl" = import ./perl.nix args;
|
||||||
|
"octave" = import ./octave.nix args;
|
||||||
}
|
}
|
||||||
|
|
30
runtimes/octave.nix
Normal file
30
runtimes/octave.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{pkgs, piston, ...}:
|
||||||
|
let
|
||||||
|
pkg = pkgs.octave;
|
||||||
|
in piston.mkRuntime {
|
||||||
|
language = "octave";
|
||||||
|
version = pkg.version;
|
||||||
|
|
||||||
|
aliases = [
|
||||||
|
"matlab"
|
||||||
|
"m"
|
||||||
|
];
|
||||||
|
|
||||||
|
run = ''
|
||||||
|
${pkg}/bin/octave --no-gui --no-window-system --no-history --no-init-file --no-site-file --norc --quiet "$@"
|
||||||
|
'';
|
||||||
|
|
||||||
|
tests = [
|
||||||
|
(piston.mkTest {
|
||||||
|
files = {
|
||||||
|
"test.m" = ''
|
||||||
|
disp("OK");
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
args = [];
|
||||||
|
stdin = "";
|
||||||
|
packages = [];
|
||||||
|
main = "test.m";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue