Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192{ lib, fetchFromGitHub, python, buildPythonPackage, nix-update-script, fetchurl,
# build-time dependencies setuptools, cython, perl,
# static libraries pkgsStatic, gmpStatic ? pkgsStatic.gmp, pari, pariStatic_2_15 ? pari.overrideAttrs ( finalAttrs: oldAttrs: { version = "2.15.4"; src = fetchurl { url = "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor finalAttrs.version}/pari-${finalAttrs.version}.tar.gz"; hash = "sha256-w1Rb/uDG37QLd/tLurr5mdguYAabn20ovLbPAEyMXA8="; }; installTargets = [ "install" "install-lib-sta" ]; } ),}:
buildPythonPackage (finalAttrs: { pname = "cypari"; version = "2.5.7"; pyproject = true;
src = fetchFromGitHub { owner = "3-manifolds"; repo = "CyPari"; tag = "${finalAttrs.version}_as_released"; hash = "sha256-t8nuov7BZNSEd5ReIKsArtLvwh7BWs7rfaTswdypKgg="; };
postPatch = '' substituteInPlace pyproject.toml \ --replace-fail 'requires = ["setuptools", "wheel", "cython==3.2.3"]' \ 'requires = ["setuptools", "wheel", "cython"]' '';
preBuild = '' mkdir libcache ln -s ${gmpStatic} libcache/gmp ln -s ${pariStatic_2_15} libcache/pari '';
build-system = [ setuptools cython ];
nativeBuildInputs = [ perl ];
pythonImportsCheck = [ "cypari" ];
checkPhase = '' runHook preCheck ${python.interpreter} -P -m cypari.test runHook postCheck '';
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex" "(.*)_as_released" ]; };
meta = { description = "Sage's PARI extension, modified to stand alone"; homepage = "https://github.com/3-manifolds/CyPari"; changelog = "https://github.com/3-manifolds/CyPari/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ noiioiu alejo7797 ]; };})