nixpkgs/pkgs/development/python-modules/boltons/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

40 lines
1.3 KiB
Nix

{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pytest }:
buildPythonPackage rec {
pname = "boltons";
version = "20.2.0";
# No tests in PyPi Tarball
src = fetchFromGitHub {
owner = "mahmoud";
repo = "boltons";
rev = version;
sha256 = "08rd6av8dp5n1vz6nybmayl1mfsmj66cskiaybfshcgix29ca803";
};
checkInputs = [ pytest ];
checkPhase = "pytest tests";
meta = with lib; {
homepage = "https://github.com/mahmoud/boltons";
description = "220+ constructs, recipes, and snippets extending (and relying on nothing but) the Python standard library";
longDescription = ''
Boltons is a set of over 220 BSD-licensed, pure-Python utilities
in the same spirit as and yet conspicuously missing from the
standard library, including:
- Atomic file saving, bolted on with fileutils
- A highly-optimized OrderedMultiDict, in dictutils
- Two types of PriorityQueue, in queueutils
- Chunked and windowed iteration, in iterutils
- Recursive data structure iteration and merging, with iterutils.remap
- Exponential backoff functionality, including jitter, through
iterutils.backoff
- A full-featured TracebackInfo type, for representing stack
traces, in tbutils
'';
license = licenses.bsd3;
maintainers = with maintainers; [ twey ];
};
}