python3Packages.bcf: modernize

This commit is contained in:
Harinn
2026-06-06 02:00:04 +07:00
parent 96ecb4aaaa
commit 7028b8f0c6
@@ -14,22 +14,24 @@
requests,
schema,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "bcf";
version = "1.9.1";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "hardwario";
repo = "bch-firmware-tool";
rev = "v${version}";
sha256 = "sha256-xKggVEN3O0umDEt358xc+79/SEVm2peMjfFHGTppTEo=";
tag = "v${finalAttrs.version}";
hash = "sha256-xKggVEN3O0umDEt358xc+79/SEVm2peMjfFHGTppTEo=";
};
build-system = [ setuptools ];
postPatch = ''
sed -ri 's/@@VERSION@@/${version}/g' \
sed -ri 's/@@VERSION@@/${finalAttrs.version}/g' \
bcf/__init__.py setup.py
'';
@@ -57,4 +59,4 @@ buildPythonPackage rec {
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ cynerd ];
};
}
})