1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 setuptools,
6 pip,
7 pythonAtLeast,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "pip-chill";
13 version = "1.0.3";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "rbanffy";
18 repo = "pip-chill";
19 tag = "v${version}";
20 hash = "sha256-oWq3UWBL5nsCBUkaElashZKvm7pN3StJNubgU++8YFs=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = lib.optionals (pythonAtLeast "3.12") [ setuptools ];
26
27 nativeCheckInputs = [
28 pip
29 pytestCheckHook
30 ];
31
32 preCheck = ''
33 substituteInPlace tests/test_pip_chill.py \
34 --replace-fail "pip_chill/cli.py" "${placeholder "out"}/bin/pip-chill"
35 '';
36
37 pythonImportsCheck = [ "pip_chill" ];
38
39 meta = {
40 description = "More relaxed `pip freeze`";
41 homepage = "https://github.com/rbanffy/pip-chill";
42 changelog = "https://github.com/rbanffy/pip-chill/releases/tag/v${version}";
43 license = lib.licenses.gpl3Plus;
44 maintainers = with lib.maintainers; [ tochiaha ];
45 mainProgram = "pip-chill";
46 };
47}