diff --git a/pkgs/by-name/jo/joycond-cemuhook/package.nix b/pkgs/by-name/jo/joycond-cemuhook/package.nix index 3665b72eefd0..1a5c9dc66cc3 100644 --- a/pkgs/by-name/jo/joycond-cemuhook/package.nix +++ b/pkgs/by-name/jo/joycond-cemuhook/package.nix @@ -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 diff --git a/pkgs/development/python-modules/setuptools-git-versioning/default.nix b/pkgs/development/python-modules/setuptools-git-versioning/default.nix index 28c69347f248..f237e9e9934a 100644 --- a/pkgs/development/python-modules/setuptools-git-versioning/default.nix +++ b/pkgs/development/python-modules/setuptools-git-versioning/default.nix @@ -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 ];