depot/third_party/nixpkgs/pkgs/development/python-modules/calver/default.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

42 lines
823 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}"'
'';
checkInputs = [
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 ];
};
}