Files
nixpkgs/pkgs/development/python-modules/manhole/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

55 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pytest,
requests,
process-tests,
}:
buildPythonPackage rec {
pname = "manhole";
version = "1.8.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Nmj9r4OzPJQ9tOdQ4MVU4xwg9jM4SWiV3U1kEGgNnEs=";
};
# test_help expects architecture-dependent Linux signal numbers.
#
# {test_locals,test_socket_path} fail to remove /tmp/manhole-socket
# on the x86_64-darwin builder.
#
# TODO: change this back to `doCheck = stdenv.hostPlatform.isLinux` after
# https://github.com/ionelmc/python-manhole/issues/54 is fixed
doCheck = false;
nativeCheckInputs = [
pytest
requests
process-tests
];
checkPhase = ''
# Based on its tox.ini
export PYTHONUNBUFFERED=yes
export PYTHONPATH=.:tests:$PYTHONPATH
# The tests use manhole-cli
export PATH="$PATH:$out/bin"
# test_uwsgi fails with:
# http.client.RemoteDisconnected: Remote end closed connection without response
py.test -vv -k "not test_uwsgi"
'';
meta = {
homepage = "https://github.com/ionelmc/python-manhole";
description = "Debugging manhole for Python applications";
mainProgram = "manhole-cli";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ ivan ];
};
}