Skip to content

Commit

Permalink
python312Packages.strct: 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 f38266e commit 1093eb0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkgs/development/python-modules/strct/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lib
, fetchFromGitHub
, fetchpatch
, buildPythonPackage
, setuptools
, pytestCheckHook
Expand All @@ -18,11 +19,24 @@ buildPythonPackage rec {
hash = "sha256-ctafvdfSOdp7tlCUYg7d5XTXR1qBcWvOVtGtNUnhYIw=";
};

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

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

nativeBuildInputs = [
Expand Down

0 comments on commit 1093eb0

Please sign in to comment.