setuptools-git-versioning: fix package version (#430881)

This commit is contained in:
Sandro
2025-08-04 19:52:30 +02:00
committed by GitHub
2 changed files with 17 additions and 5 deletions
+8 -4
View File
@@ -6,8 +6,8 @@
python3Packages.buildPythonApplication {
pname = "joycond-cemuhook";
pyproject = true;
version = "0-unstable-2023-08-09";
pyproject = true;
src = fetchFromGitHub {
owner = "joaorb64";
@@ -16,13 +16,17 @@ python3Packages.buildPythonApplication {
hash = "sha256-K24CEmYWhgkvVX4geg2bylH8TSvHIpsWjsPwY5BpquI=";
};
nativeBuildInputs = with python3Packages; [
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'setuptools-git-versioning<2' 'setuptools-git-versioning'
'';
build-system = with python3Packages; [
setuptools
setuptools-git-versioning
setuptools-git
];
propagatedBuildInputs = with python3Packages; [
dependencies = with python3Packages; [
dbus-python
evdev
pyudev
@@ -17,7 +17,7 @@
buildPythonPackage rec {
pname = "setuptools-git-versioning";
version = "2.1.0";
format = "pyproject";
pyproject = true;
src = fetchFromGitHub {
owner = "dolfinus";
@@ -26,6 +26,14 @@ buildPythonPackage rec {
hash = "sha256-Slf6tq83LajdTnr98SuCiFIdm/6auzftnARLAOBgyng=";
};
postPatch = ''
# Because the .git dir is missing, it falls back to using version 0.0.1
# Instead we use the version specified in the derivation
substituteInPlace setup.py --replace-fail \
'version=version_from_git(root=here, dev_template="{tag}.post{ccount}")' \
"version='${version}'"
'';
build-system = [
setuptools
];