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

authored by Sandro and committed by GitHub 6eeeb0f8 20089a89

+17 -5
+8 -4
pkgs/by-name/jo/joycond-cemuhook/package.nix
··· 6 6 7 7 python3Packages.buildPythonApplication { 8 8 pname = "joycond-cemuhook"; 9 - pyproject = true; 10 9 version = "0-unstable-2023-08-09"; 10 + pyproject = true; 11 11 12 12 src = fetchFromGitHub { 13 13 owner = "joaorb64"; ··· 16 16 hash = "sha256-K24CEmYWhgkvVX4geg2bylH8TSvHIpsWjsPwY5BpquI="; 17 17 }; 18 18 19 - nativeBuildInputs = with python3Packages; [ 19 + postPatch = '' 20 + substituteInPlace pyproject.toml \ 21 + --replace-fail 'setuptools-git-versioning<2' 'setuptools-git-versioning' 22 + ''; 23 + 24 + build-system = with python3Packages; [ 20 25 setuptools 21 26 setuptools-git-versioning 22 - setuptools-git 23 27 ]; 24 28 25 - propagatedBuildInputs = with python3Packages; [ 29 + dependencies = with python3Packages; [ 26 30 dbus-python 27 31 evdev 28 32 pyudev
+9 -1
pkgs/development/python-modules/setuptools-git-versioning/default.nix
··· 17 17 buildPythonPackage rec { 18 18 pname = "setuptools-git-versioning"; 19 19 version = "2.1.0"; 20 - format = "pyproject"; 20 + pyproject = true; 21 21 22 22 src = fetchFromGitHub { 23 23 owner = "dolfinus"; ··· 25 25 tag = "v${version}"; 26 26 hash = "sha256-Slf6tq83LajdTnr98SuCiFIdm/6auzftnARLAOBgyng="; 27 27 }; 28 + 29 + postPatch = '' 30 + # Because the .git dir is missing, it falls back to using version 0.0.1 31 + # Instead we use the version specified in the derivation 32 + substituteInPlace setup.py --replace-fail \ 33 + 'version=version_from_git(root=here, dev_template="{tag}.post{ccount}")' \ 34 + "version='${version}'" 35 + ''; 28 36 29 37 build-system = [ 30 38 setuptools