python312Packages.pygsl: fix build with gsl 2.8

This commit is contained in:
Weijia Wang
2024-08-04 22:08:46 +02:00
parent f91fb1678a
commit 5bc5f138bf
@@ -20,6 +20,14 @@ buildPythonPackage rec {
hash = "sha256-7agGgfDUgY6mRry7d38vGGNLJC4dFUniy2M/cnejDDs=";
};
# 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