Merge pull request #108562 from KarlJoad/octave-modules

This commit is contained in:
Doron Behar 2021-02-24 21:31:24 +02:00 committed by GitHub
commit aca03db091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
79 changed files with 2757 additions and 99 deletions

View File

@ -0,0 +1,83 @@
{ stdenv, octave, buildEnv
, makeWrapper, texinfo
, octavePackages
, wrapOctave
, computeRequiredOctavePackages
, extraLibs ? []
, extraOutputsToInstall ? []
, postBuild ? ""
, ignoreCollisions ? false
}:
# Create an octave executable that knows about additional packages
let
packages = computeRequiredOctavePackages extraLibs;
in buildEnv {
name = "${octave.name}-env";
paths = extraLibs ++ [ octave ];
inherit ignoreCollisions;
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
buildInputs = [ makeWrapper texinfo wrapOctave ];
# During "build" we must first unlink the /share symlink to octave's /share
# Then, we can re-symlink the all of octave/share, except for /share/octave
# in env/share/octave, re-symlink everything from octave/share/octave and then
# perform the pkg install.
postBuild = ''
. "${makeWrapper}/nix-support/setup-hook"
# The `makeWrapper` used here is the one defined in
# ${makeWrapper}/nix-support/setup-hook
if [ -L "$out/bin" ]; then
unlink $out/bin
mkdir -p "$out/bin"
cd "${octave}/bin"
for prg in *; do
if [ -x $prg ]; then
makeWrapper "${octave}/bin/$prg" "$out/bin/$prg" --set OCTAVE_SITE_INITFILE "$out/share/octave/site/m/startup/octaverc"
fi
done
cd $out
fi
# Remove symlinks to the input tarballs, they aren't needed.
rm $out/*.tar.gz
createOctavePackagesPath $out ${octave}
for path in ${stdenv.lib.concatStringsSep " " packages}; do
if [ -e $path/*.tar.gz ]; then
$out/bin/octave-cli --eval "pkg local_list $out/.octave_packages; \
pkg prefix $out/${octave.octPkgsPath} $out/${octave.octPkgsPath}; \
pfx = pkg (\"prefix\"); \
pkg install -nodeps -local $path/*.tar.gz"
fi
done
# Re-write the octave-wide startup file (share/octave/site/m/startup/octaverc)
# To point to the new local_list in $out
addPkgLocalList $out ${octave}
wrapOctavePrograms "${stdenv.lib.concatStringsSep " " packages}"
'' + postBuild;
inherit (octave) meta;
passthru = octave.passthru // {
interpreter = "$out/bin/octave";
inherit octave;
env = stdenv.mkDerivation {
name = "interactive-${octave.name}-environment";
buildCommand = ''
echo >&2 ""
echo >&2 "*** octave 'env' attributes are intended for interactive nix-shell sessions, not for building! ***"
echo >&2 ""
exit 1
'';
};
};
}

View File

@ -0,0 +1,113 @@
# Generic builder for GNU Octave libraries.
# This is a file that contains nested functions. The first, outer, function
# is the library- and package-wide details, such as the nixpkgs library, any
# additional configuration provided, and the namePrefix to use (based on the
# pname and version of Octave), the octave package, etc.
{ lib
, stdenv
, config
, octave
, texinfo
, computeRequiredOctavePackages
, writeRequiredOctavePackagesHook
}:
# The inner function contains information required to build the individual
# libraries.
{ fullLibName ? "${attrs.pname}-${attrs.version}"
, src
, dontPatch ? false
, patches ? []
, patchPhase ? ""
, enableParallelBuilding ? true
# Build-time dependencies for the package, which were compiled for the system compiling this.
, nativeBuildInputs ? []
# Build-time dependencies for the package, which may not have been compiled for the system compiling this.
, buildInputs ? []
# Propagate build dependencies so in case we have A -> B -> C,
# C can import package A propagated by B
# Run-time dependencies for the package.
, propagatedBuildInputs ? []
# Octave packages that are required at runtime for this one.
# These behave similarly to propagatedBuildInputs, where if
# package A is needed by B, and C needs B, then C also requires A.
# The main difference between these and propagatedBuildInputs is
# during the package's installation into octave, where all
# requiredOctavePackages are ALSO installed into octave.
, requiredOctavePackages ? []
, preBuild ? ""
, meta ? {}
, passthru ? {}
, ... } @ attrs:
let
requiredOctavePackages' = computeRequiredOctavePackages requiredOctavePackages;
in stdenv.mkDerivation {
packageName = "${fullLibName}";
# The name of the octave package ends up being
# "octave-version-package-version"
name = "${octave.pname}-${octave.version}-${fullLibName}";
# This states that any package built with the function that this returns
# will be an octave package. This is used for ensuring other octave
# packages are installed into octave during the environment building phase.
isOctavePackage = true;
OCTAVE_HISTFILE = "/dev/null";
inherit src;
inherit dontPatch patches patchPhase;
dontConfigure = true;
enableParallelBuilding = enableParallelBuilding;
requiredOctavePackages = requiredOctavePackages';
nativeBuildInputs = [
octave
writeRequiredOctavePackagesHook
]
++ nativeBuildInputs;
buildInputs = buildInputs ++ requiredOctavePackages';
propagatedBuildInputs = propagatedBuildInputs ++ [ texinfo ];
preBuild = if preBuild == "" then
''
# This trickery is needed because Octave expects a single directory inside
# at the top-most level of the tarball.
tar --transform 's,^,${fullLibName}/,' -cz * -f ${fullLibName}.tar.gz
''
else
preBuild;
buildPhase = ''
runHook preBuild
mkdir -p $out
octave-cli --eval "pkg build $out ${fullLibName}.tar.gz"
runHook postBuild
'';
# We don't install here, because that's handled when we build the environment
# together with Octave.
dontInstall = true;
inherit meta;
}

View File

@ -1,4 +1,5 @@
{ stdenv
, pkgs
, lib
# Note: either stdenv.mkDerivation or, for octaveFull, the qt-5 mkDerivation
# with wrapQtAppsHook (comes from libsForQt5.callPackage)
@ -45,6 +46,11 @@
, python ? null
, overridePlatforms ? null
, sundials ? null
# - Packages required for building extra packages.
, newScope
, callPackage
, makeSetupHook
, makeWrapper
# - Build Octave Qt GUI:
, enableQt ? false
, qtbase ? null
@ -60,6 +66,7 @@
}:
let
# Not always evaluated
blas' = if use64BitIdx then
blas.override {
@ -94,118 +101,144 @@ let
else
null
;
in mkDerivation rec {
version = "6.2.0";
pname = "octave";
src = fetchurl {
url = "mirror://gnu/octave/${pname}-${version}.tar.gz";
sha256 = "sha256-RX0f2oY0qDni/Xz8VbmL1W82tq5z0xu530Pd4wEsqnw=";
octavePackages = import ../../../top-level/octave-packages.nix {
inherit pkgs;
inherit lib stdenv fetchurl newScope;
octave = self;
};
buildInputs = [
readline
ncurses
perl
flex
qhull
graphicsmagick
pcre
fltk
zlib
curl
blas'
lapack'
libsndfile
fftw
fftwSinglePrec
portaudio
qrupdate'
arpack'
libwebp
gl2ps
]
++ lib.optionals enableQt [
qtbase
qtsvg
qscintilla
]
++ lib.optionals (ghostscript != null) [ ghostscript ]
++ lib.optionals (hdf5 != null) [ hdf5 ]
++ lib.optionals (glpk != null) [ glpk ]
++ lib.optionals (suitesparse != null) [ suitesparse' ]
++ lib.optionals (enableJava) [ jdk ]
++ lib.optionals (sundials != null) [ sundials ]
++ lib.optionals (gnuplot != null) [ gnuplot ]
++ lib.optionals (python != null) [ python ]
++ lib.optionals (!stdenv.isDarwin) [ libGL libGLU libX11 ]
++ lib.optionals stdenv.isDarwin [
libiconv
darwin.apple_sdk.frameworks.Accelerate
darwin.apple_sdk.frameworks.Cocoa
]
;
nativeBuildInputs = [
pkg-config
gfortran
# Listed here as well because it's outputs are split
fftw
fftwSinglePrec
texinfo
]
++ lib.optionals (sundials != null) [ sundials ]
++ lib.optionals enableJIT [ llvm ]
++ lib.optionals enableQt [
qtscript
qttools
]
;
wrapOctave = callPackage ./wrap-octave.nix {
octave = self;
inherit (pkgs) makeSetupHook makeWrapper;
};
doCheck = !stdenv.isDarwin;
self = mkDerivation rec {
version = "6.2.0";
pname = "octave";
enableParallelBuilding = true;
src = fetchurl {
url = "mirror://gnu/octave/${pname}-${version}.tar.gz";
sha256 = "sha256-RX0f2oY0qDni/Xz8VbmL1W82tq5z0xu530Pd4wEsqnw=";
};
# See https://savannah.gnu.org/bugs/?50339
F77_INTEGER_8_FLAG = if use64BitIdx then "-fdefault-integer-8" else "";
buildInputs = [
readline
ncurses
perl
flex
qhull
graphicsmagick
pcre
fltk
zlib
curl
blas'
lapack'
libsndfile
fftw
fftwSinglePrec
portaudio
qrupdate'
arpack'
libwebp
gl2ps
]
++ lib.optionals enableQt [
qtbase
qtsvg
qscintilla
]
++ lib.optionals (ghostscript != null) [ ghostscript ]
++ lib.optionals (hdf5 != null) [ hdf5 ]
++ lib.optionals (glpk != null) [ glpk ]
++ lib.optionals (suitesparse != null) [ suitesparse' ]
++ lib.optionals (enableJava) [ jdk ]
++ lib.optionals (sundials != null) [ sundials ]
++ lib.optionals (gnuplot != null) [ gnuplot ]
++ lib.optionals (python != null) [ python ]
++ lib.optionals (!stdenv.isDarwin) [ libGL libGLU libX11 ]
++ lib.optionals stdenv.isDarwin [
libiconv
darwin.apple_sdk.frameworks.Accelerate
darwin.apple_sdk.frameworks.Cocoa
]
;
nativeBuildInputs = [
pkg-config
gfortran
# Listed here as well because it's outputs are split
fftw
fftwSinglePrec
texinfo
]
++ lib.optionals (sundials != null) [ sundials ]
++ lib.optionals enableJIT [ llvm ]
++ lib.optionals enableQt [
qtscript
qttools
]
;
configureFlags = [
"--with-blas=blas"
"--with-lapack=lapack"
(if use64BitIdx then "--enable-64" else "--disable-64")
]
doCheck = !stdenv.isDarwin;
enableParallelBuilding = true;
# See https://savannah.gnu.org/bugs/?50339
F77_INTEGER_8_FLAG = if use64BitIdx then "-fdefault-integer-8" else "";
configureFlags = [
"--with-blas=blas"
"--with-lapack=lapack"
(if use64BitIdx then "--enable-64" else "--disable-64")
]
++ lib.optionals stdenv.isDarwin [ "--enable-link-all-dependencies" ]
++ lib.optionals enableReadline [ "--enable-readline" ]
++ lib.optionals stdenv.isDarwin [ "--with-x=no" ]
++ lib.optionals enableQt [ "--with-qt=5" ]
++ lib.optionals enableJIT [ "--enable-jit" ]
;
;
# Keep a copy of the octave tests detailed results in the output
# derivation, because someone may care
postInstall = ''
cp test/fntests.log $out/share/octave/${pname}-${version}-fntests.log || true
'';
# Keep a copy of the octave tests detailed results in the output
# derivation, because someone may care
postInstall = ''
cp test/fntests.log $out/share/octave/${pname}-${version}-fntests.log || true
'';
passthru = {
sitePath = "share/octave/${version}/site";
blas = blas';
lapack = lapack';
qrupdate = qrupdate';
arpack = arpack';
suitesparse = suitesparse';
inherit python;
inherit enableQt enableJIT enableReadline enableJava;
passthru = rec {
sitePath = "share/octave/${version}/site";
octPkgsPath = "share/octave/octave_packages";
blas = blas';
lapack = lapack';
qrupdate = qrupdate';
arpack = arpack';
suitesparse = suitesparse';
inherit fftw fftwSinglePrec;
inherit portaudio;
inherit jdk;
inherit python;
inherit enableQt enableJIT enableReadline enableJava;
buildEnv = callPackage ./build-env.nix {
octave = self;
inherit octavePackages wrapOctave;
inherit (octavePackages) computeRequiredOctavePackages;
};
withPackages = import ./with-packages.nix { inherit buildEnv octavePackages; };
pkgs = octavePackages;
interpreter = "${self}/bin/octave";
};
meta = {
homepage = "https://www.gnu.org/software/octave/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ raskin doronbehar ];
description = "Scientific Pragramming Language";
# https://savannah.gnu.org/bugs/?func=detailitem&item_id=56425 is the best attempt to fix JIT
broken = enableJIT;
platforms = if overridePlatforms == null then
(lib.platforms.linux ++ lib.platforms.darwin)
else overridePlatforms;
};
};
meta = {
homepage = "https://www.gnu.org/software/octave/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ raskin doronbehar ];
description = "Scientific Pragramming Language";
# https://savannah.gnu.org/bugs/?func=detailitem&item_id=56425 is the best attempt to fix JIT
broken = enableJIT;
platforms = if overridePlatforms == null then
(lib.platforms.linux ++ lib.platforms.darwin)
else overridePlatforms;
};
}
in self

View File

@ -0,0 +1,13 @@
# Hooks for building Octave packages.
{ octave
, lib
, callPackage
, makeSetupHook
}:
rec {
writeRequiredOctavePackagesHook = callPackage ({ }:
makeSetupHook {
name = "write-required-octave-packages-hook";
} ./write-required-octave-packages-hook.sh) {};
}

View File

@ -0,0 +1,17 @@
# Setup hook for writing octave packages that are run-time dependencies for
# another package to a nix-support file.
# `echo`s the full path name to the package derivation that is required.
echo "Sourcing octave-write-required-octave-packages-hook.sh"
octaveWriteRequiredOctavePackagesPhase() {
echo "Executing octaveWriteRequiredOctavePackagesPhase"
mkdir -p $out/nix-support
echo ${requiredOctavePackages} > $out/nix-support/required-octave-packages
}
# Yes its a bit long...
if [ -z "${dontWriteRequiredOctavePackagesPhase-}" ]; then
echo "Using octaveWriteRequiredOctavePackagesPhase"
preDistPhases+=" octaveWriteRequiredOctavePackagesPhase"
fi

View File

@ -0,0 +1,17 @@
# Setup hook for writing octave packages that are run-time dependencies for
# another package to a nix-support file.
# `echo`s the full path name to the package derivation that is required.
echo "Sourcing write-required-octave-packages-hook.sh"
writeRequiredOctavePackagesPhase() {
echo "Executing writeRequiredOctavePackagesPhase"
mkdir -p $out/nix-support
echo ${requiredOctavePackages} > $out/nix-support/required-octave-packages
}
# Yes its a bit long...
if [ -z "${dontWriteRequiredOctavePackagesPhase-}" ]; then
echo "Using writeRequiredOctavePackagesPhase"
preDistPhases+=" writeRequiredOctavePackagesPhase"
fi

View File

@ -0,0 +1,6 @@
{ buildEnv, octavePackages }:
# Takes the buildEnv defined for Octave and the set of octavePackages, and returns
# a function, which when given a function whose return value is a list of extra
# packages to install, builds and returns that environment.
f: let packages = f octavePackages; in buildEnv.override { extraLibs = packages; }

View File

@ -0,0 +1,16 @@
{ lib
, octave
, makeSetupHook
, makeWrapper
}:
# Defined in trivial-builders.nix
# Imported as wrapOctave in octave/default.nix and passed to octave's buildEnv
# as nativeBuildInput
# Each of the substitutions is available in the wrap.sh script as @thingSubstituted@
makeSetupHook {
name = "${octave.name}-pkgs-setup-hook";
deps = makeWrapper;
substitutions.executable = octave.interpreter;
substitutions.octave = octave;
} ./wrap.sh

View File

@ -0,0 +1,132 @@
# Unlinks a directory (given as the first argument), and re-creates that
# directory as an actual directory. Then descends into the directory of
# the same name in the origin (arg_2/arg_3) and symlinks the contents of
# that directory into the passed end-location.
unlinkDirReSymlinkContents() {
local dirToUnlink="$1"
local origin="$2"
local contentsLocation="$3"
unlink $dirToUnlink/$contentsLocation
mkdir -p $dirToUnlink/$contentsLocation
for f in $origin/$contentsLocation/*; do
ln -s -t "$dirToUnlink/$contentsLocation" "$f"
done
}
# Using unlinkDirReSymlinkContents, un-symlinks directories down to
# $out/share/octave, and then creates the octave_packages directory.
createOctavePackagesPath() {
local desiredOut=$1
local origin=$2
if [ -L "$out/share" ]; then
unlinkDirReSymlinkContents "$desiredOut" "$origin" "share"
fi
if [ -L "$out/share/octave" ]; then
unlinkDirReSymlinkContents "$desiredOut" "$origin" "share/octave"
fi
# Now that octave_packages has a path rather than symlinks, create the
# octave_packages directory for installed packages.
mkdir -p "$desiredOut/share/octave/octave_packages"
}
# First, descends down to $out/share/octave/site/m/startup/octaverc, and
# copies that start-up file. Once done, it performs a `chmod` to allow
# writing. Lastly, it `echo`s the location of the locally installed packages
# to the startup file, allowing octave to discover installed packages.
addPkgLocalList() {
local desiredOut=$1
local origin=$2
local octaveSite="share/octave/site"
local octaveSiteM="$octaveSite/m"
local octaveSiteStartup="$octaveSiteM/startup"
local siteOctavercStartup="$octaveSiteStartup/octaverc"
unlinkDirReSymlinkContents "$desiredOut" "$origin" "$octaveSite"
unlinkDirReSymlinkContents "$desiredOut" "$origin" "$octaveSiteM"
unlinkDirReSymlinkContents "$desiredOut" "$origin" "$octaveSiteStartup"
unlink "$out/$siteOctavercStartup"
cp "$origin/$siteOctavercStartup" "$desiredOut/$siteOctavercStartup"
chmod u+w "$desiredOut/$siteOctavercStartup"
echo "pkg local_list $out/.octave_packages" >> "$desiredOut/$siteOctavercStartup"
}
# Wrapper function for wrapOctaveProgramsIn. Takes one argument, a
# space-delimited string of packages' paths that will be installed.
wrapOctavePrograms() {
wrapOctaveProgramsIn "$out/bin" "$out" "$@"
}
# Wraps all octave programs in $out/bin with all the propagated inputs that
# a particular package requires. $1 is the directory to look for binaries in
# to wrap. $2 is the path to the octave ENVIRONMENT. $3 is the space-delimited
# string of packages.
wrapOctaveProgramsIn() {
local dir="$1"
local octavePath="$2"
local pkgs="$3"
local f
buildOctavePath "$octavePath" "$pkgs"
# Find all regular files in the output directory that are executable.
if [ -d "$dir" ]; then
find "$dir" -type f -perm -0100 -print0 | while read -d "" f; do
echo "wrapping \`$f'..."
local -a wrap_args=("$f"
--prefix PATH ':' "$program_PATH"
)
local -a wrapProgramArgs=("${wrap_args[@]}")
wrapProgram "${wrapProgramArgs[@]}"
done
fi
}
# Build the PATH environment variable by walking through the closure of
# dependencies. Starts by constructing the `program_PATH` variable with the
# environment's path, then adding the original octave's location, and marking
# them in `octavePathsSeen`.
buildOctavePath() {
local octavePath="$1"
local packages="$2"
local pathsToSearch="$octavePath $packages"
# Create an empty table of Octave paths.
declare -A octavePathsSeen=()
program_PATH=
octavePathsSeen["$out"]=1
octavePathsSeen["@octave@"]=1
addToSearchPath program_PATH "$out/bin"
addToSearchPath program_PATH "@octave@/bin"
echo "program_PATH to change to is: $program_PATH"
for path in $pathsToSearch; do
echo "Recurse to propagated-build-input: $path"
_addToOctavePath $path
done
}
# Adds the bin directories to the program_PATH variable.
# Recurses on any paths declared in `propagated-build-inputs`, while avoiding
# duplicating paths by flagging the directires it has seen in `octavePathsSeen`.
_addToOctavePath() {
local dir="$1"
# Stop if we've already visited this path.
if [ -n "${octavePathsSeen[$dir]}" ]; then return; fi
octavePathsSeen[$dir]=1
# addToSearchPath is defined in stdenv/generic/setup.sh. It has the effect
# of calling `export X=$dir/...:$X`.
addToSearchPath program_PATH $dir/bin
# Inspect the propagated inputs (if they exist) and recur on them.
local prop="$dir/nix-support/propagated-build-inputs"
if [ -e $prop ]; then
for new_path in $(cat $prop); do
_addToOctavePath $new_path
done
fi
}

View File

@ -0,0 +1,33 @@
{ buildOctavePackage
, lib
, fetchurl
, instrument-control
, arduino
}:
buildOctavePackage rec {
pname = "arduino";
version = "0.6.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0fnfk206n31s7diijaylmqhxnr88z6l3l3vsxq4z8gcp9ylm9nkj";
};
requiredOctavePackages = [
instrument-control
];
# Might be able to use pkgs.arduino-core
propagatedBuildInputs = [
arduino
];
meta = with lib; {
name = "Octave Arduino Toolkit";
homepage = "https://octave.sourceforge.io/arduino/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Basic Octave implementation of the matlab arduino extension, allowing communication to a programmed arduino board to control its hardware";
};
}

View File

@ -0,0 +1,36 @@
{ buildOctavePackage
, lib
, fetchurl
, jack2
, alsaLib
, rtmidi
, pkg-config
}:
buildOctavePackage rec {
pname = "audio";
version = "2.0.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "18lyvwmdy4b9pcv5sm7g17n3is32q23daw8fcsalkf4rj6cc6qdk";
};
nativeBuildInputs = [
pkg-config
];
propagatedBuildInputs = [
jack2
alsaLib
rtmidi
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/audio/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Audio and MIDI Toolbox for GNU Octave";
platforms = platforms.linux; # Because of run-time dependency on jack2 and alsaLib
};
}

View File

@ -0,0 +1,28 @@
{ buildOctavePackage
, lib
, fetchurl
, fpl
, msh
}:
buildOctavePackage rec {
pname = "bim";
version = "1.1.5";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0y70w8mj80c5yns1j7nwngwwrxp1pa87kyz2n2yvmc3zdigcd6g8";
};
requiredOctavePackages = [
fpl
msh
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/bim/index.html";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Package for solving Diffusion Advection Reaction (DAR) Partial Differential Equations";
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "bsltl";
version = "1.3.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0i8ry347y5f5db3702nhpsmfys9v18ks2fsmpdqpy3fcvrwaxdsb";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/bsltl/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Free collection of OCTAVE/MATLAB routines for working with the biospeckle laser technique";
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "cgi";
version = "0.1.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0hygj7cpwrs2w9bfb7qrvv7gq410bfiddqvza8smg766pqmfp1s1";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/cgi/index.html";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Common Gateway Interface for Octave";
};
}

View File

@ -0,0 +1,31 @@
{ buildOctavePackage
, lib
, fetchurl
, signal
, hdf5
}:
buildOctavePackage rec {
pname = "communications";
version = "1.2.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1xay2vjyadv3ja8dmqqzm2his8s0rvidz23nq1c2yl3xh1gavyck";
};
buildInputs = [
hdf5
];
requiredOctavePackages = [
signal
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/communications/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = " Digital Communications, Error Correcting Codes (Channel Code), Source Code functions, Modulation and Galois Fields";
};
}

View File

@ -0,0 +1,31 @@
{ buildOctavePackage
, lib
, fetchurl
, gfortran
, lapack, blas
}:
buildOctavePackage rec {
pname = "control";
version = "3.2.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0gjyjsxs01x0nyc4cgn3d5af17l3lzs8h4hsm57nxd3as48dbwgs";
};
nativeBuildInputs = [
gfortran
];
buildInputs = [
lapack blas
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/control/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Computer-Aided Control System Design (CACSD) Tools for GNU Octave, based on the proven SLICOT Library";
};
}

View File

@ -0,0 +1,26 @@
{ buildOctavePackage
, lib
, fetchurl
, optim
}:
buildOctavePackage rec {
pname = "data-smoothing";
version = "1.3.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0q0vqdmp8ygyfhk296xbxcpsh5wvpa2kfgv4v0rys68nd2lxfaq1";
};
requiredOctavePackages = [
optim
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/data-smoothing/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Algorithms for smoothing noisy data";
};
}

View File

@ -0,0 +1,31 @@
{ buildOctavePackage
, lib
, fetchurl
, struct
, postgresql
}:
buildOctavePackage rec {
pname = "database";
version = "2.4.4";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1c0n76adi0jw6bx62s04vjyda6kb6ca8lzz2vam43vdy10prcq9p";
};
propagatedBuildInputs = [
postgresql
];
requiredOctavePackages = [
struct
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/database/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Interface to SQL databases, currently only postgresql using libpq";
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "dataframe";
version = "1.2.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "10ara084gkb7d5vxv9qv7zpj8b4mm5y06nccrdy3skw5nfbb4djx";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/dataframe/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Data manipulation toolbox similar to R data.frame";
};
}

View File

@ -0,0 +1,33 @@
{ buildOctavePackage
, lib
, fetchurl
, gdcm
, cmake
}:
buildOctavePackage rec {
pname = "dicom";
version = "0.4.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "131wn6mrv20np10plirvqia8dlpz3g0aqi3mmn2wyl7r95p3dnza";
};
nativeBuildInputs = [
cmake
];
dontUseCmakeConfigure = true;
propagatedBuildInputs = [
gdcm
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/dicom/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Digital communications in medicine (DICOM) file io";
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "divand";
version = "1.1.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0nmaz5j37dflz7p4a4lmwzkh7g1gghdh7ccvkbyy0fpgv9lr1amg";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/divand/index.html";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Performs an n-dimensional variational analysis (interpolation) of arbitrarily located observations";
};
}

View File

@ -0,0 +1,28 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "doctest";
version = "0.7.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0hh9izj9ds69bmrvmmj16fd1c4z7733h50c7isl8f714srw26kf4";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/doctest/index.html";
license = licenses.bsd3;
maintainers = with maintainers; [ KarlJoad ];
description = "Find and run example code within documentation";
longDescription = ''
Find and run example code within documentation. Formatted blocks
of example code are extracted from documentation files and executed
to confirm their output is correct. This can be part of a testing
framework or simply to ensure that documentation stays up-to-date
during software development.
'';
};
}

View File

@ -0,0 +1,26 @@
{ buildOctavePackage
, lib
, fetchurl
, optim
}:
buildOctavePackage rec {
pname = "econometrics";
version = "1.1.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1srx78k90ycla7yisa9h593n9l8br31lsdxlspra8sxiyq0sbk72";
};
requiredOctavePackages = [
optim
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/econometrics/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Econometrics functions including MLE and GMM based techniques";
};
}

View File

@ -0,0 +1,35 @@
{ buildOctavePackage
, lib
, fetchurl
, dolfin
, ffc
, pkg-config
}:
buildOctavePackage rec {
pname = "fem-fenics";
version = "0.0.5";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1xd80nnkschldvrqx0wvrg3fzbf8sck8bvq24phr5x49xs7b8x78";
};
nativeBuildInputs = [
pkg-config
];
propagatedBuildInputs = [
dolfin
ffc
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/fem-fenics/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Package for the resolution of partial differential equations based on fenics";
# Lots of compilation errors for newer octave versions and syntax errors
broken = true;
};
}

View File

@ -0,0 +1,23 @@
{ buildOctavePackage
, lib
, fetchurl
, io
, statistics
}:
buildOctavePackage rec {
pname = "financial";
version = "0.5.3";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0f963yg6pwvrdk5fg7b71ny47gzy48nqxdzj2ngcfrvmb5az4vmf";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/financial/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Monte Carlo simulation, options pricing routines, financial manipulation, plotting functions and additional date manipulation tools";
};
}

View File

@ -0,0 +1,41 @@
{ buildOctavePackage
, lib
, fetchurl
, cfitsio
, hdf5
, pkg-config
}:
buildOctavePackage rec {
pname = "fits";
version = "1.0.7";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0jab5wmrpifqphmrfkqcyrlpc0h4y4m735yc3avqqjajz1rl24lm";
};
# Found here: https://build.opensuse.org/package/view_file/science/octave-forge-fits/octave-forge-fits.spec?expand=1
patchPhase = ''
sed -i -s -e 's/D_NINT/octave::math::x_nint/g' src/*.cc
'';
nativeBuildInputs = [
pkg-config
];
buildInputs = [
hdf5
];
propagatedBuildInputs = [
cfitsio
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/fits/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Functions for reading, and writing FITS (Flexible Image Transport System) files using cfitsio";
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "fpl";
version = "1.3.5";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0cbpahn9flrv9ppp5xakhwh8vyyy7wzlsz22i3s93yqg9q2bh4ys";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/fpl/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Collection of routines to export data produced by Finite Elements or Finite Volume Simulations in formats used by some visualization programs";
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "fuzzy-logic-toolkit";
version = "0.4.5";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0cs1xh594h1psdinicxrsvm27gzax5jja7bjk4sl3kk2hv24mhml";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/fuzzy-logic-toolkit/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "A mostly MATLAB-compatible fuzzy logic toolkit for Octave";
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "ga";
version = "0.10.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0s5azn4n174avlmh5gw21zfqfkyxkzn4v09q4l9swv7ldmg3mirv";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/ga/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Genetic optimization code";
};
}

View File

@ -0,0 +1,31 @@
{ buildOctavePackage
, lib
, fetchurl
, pkg-config
, nettle
}:
buildOctavePackage rec {
pname = "general";
version = "2.1.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0jmvczssqz1aa665v9h8k9cchb7mg3n9af6b5kh9b2qcjl4r9l7v";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
nettle
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/general/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "General tools for Octave";
};
}

View File

@ -0,0 +1,27 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "generate_html";
version = "0.3.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1ai4h7jf9fqi7w565iprzylsh94pg4rhyf51hfj9kfdgdpb1abfs";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/generate_html/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Provides functions for generating HTML pages that contain the help texts for a set of functions";
longDescription = ''
This package provides functions for generating HTML pages that contain
the help texts for a set of functions. The package is designed to be as
general as possible, but also contains convenience functions for generating
a set of pages for entire packages.
'';
};
}

View File

@ -0,0 +1,26 @@
{ buildOctavePackage
, lib
, fetchurl
, matgeom
}:
buildOctavePackage rec {
pname = "geometry";
version = "4.0.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1zmd97xir62fr5v57xifh2cvna5fg67h9yb7bp2vm3ll04y41lhs";
};
requiredOctavePackages = [
matgeom
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/geometry/index.html";
license = with licenses; [ gpl3Plus boost ];
maintainers = with maintainers; [ KarlJoad ];
description = "Library for extending MatGeom functionality";
};
}

View File

@ -0,0 +1,26 @@
{ buildOctavePackage
, lib
, fetchurl
, gsl
}:
buildOctavePackage rec {
pname = "gsl";
version = "2.1.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1lvfxbqmw8h1nlrxmvrl6j4xffmbzxfhdpxz3vrc6lg2g4jwaa6h";
};
buildInputs = [
gsl
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/gsl/index.html";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Octave bindings to the GNU Scientific Library";
};
}

View File

@ -0,0 +1,32 @@
{ buildOctavePackage
, lib
, fetchurl
, libv4l
, fltk
}:
buildOctavePackage rec {
pname = "image-acquisition";
version = "0.2.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1amp6npkddnnz2i5rm6gvn65qrbn0nxzl2cja3dvc2xqg396wrhh";
};
buildInputs = [
libv4l
fltk
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/image-acquisition/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Functions to capture images from connected devices";
longDescription = ''
The Octave-forge Image Aquisition package provides functions to
capture images from connected devices. Currently only v4l2 is supported.
'';
};
}

View File

@ -0,0 +1,27 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "image";
version = "2.12.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1d3kqhbkq9acc29k42fcilfmykk9a0r321mvk46l5iibc7nqrmg7";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/image/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Functions for processing images";
longDescription = ''
The Octave-forge Image package provides functions for processing
images. The package also provides functions for feature extraction,
image statistics, spatial and geometric transformations, morphological
operations, linear filtering, and much more.
'';
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "instrument-control";
version = "0.6.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0vckax6rx5v3fq5j6kb6n39a5zas9i24x4wvmjlhc8xbykkg5nkk";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/instrument-control/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Low level I/O functions for serial, i2c, spi, parallel, tcp, gpib, vxi11, udp and usbtmc interfaces";
};
}

View File

@ -0,0 +1,39 @@
{ buildOctavePackage
, lib
, fetchurl
, mpfr
}:
buildOctavePackage rec {
pname = "interval";
version = "3.2.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0a0sz7b4y53qgk1xr4pannn4w7xiin2pf74x7r54hrr1wf4abp20";
};
propagatedBuildInputs = [
mpfr
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/interval/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Interval arithmetic to evaluate functions over subsets of their domain";
longDescription = ''
The interval package for real-valued interval arithmetic allows one to
evaluate functions over subsets of their domain. All results are verified,
because interval computations automatically keep track of any errors.
These concepts can be used to handle uncertainties, estimate arithmetic
errors and produce reliable results. Also it can be applied to
computer-assisted proofs, constraint programming, and verified computing.
The implementation is based on interval boundaries represented by
binary64 numbers and is conforming to IEEE Std 1788-2015, IEEE standard
for interval arithmetic.
'';
};
}

View File

@ -0,0 +1,32 @@
{ buildOctavePackage
, lib
, fetchurl
, enableJava
, jdk
, unzip
}:
buildOctavePackage rec {
pname = "io";
version = "2.6.3";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "044y8lfp93fx0592mv6x2ss0nvjkjgvlci3c3ahav76pk1j3rikb";
};
buildInputs = [
(lib.optional enableJava jdk)
];
propagatedBuildInputs = [
unzip
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/io/index.html";
license = with licenses; [ gpl3Plus bsd2 ];
maintainers = with maintainers; [ KarlJoad ];
description = "Input/Output in external formats";
};
}

View File

@ -0,0 +1,54 @@
{ buildOctavePackage
, lib
, fetchgit
, automake
, autoconf
, autoconf-archive
, parallel
}:
buildOctavePackage rec {
pname = "level-set";
version = "2019-04-13";
src = fetchgit {
url = "https://git.code.sf.net/p/octave/${pname}";
rev = "dbf46228a7582eef4fe5470fd00bc5b421dd33a5";
sha256 = "14qwa4j24m2j7njw8gbagkgmp040h6k0h7kyrrzgb9y0jm087qkl";
fetchSubmodules = false;
};
# The monstrosity of a regex below is to ensure that only error() calls are
# corrected to have a %s format specifier. However, logic_error() also
# exists, (a simple regex also matches that), but logic_error() doesn't
# require a format specifier. So, this regex was born to handle that...
patchPhase = ''
substituteInPlace build.sh --replace "level-set-0.3.1" "${pname}-${version}" \
--replace "\`pwd\`" '/build'
sed -i -E 's#[^[:graph:]]error \(# error \(\"%s\", #g' src/*.cpp
'';
nativeBuildInputs = [
automake
autoconf
autoconf-archive
];
requiredOctavePackages = [
parallel
];
preBuild = ''
mkdir -p $out
source ./build.sh
cd -
'';
meta = with lib; {
name = "Level Set";
homepage = "https://octave.sourceforge.io/level-set/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Routines for calculating the time-evolution of the level-set equation and extracting geometric information from the level-set function";
};
}

View File

@ -0,0 +1,22 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "linear-algebra";
version = "2.2.3";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1wwjpxp9vjc6lszh0z3kgy4hyzpib8rvvh6b74ijh9qk9r9nmvjk";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/linear-algebra/index.html";
license = with licenses; [ gpl3Plus lgpl3Plus ];
# They claim to have a FreeBSD license, but none of their code seems to have it.
maintainers = with maintainers; [ KarlJoad ];
description = "Additional linear algebra code, including matrix functions";
};
}

View File

@ -0,0 +1,27 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "lssa";
version = "0.1.4";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "10h9lzsi7pqh93i7y50b618g05fnbw9n0i505bz5kz4avfa990zh";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/lssa/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Tools to compute spectral decompositions of irregularly-spaced time series";
longDescription = ''
A package implementing tools to compute spectral decompositions of
irregularly-spaced time series. Currently includes functions based off
the Lomb-Scargle periodogram and Adolf Mathias' implementation for R
and C.
'';
};
}

View File

@ -0,0 +1,54 @@
{ buildOctavePackage
, lib
, fetchurl
, fftw
, fftwSinglePrec
, fftwFloat
, fftwLongDouble
, lapack
, blas
, portaudio
, jdk
}:
buildOctavePackage rec {
pname = "ltfat";
version = "2.3.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0gghh5a4w649ff776wvidfvqas87m0n7rqs960pid1d11bnyqqrh";
};
patches = [
# Fixes a syntax error with performing multiplication.
./syntax-error.patch
];
buildInputs = [
fftw
fftwSinglePrec
fftwFloat
fftwLongDouble
lapack
blas
portaudio
jdk
];
meta = with lib; {
name = "The Large Time-Frequency Analysis Toolbox";
homepage = "https://octave.sourceforge.io/ltfat/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Toolbox for working with time-frequency analysis, wavelets and signal processing";
longDescription = ''
The Large Time/Frequency Analysis Toolbox (LTFAT) is a Matlab/Octave
toolbox for working with time-frequency analysis, wavelets and signal
processing. It is intended both as an educational and a computational
tool. The toolbox provides a large number of linear transforms including
Gabor and wavelet transforms along with routines for constructing windows
(filter prototypes) and routines for manipulating coefficients.
'';
};
}

View File

@ -0,0 +1,15 @@
diff --git a/inst/nonstatgab/nsdgt.m b/inst/nonstatgab/nsdgt.m
index ac53963..81656cb 100644
--- a/inst/nonstatgab/nsdgt.m
+++ b/inst/nonstatgab/nsdgt.m
@@ -149,8 +149,8 @@ for ii = 1:N
col = ceil(Lg/M(ii));
temp = zeros(col*M(ii),W,assert_classname(f,g{1}));
- temp([end-floor(Lg/2)+1:end,1:ceil(Lg/2)],:) = bsxfun(@ ...
- times,f(win_range,:),g{ii}(idx));
+ temp([end-floor(Lg/2)+1:end,1:ceil(Lg/2)],:) = bsxfun(@times, ...
+ f(win_range,:),g{ii}(idx));
temp = reshape(temp,M(ii),col,W);
X = squeeze(fft(sum(temp,2)));

View File

@ -0,0 +1,28 @@
{ buildOctavePackage
, lib
, fetchurl
, io # >= 2.2.7
, geometry # >= 4.0.0
}:
buildOctavePackage rec {
pname = "mapping";
version = "1.4.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0wj0q1rkrqs4qgpjh4vn9kcpdh94pzr6v4jc1vcrjwkp87yjv8c0";
};
requiredOctavePackages = [
io
geometry
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/mapping/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Simple mapping and GIS .shp .dxf and raster file functions";
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "matgeom";
version = "1.2.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "05xfmlh1k3mhq8yag7gr8q1ysl1s43vm46fr1i3gcg9b1kkwi8by";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/matgeom/index.html";
license = with licenses; [ bsd2 gpl3Plus ];
maintainers = with maintainers; [ KarlJoad ];
description = "Geometry toolbox for 2D/3D geometric computing";
};
}

View File

@ -0,0 +1,34 @@
{ buildOctavePackage
, lib
, fetchurl
# Build-time dependencies
, mlterm
, ncurses # >= 5
, units
}:
buildOctavePackage rec {
pname = "miscellaneous";
version = "1.3.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "10n107njz24ln7v9a1l3dkh7s7vd6qwgbinrj1nl4wflxsir4l9k";
};
buildInputs = [
mlterm
ncurses
];
propagatedBuildInputs = [
units
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/miscellaneous/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Miscellaneous tools that don't fit somewhere else";
};
}

View File

@ -0,0 +1,56 @@
{ buildOctavePackage
, lib
, fetchurl
# Octave Dependencies
, splines
# Other Dependencies
, gmsh
, gawk
, pkg-config
, dolfin
, autoconf, automake
}:
buildOctavePackage rec {
pname = "msh";
version = "1.0.10";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1mb5qrp9y1w1cbzrd9v84430ldy57ca843yspnrgbcqpxyyxbgfz";
};
nativeBuildInputs = [
pkg-config
autoconf automake
dolfin
];
buildInputs = [
dolfin
];
propagatedBuildInputs = [
gmsh
gawk
dolfin
];
requiredOctavePackages = [
splines
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/msh/index.html";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Create and manage triangular and tetrahedral meshes for Finite Element or Finite Volume PDE solvers";
longDescription = ''
Create and manage triangular and tetrahedral meshes for Finite Element or
Finite Volume PDE solvers. Use a mesh data structure compatible with
PDEtool. Rely on gmsh for unstructured mesh generation.
'';
# Not technically broken, but missing some functionality.
# dolfin needs to be its own stand-alone library for the last tests to pass.
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "mvn";
version = "1.1.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "00w69hxqnqdm3744z6p7gvzci44a3gy228x6bgq3xf5n3jwicnmg";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/mvn/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Multivariate normal distribution clustering and utility functions";
};
}

View File

@ -0,0 +1,26 @@
{ buildOctavePackage
, lib
, fetchurl
, blas
}:
buildOctavePackage rec {
pname = "nan";
version = "3.5.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0bp8zl50f8qj5sivl88kjdswm035v4li33fiq3v1gmh0pvgbcw7a";
};
buildInputs = [
blas
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/nan/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "A statistics and machine learning toolbox for data with and w/o missing values";
};
}

View File

@ -0,0 +1,31 @@
{ buildOctavePackage
, lib
, fetchurl
, netcdf
, statistics
}:
buildOctavePackage rec {
pname = "ncarray";
version = "1.0.4";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0v96iziikvq2v7hczhbfs9zmk49v99kn6z3lgibqqpwam175yqgd";
};
buildInputs = [
netcdf
];
requiredOctavePackages = [
statistics
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/ncarray/index.html";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Access a single or a collection of NetCDF files as a multi-dimensional array";
};
}

View File

@ -0,0 +1,26 @@
{ buildOctavePackage
, lib
, fetchurl
, netcdf
}:
buildOctavePackage rec {
pname = "netcdf";
version = "1.0.14";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1wdwl76zgcg7kkdxjfjgf23ylzb0x4dyfliffylyl40g6cjym9lf";
};
buildInputs = [
netcdf
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/netcdf/index.html";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "A NetCDF interface for Octave";
};
}

View File

@ -0,0 +1,30 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "nurbs";
version = "1.3.13";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0zkyldm63pc3pcal3yvj6af24cvpjvv9qfhf0ihhwcsh4w3yggyv";
};
# Has been fixed in more recent commits, but has not been pushed out as a
# new version yet.
# The sed changes allow nurbs to compile.
patchPhase = ''
sed -i s/feval/octave::feval/g src/*.cc
sed -i s/is_real_type/isreal/g src/*.cc
sed -i s/is_cell/iscell/g src/*.cc
'';
meta = with lib; {
homepage = "https://octave.sourceforge.io/nurbs/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Collection of routines for the creation, and manipulation of Non-Uniform Rational B-Splines (NURBS), based on the NURBS toolbox by Mark Spink";
};
}

View File

@ -0,0 +1,26 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "ocl";
version = "1.1.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0ayi5x9zk9p4zm0qsr3i94lyp5468c9d1a7mqrqjqpdvkhrw0xnm";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/ocl/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Use OpenCL for parallelization";
longDescription = ''
Package using OpenCL for parallelization, mostly suitable to
Single-Instruction-Multiple-Data (SIMD) computations, selectively
using available OpenCL hardware and drivers.
'';
};
}

View File

@ -0,0 +1,29 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "octclip";
version = "2.0.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "05ijh3izgfaan84n6zp690nap9vnz0zicjd0cgvd1c6askm7vxql";
};
# The only compilation problem is that no formatting specifier was provided
# for the error function. Because errorText is a string, I provide such a
# formatting specifier.
patchPhase = ''
sed -i s/"error(errorText)"/"error(\"%s\", errorText)"/g src/*.cc
'';
meta = with lib; {
name = "GNU Octave Clipping Polygons Tool";
homepage = "https://octave.sourceforge.io/octclip/index.html";
license = with licenses; [ gpl3Plus ]; # modified BSD?
maintainers = with maintainers; [ KarlJoad ];
description = "Perform boolean operations with polygons using the Greiner-Hormann algorithm";
};
}

View File

@ -0,0 +1,32 @@
{ buildOctavePackage
, lib
, fetchurl
, proj # >= 6.3.0
}:
buildOctavePackage rec {
pname = "octproj";
version = "2.0.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1mb8gb0r8kky47ap85h9qqdvs40mjp3ya0nkh45gqhy67ml06paq";
};
# The sed changes below allow for the package to be compiled.
patchPhase = ''
sed -i s/"error(errorText)"/"error(\"%s\", errorText)"/g src/*.cc
sed -i s/"warning(errorText)"/"warning(\"%s\", errorText)"/g src/*.cc
'';
propagatedBuildInputs = [
proj
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/octproj/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "GNU Octave bindings to PROJ library for cartographic projections and CRS transformations";
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "optics";
version = "0.1.4";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1d9z82241a1zmr8m1vgw10pyk81vn0q4dcyx7d05pigfn5gykrgc";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/optics/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Functions covering various aspects of optics";
};
}

View File

@ -0,0 +1,36 @@
{ buildOctavePackage
, lib
, fetchurl
, struct
, statistics
, lapack
, blas
}:
buildOctavePackage rec {
pname = "optim";
version = "1.6.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1z2h8gy99glxh5qi3r22am2vdirlbklkq0lx4r8jrx1ak7awh47r";
};
buildInputs = [
lapack
blas
];
requiredOctavePackages = [
struct
statistics
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/optim/index.html";
license = with licenses; [ gpl3Plus publicDomain ];
# Modified BSD code seems removed
maintainers = with maintainers; [ KarlJoad ];
description = "Non-linear optimization toolkit";
};
}

View File

@ -0,0 +1,31 @@
{ buildOctavePackage
, lib
, fetchurl
, gfortran
}:
buildOctavePackage rec {
pname = "optiminterp";
version = "0.3.6";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "05nzj2jmrczbnsr64w2a7kww19s6yialdqnsbg797v11ii7aiylc";
};
nativeBuildInputs = [
gfortran
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/optiminterp/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "An optimal interpolation toolbox for octave";
longDescription = ''
An optimal interpolation toolbox for octave. This package provides
functions to perform a n-dimensional optimal interpolations of
arbitrarily distributed data points.
'';
};
}

View File

@ -0,0 +1,36 @@
{ buildOctavePackage
, lib
, fetchurl
, struct
, gnutls
, pkg-config
}:
buildOctavePackage rec {
pname = "parallel";
version = "4.0.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0wmpak01rsccrnb8is7fsjdlxw15157sqyf9s2fabr16yykfmvi8";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
gnutls
];
requiredOctavePackages = [
struct
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/parallel/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Parallel execution package";
};
}

View File

@ -0,0 +1,29 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "quaternion";
version = "2.4.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "040ncksf0xz32qmi4484xs3q01nappxrsvwwa60g04yjy7c4sbac";
};
# Octave replaced many of the is_thing_type check function with isthing.
# The patch changes the occurrences of the old functions.
patchPhase = ''
sed -i s/is_numeric_type/isnumeric/g src/*.cc
sed -i s/is_real_type/isreal/g src/*.cc
sed -i s/is_bool_type/islogical/g src/*.cc
'';
meta = with lib; {
homepage = "https://octave.sourceforge.io/quaternion/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Quaternion package for GNU Octave, includes a quaternion class with overloaded operators";
};
}

View File

@ -0,0 +1,32 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "queueing";
version = "1.2.7";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1yhw277i1qgmddf6wbfb6a4zrfhvplkmfr20q1l15z4xi8afnm6d";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/queueing/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Provides functions for queueing networks and Markov chains analysis";
longDescription = ''
The queueing package provides functions for queueing networks and Markov
chains analysis. This package can be used to compute steady-state
performance measures for open, closed and mixed networks with single or
multiple job classes. Mean Value Analysis (MVA), convolution, and various
bounding techniques are implemented. Furthermore, several transient and
steady-state performance measures for Markov chains can be computed, such
as state occupancy probabilities, mean time to absorption, time-averaged
sojourn times and so forth. Discrete- and continuous-time Markov chains
are supported.
'';
};
}

View File

@ -0,0 +1,26 @@
{ buildOctavePackage
, lib
, fetchurl
, control
}:
buildOctavePackage rec {
pname = "signal";
version = "1.4.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1amfh7ifjqxz2kr34hgq2mq8ygmd5j3cjdk1k2dk6qcgic7n0y6r";
};
requiredOctavePackages = [
control
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/signal/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Signal processing tools, including filtering, windowing and display functions";
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "sockets";
version = "1.2.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "18f1zpqcf6h9b4fb0x2c5nvc3mvgj1141f1s8d9gnlhlrjlq8vqg";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/sockets/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Socket functions for networking from within octave";
};
}

View File

@ -0,0 +1,28 @@
{ buildOctavePackage
, lib
, fetchurl
, librsb
}:
buildOctavePackage rec {
pname = "sparsersb";
version = "1.0.8";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0nl7qppa1cm51188hqhbfswlih9hmy1yz7v0f5i07z0g0kbd62xw";
};
buildInputs = [
librsb
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/sparsersb/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Interface to the librsb package implementing the RSB sparse matrix format for fast shared-memory sparse matrix computations";
# Mark this way until KarlJoad builds librsb specifically for this package.
broken = true;
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "splines";
version = "1.3.3";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "16wisph8axc5xci0h51zj0y0x2wj6c9zybi2sjpb9v8z9dagjjqa";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/splines/index.html";
license = with licenses; [ gpl3Plus publicDomain ];
maintainers = with maintainers; [ KarlJoad ];
description = "Additional spline functions";
};
}

View File

@ -0,0 +1,26 @@
{ buildOctavePackage
, lib
, fetchurl
, io
}:
buildOctavePackage rec {
pname = "statistics";
version = "1.4.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0iv2hw3zp7h69n8ncfjfgm29xaihdl5gp2slcw1yf23mhd7q2xkr";
};
requiredOctavePackages = [
io
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/statistics/index.html";
license = with licenses; [ gpl3Plus publicDomain ];
maintainers = with maintainers; [ KarlJoad ];
description = "Additional statistics functions for Octave";
};
}

View File

@ -0,0 +1,32 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "stk";
version = "2.6.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1rqndfankwlwm4igw3xqpnrrl749zz1d5pjzh1qbfns7ixwrm19a";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/stk/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "STK is a (not so) Small Toolbox for Kriging";
longDescription = ''
The STK is a (not so) Small Toolbox for Kriging. Its primary focus is on
the interpolation/regression technique known as kriging, which is very
closely related to Splines and Radial Basis Functions, and can be
interpreted as a non-parametric Bayesian method using a Gaussian Process
(GP) prior. The STK also provides tools for the sequential and non-sequential
design of experiments. Even though it is, currently, mostly geared towards
the Design and Analysis of Computer Experiments (DACE), the STK can be
useful for other applications areas (such as Geostatistics, Machine
Learning, Non-parametric Regression, etc.).
'';
};
}

View File

@ -0,0 +1,37 @@
{ buildOctavePackage
, lib
, fetchurl
, pcre
}:
buildOctavePackage rec {
pname = "strings";
version = "1.2.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1b0ravfvq3bxd0w3axjfsx13mmmkifmqz6pfdgyf2s8vkqnp1qng";
};
buildInputs = [
pcre
];
# The gripes library no longer exists.
# https://build.opensuse.org/package/view_file/openSUSE:Backports:SLE-15-SP3/octave-forge-strings/octave-forge-strings.spec
# toascii is a deprecated function. Has been fixed in recent commits, but has
# not been released yet.
# https://sourceforge.net/p/octave/strings/ci/2db1dbb75557eef94605cb4ac682783ab78ac8d8/
patchPhase = ''
sed -i -s -e 's/gripes.h/errwarn.h/' -e 's/gripe_/err_/g' src/*.cc
sed -i s/toascii/double/g inst/*.m
'';
meta = with lib; {
homepage = "https://octave.sourceforge.io/strings/index.html";
license = licenses.gpl3Plus;
# Claims to have a freebsd license, but I found none.
maintainers = with maintainers; [ KarlJoad ];
description = "Additional functions for manipulation and analysis of strings";
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "struct";
version = "1.0.16";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0gx20r126f0ccl4yflp823xi77p8fh4acx1fv0mmcsglmx4c4vgm";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/struct/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Additional structure manipulation functions";
};
}

View File

@ -0,0 +1,46 @@
{ buildOctavePackage
, lib
, fetchurl
# Octave's Python (Python 3)
, python
# Needed only to get the correct version of sympy needed
, python2Packages
}:
let
# Need to use sympy 1.5.1 for https://github.com/cbm755/octsympy/issues/1023
# It has been addressed, but not merged yet.
# In the meantime, we create a Python environment with Python 3, its mpmath
# version and sympy 1.5 from python2Packages.
pythonEnv = (let
overridenPython = let
packageOverrides = self: super: {
sympy = super.sympy.overridePythonAttrs (old: rec {
version = python2Packages.sympy.version;
src = python2Packages.sympy.src;
});
};
in python.override {inherit packageOverrides; self = overridenPython; };
in overridenPython.withPackages (ps: [
ps.sympy
ps.mpmath
]));
in buildOctavePackage rec {
pname = "symbolic";
version = "2.9.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1jr3kg9q6r4r4h3hiwq9fli6wsns73rqfzkrg25plha9195c97h8";
};
propagatedBuildInputs = [ pythonEnv ];
meta = with lib; {
homepage = "https://octave.sourceforge.io/symbolic/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Adds symbolic calculation features to GNU Octave";
};
}

View File

@ -0,0 +1,33 @@
{ buildOctavePackage
, lib
, fetchurl
# Octave dependencies
, signal # >= 1.3.0
# Build dependencies
, gfortran
}:
buildOctavePackage rec {
pname = "tisean";
version = "0.2.3";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0nc2d9h91glxzmpizxdrc2dablw4bqhqhzs37a394c36myk4xjdv";
};
nativeBuildInputs = [
gfortran
];
requiredOctavePackages = [
signal
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/tisean/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Port of TISEAN 3.0.1";
};
}

View File

@ -0,0 +1,26 @@
{ buildOctavePackage
, lib
, fetchurl
, nan # > 3.0.0
}:
buildOctavePackage rec {
pname = "tsa";
version = "4.6.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0p2cjszzjwhp4ih3q3r67qnikgxc0fwxc12p3727jbdvzq2h10mn";
};
requiredOctavePackages = [
nan
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/tsa/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Stochastic concepts and maximum entropy methods for time series analysis";
};
}

View File

@ -0,0 +1,39 @@
{ buildOctavePackage
, lib
, fetchurl
, vibes
}:
buildOctavePackage rec {
pname = "vibes";
version = "0.2.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1zn86rcsjkqg67hphz5inxc5xkgr18sby8za68zhppc2z7pd91ng";
};
buildInputs = [
vibes
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/vibes/index.html";
license = with licenses; [ gpl3Plus mit ];
maintainers = with maintainers; [ KarlJoad ];
description = "Easily display results (boxes, pavings) from interval methods";
longDescription = ''
The VIBes API allows one to easily display results (boxes, pavings) from
interval methods. VIBes consists in two parts: (1) the VIBes application
that features viewing, annotating and exporting figures, and (2) the
VIBes API that enables your program to communicate with the viewer in order
to draw figures. This package integrates the VIBes API into Octave. The
VIBes application is required for operation and must be installed
seperately. Data types from third-party interval arithmetic libraries for
Octave are also supported.
'';
# Marked this way until KarlJoad gets around to packaging the vibes program.
# https://github.com/ENSTABretagneRobotics/VIBES
broken = true;
};
}

View File

@ -0,0 +1,31 @@
{ buildOctavePackage
, lib
, fetchurl
, pkg-config
, ffmpeg
}:
buildOctavePackage rec {
pname = "video";
version = "2.0.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0s6j3c4dh5nsbh84s7vnd2ajcayy1gn07b4fcyrcynch3wl28mrv";
};
nativeBuildInputs = [
pkg-config
];
propagatedBuildInputs = [
ffmpeg
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/video/index.html";
license = with licenses; [ gpl3Plus bsd3 ];
maintainers = with maintainers; [ KarlJoad ];
description = "Wrapper for OpenCV's CvCapture_FFMPEG and CvVideoWriter_FFMPEG";
};
}

View File

@ -0,0 +1,41 @@
{ buildOctavePackage
, lib
, fetchurl
# Octave dependencies
, linear-algebra
, miscellaneous
, struct
, statistics
# Runtime dependencies
, freewrl
}:
buildOctavePackage rec {
pname = "vrml";
version = "1.0.13";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "1mx93k150agd27mbzvds13v9z0x36j68hwpdvlvjmcl2fga5fly4";
};
propagatedBuildInputs = [
freewrl
];
requiredOctavePackages = [
linear-algebra
miscellaneous
struct
statistics
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/vrml/index.html";
license = with licenses; [ gpl3Plus fdl12Plus ];
maintainers = with maintainers; [ KarlJoad ];
description = "3D graphics using VRML";
# Marked this way until KarlJoad gets freewrl as a runtime dependency.
broken = true;
};
}

View File

@ -0,0 +1,21 @@
{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "windows";
version = "1.5.0";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "05bsf3q816b9vwgmjdm761ybhmk8raq6dzxqvd11brma0granx3a";
};
meta = with lib; {
homepage = "https://octave.sourceforge.io/windows/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Provides COM interface and additional functionality on Windows";
};
}

View File

@ -0,0 +1,26 @@
{ buildOctavePackage
, lib
, fetchurl
, zeromq
}:
buildOctavePackage rec {
pname = "zeromq";
version = "1.5.2";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "18h1039ri7dr37jv20cvj5vhw7b57frrda0hhbvlgixinbqmn9j7";
};
propagatedBuildInputs = [
zeromq
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/zeromq/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "ZeroMQ bindings for GNU Octave";
};
}

View File

@ -11353,6 +11353,8 @@ in
overridePlatforms = ["x86_64-linux" "x86_64-darwin"];
};
octavePackages = recurseIntoAttrs octave.pkgs;
ocropus = callPackage ../applications/misc/ocropus { };
pachyderm = callPackage ../applications/networking/cluster/pachyderm { };

View File

@ -0,0 +1,224 @@
# This file contains the GNU Octave add-on packages set.
# Each attribute is an Octave library.
# Expressions for the Octave libraries are supposed to be in `pkgs/development/octave-modules/<name>/default.nix`.
# When contributing a new package, if that package has a dependency on another
# octave package, then you DO NOT need to explicitly list it as such when
# performing the callPackage. It will be passed implicitly.
# In addition, try to use the same dependencies as the ones octave needs, which
# should ensure greater compatibility between Octave itself and its packages.
# Like python-packages.nix, packages from top-level.nix are not in the scope
# of the `callPackage` used for packages here. So, when we do need packages
# from outside, we can `inherit` them from `pkgs`.
{ pkgs
, lib
, stdenv
, fetchurl
, newScope
, octave
}:
with lib;
makeScope newScope (self:
let
inherit (octave) blas lapack gfortran python texinfo gnuplot;
callPackage = self.callPackage;
buildOctavePackage = callPackage ../development/interpreters/octave/build-octave-package.nix {
inherit lib stdenv;
inherit octave;
inherit computeRequiredOctavePackages;
};
wrapOctave = callPackage ../development/interpreters/octave/wrap-octave.nix {
inherit octave;
inherit (pkgs) makeSetupHook makeWrapper;
};
# Given a list of required Octave package derivations, get a list of
# ALL required Octave packages needed for the ones specified to run.
computeRequiredOctavePackages = drvs: let
# Check whether a derivation is an octave package
hasOctavePackage = drv: drv?isOctavePackage;
packages = filter hasOctavePackage drvs;
in unique (packages ++ concatLists (catAttrs "requiredOctavePackages" packages));
in {
inherit callPackage buildOctavePackage computeRequiredOctavePackages;
inherit (callPackage ../development/interpreters/octave/hooks { })
writeRequiredOctavePackagesHook;
arduino = callPackage ../development/octave-modules/arduino {
inherit (pkgs) arduino;
};
audio = callPackage ../development/octave-modules/audio { };
bim = callPackage ../development/octave-modules/bim { };
bsltl = callPackage ../development/octave-modules/bsltl { };
cgi = callPackage ../development/octave-modules/cgi { };
communications = callPackage ../development/octave-modules/communications { };
control = callPackage ../development/octave-modules/control { };
data-smoothing = callPackage ../development/octave-modules/data-smoothing { };
database = callPackage ../development/octave-modules/database { };
dataframe = callPackage ../development/octave-modules/dataframe { };
dicom = callPackage ../development/octave-modules/dicom { };
divand = callPackage ../development/octave-modules/divand { };
doctest = callPackage ../development/octave-modules/doctest { };
econometrics = callPackage ../development/octave-modules/econometrics { };
fem-fenics = callPackage ../development/octave-modules/fem-fenics {
# PLACEHOLDER until KarlJoad gets dolfin packaged.
dolfin = null;
ffc = null;
};
fits = callPackage ../development/octave-modules/fits { };
financial = callPackage ../development/octave-modules/financial { };
fpl = callPackage ../development/octave-modules/fpl { };
fuzzy-logic-toolkit = callPackage ../development/octave-modules/fuzzy-logic-toolkit { };
ga = callPackage ../development/octave-modules/ga { };
general = callPackage ../development/octave-modules/general {
nettle = pkgs.nettle;
};
generate_html = callPackage ../development/octave-modules/generate_html { };
geometry = callPackage ../development/octave-modules/geometry { };
gsl = callPackage ../development/octave-modules/gsl {
inherit (pkgs) gsl;
};
image = callPackage ../development/octave-modules/image { };
image-acquisition = callPackage ../development/octave-modules/image-acquisition { };
instrument-control = callPackage ../development/octave-modules/instrument-control { };
io = callPackage ../development/octave-modules/io {
inherit (octave) enableJava;
};
interval = callPackage ../development/octave-modules/interval { };
level-set = callPackage ../development/octave-modules/level-set { };
linear-algebra = callPackage ../development/octave-modules/linear-algebra { };
lssa = callPackage ../development/octave-modules/lssa { };
ltfat = callPackage ../development/octave-modules/ltfat {
inherit (octave) fftw fftwSinglePrec portaudio jdk;
inherit (pkgs) fftwFloat fftwLongDouble;
};
mapping = callPackage ../development/octave-modules/mapping { };
matgeom = callPackage ../development/octave-modules/matgeom { };
miscellaneous = callPackage ../development/octave-modules/miscellaneous { };
msh = callPackage ../development/octave-modules/msh {
# PLACEHOLDER until KarlJoad gets dolfin packaged.
dolfin = null;
};
mvn = callPackage ../development/octave-modules/mvn { };
nan = callPackage ../development/octave-modules/nan { };
ncarray = callPackage ../development/octave-modules/ncarray { };
netcdf = callPackage ../development/octave-modules/netcdf {
inherit (pkgs) netcdf;
};
nurbs = callPackage ../development/octave-modules/nurbs { };
ocl = callPackage ../development/octave-modules/ocl { };
octclip = callPackage ../development/octave-modules/octclip { };
octproj = callPackage ../development/octave-modules/octproj { };
optics = callPackage ../development/octave-modules/optics { };
optim = callPackage ../development/octave-modules/optim { };
optiminterp = callPackage ../development/octave-modules/optiminterp { };
parallel = callPackage ../development/octave-modules/parallel { };
quaternion = callPackage ../development/octave-modules/quaternion { };
queueing = callPackage ../development/octave-modules/queueing { };
signal = callPackage ../development/octave-modules/signal { };
sockets = callPackage ../development/octave-modules/sockets { };
sparsersb = callPackage ../development/octave-modules/sparsersb {
librsb = null;
# TODO: Package the librsb library to build this package.
# http://librsb.sourceforge.net/
};
stk = callPackage ../development/octave-modules/stk { };
splines = callPackage ../development/octave-modules/splines { };
statistics = callPackage ../development/octave-modules/statistics { };
strings = callPackage ../development/octave-modules/strings { };
struct = callPackage ../development/octave-modules/struct { };
symbolic = callPackage ../development/octave-modules/symbolic {
inherit (octave) python;
};
tisean = callPackage ../development/octave-modules/tisean { };
tsa = callPackage ../development/octave-modules/tsa { };
vibes = callPackage ../development/octave-modules/vibes {
vibes = null;
# TODO: Need to package vibes:
# https://github.com/ENSTABretagneRobotics/VIBES
};
video = callPackage ../development/octave-modules/video { };
vrml = callPackage ../development/octave-modules/vrml {
freewrl = null;
};
windows = callPackage ../development/octave-modules/windows { };
zeromq = callPackage ../development/octave-modules/zeromq {
inherit (pkgs) zeromq;
};
})