pynac: fix build

TomaSajt b797c853 9f7053ff

+12 -6
+12 -6
pkgs/applications/science/math/pynac/default.nix
··· 10 10 , ncurses 11 11 }: 12 12 13 - stdenv.mkDerivation rec { 14 - version = "0.7.29"; 13 + stdenv.mkDerivation (finalAttrs: { 15 14 pname = "pynac"; 15 + version = "0.7.29"; 16 16 17 17 src = fetchFromGitHub { 18 18 owner = "pynac"; 19 19 repo = "pynac"; 20 - rev = "pynac-${version}"; 21 - sha256 = "sha256-ocR7emXtKs+Xe2f6dh4xEDAacgiolY8mtlLnWnNBS8A="; 20 + rev = "pynac-${finalAttrs.version}"; 21 + hash = "sha256-ocR7emXtKs+Xe2f6dh4xEDAacgiolY8mtlLnWnNBS8A="; 22 22 }; 23 23 24 24 patches = [ ··· 27 27 (fetchpatch { 28 28 name = "realpartloop.patch"; 29 29 url = "https://git.sagemath.org/sage.git/plain/build/pkgs/pynac/patches/realpartloop.patch?h=9.4.beta5"; 30 - sha256 = "sha256-1nj0xtlFN5fZKEiRLD+tiW/ZtxMQre1ziEGA0OVUGE4="; 30 + hash = "sha256-1nj0xtlFN5fZKEiRLD+tiW/ZtxMQre1ziEGA0OVUGE4="; 31 31 }) 32 32 ]; 33 + 34 + # Python 3.11 moved this header file, but is now is imported by default 35 + postPatch = '' 36 + substituteInPlace ginac/numeric.cpp \ 37 + --replace-fail "#include <longintrepr.h>" "" 38 + ''; 33 39 34 40 buildInputs = [ 35 41 flint ··· 57 63 maintainers = teams.sage.members; 58 64 platforms = platforms.unix; 59 65 }; 60 - } 66 + })