Commit ed858919 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.nwdiag: refactor

parent d4256783
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
, blockdiag
, fetchFromGitHub
, buildPythonPackage
, nose
, pynose
, pytestCheckHook
, setuptools
, pythonOlder
@@ -11,24 +11,27 @@
buildPythonPackage rec {
  pname = "nwdiag";
  version = "3.0.0";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "blockdiag";
    repo = pname;
    rev = version;
    repo = "nwdiag";
    rev = "refs/tags/${version}";
    hash = "sha256-uKrdkXpL5YBr953sRsHknYg+2/WwrZmyDf8BMA2+0tU=";
  };

  propagatedBuildInputs = [
    blockdiag
  build-system = [
    setuptools
  ];

  dependencies = [
    blockdiag
  ];

  nativeCheckInputs = [
    nose
    pynose
    pytestCheckHook
  ];

@@ -37,8 +40,9 @@ buildPythonPackage rec {
  ];

  disabledTests = [
    # UnicodeEncodeError: 'latin-1' codec can't encode...
    "test_setup_inline_svg_is_true_with_multibytes"
    # AttributeError: 'TestRstDirectives' object has no attribute 'assertRegexpMatches'
    "svg"
    "noviewbox"
  ];

  pythonImportsCheck = [
@@ -48,8 +52,10 @@ buildPythonPackage rec {
  meta = with lib; {
    description = "Generate network-diagram image from spec-text file (similar to Graphviz)";
    homepage = "http://blockdiag.com/";
    changelog = "https://github.com/blockdiag/nwdiag/blob/${version}/CHANGES.rst";
    license = licenses.asl20;
    platforms = platforms.unix;
    maintainers = with maintainers; [ bjornfor ];
    mainProgram = "rackdiag";
    platforms = platforms.unix;
  };
}