nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchpatch,
5 fetchFromGitHub,
6 pytestCheckHook,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "pprintpp";
12 version = "0.4.0-unstable-2022-05-31";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "joaonc";
17 repo = "pprintpp2";
18 rev = "303f0652c9420f2cf0a0f4fe1907377508a17b3d"; # no tags
19 hash = "sha256-rjOf38m5mzIyJ3aVrD0+WQuzIyFjfa/4zmpFGGhF2hs=";
20 };
21
22 patches = [
23 # Remove "U" move from open(), https://github.com/wolever/pprintpp/pull/31
24 (fetchpatch {
25 name = "remove-u.patch";
26 url = "https://github.com/wolever/pprintpp/commit/deec5e5efad562fc2f9084abfe249ed0c7dd65fa.patch";
27 hash = "sha256-I84pnY/KyCIPPI9q0uvj64t8oPeMkgVTPEBRANkZNa4=";
28 })
29 ];
30
31 build-system = [ setuptools ];
32
33 pythonImportsCheck = [ "pprintpp" ];
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 meta = {
38 description = "Drop-in replacement for pprint that's actually pretty";
39 homepage = "https://github.com/wolever/pprintpp";
40 changelog = "https://github.com/wolever/pprintpp/blob/${version}/CHANGELOG.txt";
41 license = lib.licenses.bsd2;
42 maintainers = with lib.maintainers; [ jakewaksbaum ];
43 mainProgram = "pypprint";
44 };
45}