mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-09 18:47:02 +01:00
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchpatch,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pprintpp";
|
|
version = "0.4.0-unstable-2022-05-31";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "joaonc";
|
|
repo = "pprintpp2";
|
|
rev = "303f0652c9420f2cf0a0f4fe1907377508a17b3d"; # no tags
|
|
hash = "sha256-rjOf38m5mzIyJ3aVrD0+WQuzIyFjfa/4zmpFGGhF2hs=";
|
|
};
|
|
|
|
patches = [
|
|
# Remove "U" move from open(), https://github.com/wolever/pprintpp/pull/31
|
|
(fetchpatch {
|
|
name = "remove-u.patch";
|
|
url = "https://github.com/wolever/pprintpp/commit/deec5e5efad562fc2f9084abfe249ed0c7dd65fa.patch";
|
|
hash = "sha256-I84pnY/KyCIPPI9q0uvj64t8oPeMkgVTPEBRANkZNa4=";
|
|
})
|
|
];
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
pythonImportsCheck = [ "pprintpp" ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
meta = {
|
|
description = "Drop-in replacement for pprint that's actually pretty";
|
|
homepage = "https://github.com/wolever/pprintpp";
|
|
changelog = "https://github.com/wolever/pprintpp/blob/${version}/CHANGELOG.txt";
|
|
license = lib.licenses.bsd2;
|
|
maintainers = with lib.maintainers; [ jakewaksbaum ];
|
|
mainProgram = "pypprint";
|
|
};
|
|
}
|