depot/third_party/nixpkgs/pkgs/development/python-modules/pip-chill/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

47 lines
1 KiB
Nix

{
lib,
fetchFromGitHub,
buildPythonPackage,
setuptools,
pip,
pythonAtLeast,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pip-chill";
version = "1.0.3";
pyproject = true;
src = fetchFromGitHub {
owner = "rbanffy";
repo = "pip-chill";
rev = "refs/tags/v${version}";
hash = "sha256-oWq3UWBL5nsCBUkaElashZKvm7pN3StJNubgU++8YFs=";
};
build-system = [ setuptools ];
dependencies = lib.optionals (pythonAtLeast "3.12") [ setuptools ];
nativeCheckInputs = [
pip
pytestCheckHook
];
preCheck = ''
substituteInPlace tests/test_pip_chill.py \
--replace-fail "pip_chill/cli.py" "${placeholder "out"}/bin/pip-chill"
'';
pythonImportsCheck = [ "pip_chill" ];
meta = {
description = "A more relaxed `pip freeze`";
homepage = "https://github.com/rbanffy/pip-chill";
changelog = "https://github.com/rbanffy/pip-chill/releases/tag/v${version}";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ tochiaha ];
mainProgram = "pip-chill";
};
}