nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 flit-core,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "boltons";
12 version = "25.0.0";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "mahmoud";
17 repo = "boltons";
18 tag = version;
19 hash = "sha256-kBOU17/jRRAGb4MGawY0PY31OJf5arVz+J7xGBoMBkg=";
20 };
21
22 patches = [
23 (fetchpatch {
24 name = "pytest9-compat.patch";
25 url = "https://github.com/mahmoud/boltons/commit/a2af58548936c51a3d859f780e54ba170a6829bb.patch";
26 hash = "sha256-NRjfEKb0doJEtS5GyrF0dJYYr2u+ukogfUmmVnsHAwM=";
27 })
28 ];
29
30 build-system = [ flit-core ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 # Tests bind to localhost
35 __darwinAllowLocalNetworking = true;
36
37 pythonImportsCheck = [ "boltons" ];
38
39 meta = {
40 description = "Constructs, recipes, and snippets extending the Python standard library";
41 longDescription = ''
42 Boltons is a set of over 200 BSD-licensed, pure-Python utilities
43 in the same spirit as - and yet conspicuously missing from - the
44 standard library, including:
45
46 - Atomic file saving, bolted on with fileutils
47 - A highly-optimized OrderedMultiDict, in dictutils
48 - Two types of PriorityQueue, in queueutils
49 - Chunked and windowed iteration, in iterutils
50 - Recursive data structure iteration and merging, with iterutils.remap
51 - Exponential backoff functionality, including jitter, through
52 iterutils.backoff
53 - A full-featured TracebackInfo type, for representing stack
54 traces, in tbutils
55 '';
56 homepage = "https://github.com/mahmoud/boltons";
57 changelog = "https://github.com/mahmoud/boltons/blob/${version}/CHANGELOG.md";
58 license = lib.licenses.bsd3;
59 maintainers = with lib.maintainers; [ twey ];
60 };
61}