1{
2 buildOctavePackage,
3 lib,
4 fetchurl,
5}:
6
7buildOctavePackage rec {
8 pname = "quaternion";
9 version = "2.4.0";
10
11 src = fetchurl {
12 url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
13 sha256 = "040ncksf0xz32qmi4484xs3q01nappxrsvwwa60g04yjy7c4sbac";
14 };
15
16 # Octave replaced many of the is_thing_type check function with isthing.
17 # The patch changes the occurrences of the old functions.
18 patchPhase = ''
19 sed -i s/is_numeric_type/isnumeric/g src/*.cc
20 sed -i s/is_real_type/isreal/g src/*.cc
21 sed -i s/is_bool_type/islogical/g src/*.cc
22 '';
23
24 meta = {
25 homepage = "https://gnu-octave.github.io/packages/quaternion/";
26 license = lib.licenses.gpl3Plus;
27 maintainers = with lib.maintainers; [ KarlJoad ];
28 description = "Quaternion package for GNU Octave, includes a quaternion class with overloaded operators";
29 };
30}