From db60f460b67463cdc12c3ad2982a49a80269717e Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Wed, 30 Mar 2022 02:50:42 +0000 Subject: [PATCH] python3Packages.treeo: 0.4.0 -> 0.0.11 --- .../python-modules/treeo/default.nix | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/treeo/default.nix b/pkgs/development/python-modules/treeo/default.nix index f3271b9a3bb..febb59880b6 100644 --- a/pkgs/development/python-modules/treeo/default.nix +++ b/pkgs/development/python-modules/treeo/default.nix @@ -1,5 +1,6 @@ { buildPythonPackage , fetchFromGitHub +, fetchpatch , jax , jaxlib , lib @@ -8,20 +9,30 @@ buildPythonPackage rec { pname = "treeo"; - version = "0.4.0"; + # Note that there is a version 0.4.0, but it was released in error. At the + # time of writing (2022-03-29), v0.0.11 is the latest as reported on GitHub + # and PyPI. + version = "0.0.11"; format = "pyproject"; src = fetchFromGitHub { owner = "cgarciae"; repo = pname; rev = version; - sha256 = "176r1kgsdlylvdrxmhnzni81p8m9cfnsn4wwn6fnmsgam2qbp76j"; + hash = "sha256-zs3F8i+G5OX/A9wOO60xVuvnm2QqrL+dHIrC0qwH37o="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'typing-extensions = "^3.10.0"' 'typing-extensions = "*"' - ''; + # See https://github.com/cgarciae/treex/issues/68. + patches = [ + (fetchpatch { + url = "https://github.com/cgarciae/treeo/pull/14/commits/022915da2b3bf76406a7c79d1b4593bee7956f16.patch"; + hash = "sha256-WGxJqqrf2g0yZe30RyG1xxbloiqj1awuf1Y4eh5y+z0="; + }) + (fetchpatch { + url = "https://github.com/cgarciae/treeo/pull/14/commits/99f9488bd0c977780844fd79743167b0010d359b.patch"; + hash = "sha256-oKDYs+Ah0QXkhiJysIudQ6VLIiUiIcnQisxYp6GJuTc="; + }) + ]; nativeBuildInputs = [ poetry-core