mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-01 18:44:07 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
43 lines
829 B
Nix
43 lines
829 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, fetchFromGitHub
|
|
, pretend
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "calver";
|
|
version = "2022.06.26";
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "di";
|
|
repo = "calver";
|
|
rev = version;
|
|
hash = "sha256-YaXTkeUazwzghCX96Wfx39hGvukWKtHMLLeyF9OeiZI=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "version=calver_version(True)" 'version="${version}"'
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
pretend
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "calver" ];
|
|
|
|
meta = {
|
|
description = "Setuptools extension for CalVer package versions";
|
|
homepage = "https://github.com/di/calver";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
};
|
|
}
|