mitmproxy2swagger: refactor (#348050)

This commit is contained in:
Fabian Affolter 2024-10-12 17:03:06 +02:00 committed by GitHub
commit b793a85e07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,29 +1,29 @@
{ lib {
, fetchFromGitHub lib,
, python3 fetchFromGitHub,
python3,
}: }:
python3.pkgs.buildPythonApplication rec { python3.pkgs.buildPythonApplication rec {
pname = "mitmproxy2swagger"; pname = "mitmproxy2swagger";
version = "0.13.0"; version = "0.13.0";
format = "pyproject"; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "alufers"; owner = "alufers";
repo = pname; repo = "mitmproxy2swagger";
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
hash = "sha256-VHxqxee5sQWRS13V4SfY4LWaN0oxxWsNVDOEqUyKHfg="; hash = "sha256-VHxqxee5sQWRS13V4SfY4LWaN0oxxWsNVDOEqUyKHfg=";
}; };
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
pythonRelaxDeps = [ pythonRelaxDeps = [
"mitmproxy"
"ruamel.yaml" "ruamel.yaml"
]; ];
propagatedBuildInputs = with python3.pkgs; [ build-system = with python3.pkgs; [ poetry-core ];
dependencies = with python3.pkgs; [
json-stream json-stream
mitmproxy mitmproxy
ruamel-yaml ruamel-yaml
@ -32,16 +32,14 @@ python3.pkgs.buildPythonApplication rec {
# No tests available # No tests available
doCheck = false; doCheck = false;
pythonImportsCheck = [ pythonImportsCheck = [ "mitmproxy2swagger" ];
"mitmproxy2swagger"
];
meta = with lib; { meta = with lib; {
description = "Tool to automagically reverse-engineer REST APIs"; description = "Tool to automagically reverse-engineer REST APIs";
mainProgram = "mitmproxy2swagger";
homepage = "https://github.com/alufers/mitmproxy2swagger"; homepage = "https://github.com/alufers/mitmproxy2swagger";
changelog = "https://github.com/alufers/mitmproxy2swagger/releases/tag/${version}"; changelog = "https://github.com/alufers/mitmproxy2swagger/releases/tag/${version}";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ fab ]; maintainers = with maintainers; [ fab ];
mainProgram = "mitmproxy2swagger";
}; };
} }