2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, substituteAll
|
|
|
|
, fetchPypi
|
2024-04-21 15:54:59 +00:00
|
|
|
, cython
|
2021-09-18 10:52:07 +00:00
|
|
|
, fontconfig
|
|
|
|
, freetype-py
|
|
|
|
, hsluv
|
|
|
|
, kiwisolver
|
|
|
|
, libGL
|
|
|
|
, numpy
|
2024-01-13 08:15:51 +00:00
|
|
|
, oldest-supported-numpy
|
|
|
|
, packaging
|
2022-12-28 21:21:41 +00:00
|
|
|
, pythonOlder
|
2024-01-13 08:15:51 +00:00
|
|
|
, setuptools
|
2021-09-18 10:52:07 +00:00
|
|
|
, setuptools-scm
|
2024-01-13 08:15:51 +00:00
|
|
|
, wheel
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "vispy";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.14.2";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-12-28 21:21:41 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-7ti0TW9ch70pWySqmi4OTm3GqQXM7gGy1ByPvwp2ez0=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./library-paths.patch;
|
|
|
|
fontconfig = "${fontconfig.lib}/lib/libfontconfig${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
gl = "${libGL.out}/lib/libGL${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython
|
2024-01-13 08:15:51 +00:00
|
|
|
oldest-supported-numpy
|
|
|
|
setuptools
|
2021-09-18 10:52:07 +00:00
|
|
|
setuptools-scm
|
2024-01-13 08:15:51 +00:00
|
|
|
wheel
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libGL
|
2020-08-20 17:08:02 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
freetype-py
|
|
|
|
hsluv
|
|
|
|
kiwisolver
|
|
|
|
numpy
|
2024-01-13 08:15:51 +00:00
|
|
|
packaging
|
2020-08-20 17:08:02 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false; # otherwise runs OSX code on linux.
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"vispy"
|
|
|
|
"vispy.color"
|
|
|
|
"vispy.geometry"
|
|
|
|
"vispy.gloo"
|
|
|
|
"vispy.glsl"
|
|
|
|
"vispy.io"
|
|
|
|
"vispy.plot"
|
|
|
|
"vispy.scene"
|
|
|
|
"vispy.util"
|
|
|
|
"vispy.visuals"
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Interactive scientific visualization in Python";
|
2022-12-28 21:21:41 +00:00
|
|
|
homepage = "https://vispy.org/index.html";
|
|
|
|
changelog = "https://github.com/vispy/vispy/blob/v${version}/CHANGELOG.md";
|
2020-08-20 17:08:02 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ goertzenator ];
|
|
|
|
};
|
|
|
|
}
|