Skip to content

Commit

Permalink
python312Packages.birch: unbreak with upstreamed patch, properly set …
Browse files Browse the repository at this point in the history
…version
  • Loading branch information
pbsds committed Jan 14, 2024
1 parent 1093eb0 commit 1568378
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkgs/development/python-modules/birch/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, setuptools
, strct
, pytestCheckHook
Expand All @@ -19,11 +20,24 @@ buildPythonPackage rec {
hash = "sha256-KdQZzQJvJ+logpcLQfaqqEEZJ/9VmNTQX/a4v0oBC98=";
};

patches = [
# https://github.com/shaypal5/birch/pull/4
(fetchpatch {
name = "fix-versioneer-on-python312.patch";
url = "https://github.com/shaypal5/birch/commit/84d597b2251ebb76fb15fb70fc86c83baa19dc0b.patch";
hash = "sha256-xXADCSIhq1ARny2twzrhR1J8LkMFWFl6tmGxrM8RvkU=";
})
];

postPatch = ''
substituteInPlace pytest.ini \
--replace \
"--cov" \
"#--cov"
# configure correct version, which fails due to missing .git
substituteInPlace versioneer.py birch/_version.py \
--replace '"0+unknown"' '"${version}"'
'';

nativeBuildInputs = [
Expand Down

0 comments on commit 1568378

Please sign in to comment.