From 5bc5f138bf15050eebabf80b6fa93178d47c3c69 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sun, 4 Aug 2024 22:08:46 +0200 Subject: [PATCH] python312Packages.pygsl: fix build with gsl 2.8 --- pkgs/development/python-modules/pygsl/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/pygsl/default.nix b/pkgs/development/python-modules/pygsl/default.nix index c8e247f7d2d9..7726badc8197 100644 --- a/pkgs/development/python-modules/pygsl/default.nix +++ b/pkgs/development/python-modules/pygsl/default.nix @@ -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