forked from mirrors/nixpkgs
4a7f99d55d
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
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ lib, stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, pytest
|
|
, requests
|
|
, process-tests
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "manhole";
|
|
version = "1.6.0";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "d4ab98198481ed54a5b95c0439f41131f56d7d3755eedaedce5a45ca7ff4aa42";
|
|
};
|
|
|
|
# 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.isLinux` after
|
|
# https://github.com/ionelmc/python-manhole/issues/54 is fixed
|
|
doCheck = false;
|
|
|
|
checkInputs = [ 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 = with lib; {
|
|
homepage = "https://github.com/ionelmc/python-manhole";
|
|
description = "Debugging manhole for Python applications";
|
|
license = licenses.bsd2;
|
|
maintainers = with maintainers; [ ivan ];
|
|
};
|
|
}
|