python310Packages.pykoplenti: Fix build

Convert to pep517 build, substitute illegal version specifier, use hash
and conver the existing hash to an SRI hash.
This commit is contained in:
Martin Weinelt 2023-03-05 23:27:43 +01:00
parent 27ae3a1016
commit 38e74f86e5
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -6,20 +6,33 @@
, prompt-toolkit
, pycryptodome
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "pykoplenti";
version = "1.0.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "stegm";
repo = pname;
rev = "v${version}";
sha256 = "12nsyz8a49vhby1jp991vaky82fm93jrgcsjzwa2rixwg1zql4sw";
rev = "refs/tags/v${version}";
hash = "sha256-XBOKf3i8xywU/1Kzl+VI1Qnkp9ohpSuDX3AnotD32oo=";
};
nativeBuildInputs = [
setuptools
];
postPatch = ''
# remove with 1.1.0
substituteInPlace setup.cfg \
--replace 'version = unreleased' 'version = ${version}'
'';
propagatedBuildInputs = [
aiohttp
click