diff options
Diffstat (limited to 'pkgs/development/python-modules/pygsl/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pygsl/default.nix | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/pkgs/development/python-modules/pygsl/default.nix b/pkgs/development/python-modules/pygsl/default.nix index 13a4644962b3..792342dbd9bf 100644 --- a/pkgs/development/python-modules/pygsl/default.nix +++ b/pkgs/development/python-modules/pygsl/default.nix @@ -1,39 +1,48 @@ -{ lib -, buildPythonPackage -, fetchPypi -, gsl -, swig -, numpy -, pytestCheckHook +{ + lib, + buildPythonPackage, + fetchFromGitHub, + gsl, + swig, + numpy, + pytestCheckHook, }: buildPythonPackage rec { pname = "pygsl"; - version = "2.3.3"; + version = "2.4.1"; format = "setuptools"; - src = fetchPypi { - inherit pname version; - hash = "sha256-F3m85Bs8sONw0Rv0EAOFK6R1DFHfW4dxuzQmXo4PHfM="; + src = fetchFromGitHub { + owner = "pygsl"; + repo = "pygsl"; + rev = "refs/tags/v${version}"; + hash = "sha256-85j57gzvomhBX/+Dif8IoMpNE9vJvyHPFHchKRF9OQM="; }; + # error: no member named 'n' in 'gsl_bspline_workspace' + postPatch = lib.optionalString (lib.versionAtLeast gsl.version "2.8") '' + substituteInPlace src/bspline/bspline.ic \ + --replace-fail "self->w->n" "self->w->ncontrol" + substituteInPlace swig_src/bspline_wrap.c \ + --replace-fail "self->w->n;" "self->w->ncontrol;" + ''; + nativeBuildInputs = [ gsl.dev swig ]; - buildInputs = [ - gsl - ]; - propagatedBuildInputs = [ - numpy - ]; + buildInputs = [ gsl ]; + dependencies = [ numpy ]; + + preBuild = '' + python setup.py build_ext --inplace + ''; preCheck = '' cd tests ''; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; meta = { description = "Python interface for GNU Scientific Library"; |