depot/third_party/nixpkgs/pkgs/development/python-modules/vispy/default.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

78 lines
1.5 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, substituteAll
, fetchPypi
, cython
, fontconfig
, freetype-py
, hsluv
, kiwisolver
, libGL
, numpy
, pythonOlder
, setuptools-scm
, setuptools-scm-git-archive
}:
buildPythonPackage rec {
pname = "vispy";
version = "0.14.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-JJpQl5/ACotlEJKDNU3PEs9BXBpdz5gh4RP25ZC5uTw=";
};
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 = [
cython
setuptools-scm
setuptools-scm-git-archive
];
buildInputs = [
libGL
];
propagatedBuildInputs = [
fontconfig
freetype-py
hsluv
kiwisolver
numpy
];
doCheck = false; # otherwise runs OSX code on linux.
pythonImportsCheck = [
"vispy"
"vispy.color"
"vispy.geometry"
"vispy.gloo"
"vispy.glsl"
"vispy.io"
"vispy.plot"
"vispy.scene"
"vispy.util"
"vispy.visuals"
];
meta = with lib; {
description = "Interactive scientific visualization in Python";
homepage = "https://vispy.org/index.html";
changelog = "https://github.com/vispy/vispy/blob/v${version}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = with maintainers; [ goertzenator ];
};
}