1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 buildPythonPackage,
6 setuptools,
7 numpy,
8 matplotlib,
9 scipy,
10 sympy,
11
12 cmake,
13 gfortran,
14
15 nix-update-script,
16}:
17buildPythonPackage rec {
18 name = "bezier";
19 version = "2024.6.20";
20 src = fetchFromGitHub {
21 owner = "dhermes";
22 repo = "bezier";
23 tag = version;
24 hash = "sha256-TH3x6K5S3uV/K/5e+TXCSiJsyJE0tZ+8ZLc+i/x/fV8=";
25 };
26
27 pyproject = true;
28
29 build-system = [ setuptools ];
30
31 dependencies = [ numpy ];
32 optional-dependencies = {
33 full = [
34 matplotlib
35 scipy
36 sympy
37 ];
38 };
39
40 env = {
41 BEZIER_IGNORE_VERSION_CHECK = 1;
42 BEZIER_INSTALL_PREFIX = stdenv.mkDerivation {
43 name = "bezier-fortran-extension";
44 inherit version src;
45
46 sourceRoot = "${src.name}/src/fortran";
47
48 nativeBuildInputs = [
49 cmake
50 gfortran
51 ];
52 };
53 NIX_CFLAGS_COMPILE = toString [
54 "-Wno-error=incompatible-pointer-types"
55 ];
56 };
57
58 pythonImportsCheck = [ "bezier" ];
59
60 passthru.updateScript = nix-update-script { };
61
62 meta = {
63 description = "Helper for Bézier Curves, Triangles, and Higher Order Objects";
64 changelog = "https://bezier.readthedocs.io/en/latest/releases/latest.html";
65 homepage = "https://github.com/dhermes/bezier";
66 license = lib.licenses.mit;
67 maintainers = with lib.maintainers; [ WeetHet ];
68 };
69}