nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5
6 # build-system
7 flit-core,
8
9 # tests
10 pretend,
11 pytestCheckHook,
12}:
13
14let
15 packaging = buildPythonPackage rec {
16 pname = "packaging";
17 version = "25.0";
18 pyproject = true;
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-1EOHLJjWd79g9qHy+MHLdI6P52LSv50xSLVZkpWw/E8=";
23 };
24
25 nativeBuildInputs = [ flit-core ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 pretend
30 ];
31
32 pythonImportsCheck = [
33 "packaging"
34 "packaging.metadata"
35 "packaging.requirements"
36 "packaging.specifiers"
37 "packaging.tags"
38 "packaging.version"
39 ];
40
41 # Prevent circular dependency with pytest
42 doCheck = false;
43
44 passthru.tests = packaging.overridePythonAttrs (_: {
45 doCheck = true;
46 });
47
48 meta = {
49 changelog = "https://github.com/pypa/packaging/blob/${version}/CHANGELOG.rst";
50 description = "Core utilities for Python packages";
51 downloadPage = "https://github.com/pypa/packaging";
52 homepage = "https://packaging.pypa.io/";
53 license = with lib.licenses; [
54 bsd2
55 asl20
56 ];
57 maintainers = with lib.maintainers; [ bennofs ];
58 teams = [ lib.teams.python ];
59 };
60 };
61in
62packaging