Unverified Commit dacfe706 authored by Robert Schütz's avatar Robert Schütz Committed by GitHub
Browse files

Merge pull request #289865 from dotlambda/spsdk-cryptography

python311Packages.spsdk: 2.0.1 -> 2.1.0
parents 1b4d05bf 9e37aaff
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
{ python3
, fetchPypi
, rustPlatform
}:

let
  python = python3.override {
    packageOverrides = self: super: {
      # https://github.com/nxp-mcuxpresso/spsdk/issues/64
      cryptography = super.cryptography.overridePythonAttrs (old: rec {
        version = "41.0.7";
        src = fetchPypi {
          inherit (old) pname;
          inherit version;
          hash = "sha256-E/k86b6oAWwlOzSvxr1qdZk+XEBnLtVAWpyDLw1KALw=";
        };
        cargoDeps = rustPlatform.fetchCargoTarball {
          inherit src;
          sourceRoot = "${old.pname}-${version}/${old.cargoRoot}";
          name = "${old.pname}-${version}";
          hash = "sha256-VeZhKisCPDRvmSjGNwCgJJeVj65BZ0Ge+yvXbZw86Rw=";
        };
        patches = [ ];
        doCheck = false; # would require overriding cryptography-vectors
      });
    };
  };
in with python.pkgs; toPythonApplication pynitrokey
+26 −38
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, hypothesis
, setuptools-scm
, six
, attrs
, py
, setuptools
, pytest-timeout
, pytest-tornado
, mock
, tabulate
, fetchPypi
, hatch-jupyter-builder
, hatchling
, jupyterlab
, nbformat
, jsonschema
, pytestCheckHook
, colorama
, pygments
, tornado
@@ -22,14 +13,16 @@
, gitpython
, jupyter-server
, jupyter-server-mathjax
, notebook
, jinja2
, git
, pytest-tornado
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "nbdime";
  version = "4.0.1";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.6";

@@ -39,48 +32,42 @@ buildPythonPackage rec {
  };

  nativeBuildInputs = [
    setuptools-scm
    hatch-jupyter-builder
    hatchling
    jupyterlab
  ];

  propagatedBuildInputs = [
    attrs
    py
    setuptools
    six
    jupyter-server-mathjax
    nbformat
    colorama
    pygments
    tornado
    requests
    gitpython
    notebook
    jupyter-server
    jupyter-server-mathjax
    jinja2
  ];

  nativeCheckInputs = [
    hypothesis
    pytest-timeout
    git
    pytest-tornado
    jsonschema
    mock
    tabulate
    pytestCheckHook
  ];

  disabledTests = [
    "test_apply_filter_no_repo"
    "test_diff_api_checkpoint"
    "test_filter_cmd_invalid_filter"
    "test_inline_merge_source_add"
    "test_inline_merge_source_patches"
    "test_inline_merge_source_replace"
    "test_inline_merge_cells_insertion"
    "test_inline_merge_cells_replacement"
    "test_interrogate_filter_no_repo"
    "test_merge_input_strategy_inline"
    "test_git_diffdriver"
    "test_git_difftool"
    "test_git_mergedriver"
    "test_git_mergetool"
  ];

  preCheck = ''
    export HOME="$TEMP"
    git config --global user.email "janedoe@example.com"
    git config --global user.name "Jane Doe"
  '';

  __darwinAllowLocalNetworking = true;

  pythonImportsCheck = [
@@ -89,7 +76,8 @@ buildPythonPackage rec {

  meta = with lib; {
    homepage = "https://github.com/jupyter/nbdime";
    description = "Tools for diffing and merging of Jupyter notebooks.";
    changelog = "https://github.com/jupyter/nbdime/blob/${version}/CHANGELOG.md";
    description = "Tools for diffing and merging of Jupyter notebooks";
    license = licenses.bsd3;
    maintainers = with maintainers; [ tbenst ];
  };
+43 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, setuptools-scm
, pyocd
, pypemicro
}:

buildPythonPackage rec {
  pname = "pyocd-pemicro";
  version = "1.1.5";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "pyocd";
    repo = "pyocd-pemicro";
    rev = "refs/tags/v${version}";
    hash = "sha256-qi803s8fkrLizcCLeDRz7CTQ56NGLQ4PPwCbxiRigwc=";
  };

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    pyocd
    pypemicro
  ];

  # upstream has no tests
  doCheck = false;

  meta = {
    changelog = "https://github.com/pyocd/pyocd-pemicro/releases/tag/v${version}";
    description = "PEMicro probe plugin for pyOCD";
    homepage = "https://github.com/pyocd/pyocd-pemicro";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}
+82 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, flit-core
, pythonRelaxDepsHook
, attrs
, jsonschema
, nbclient
, nbdime
, nbformat
, pytest
, black
, coverage
, ipykernel
, pytest-cov
, pytest-regressions
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "pytest-notebook";
  version = "0.10.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "chrisjsewell";
    repo = "pytest-notebook";
    rev = "refs/tags/v${version}";
    hash = "sha256-LoK0wb7rAbVbgyURCbSfckWvJDef3tPY+7V4YU1IBRU=";
  };

  nativeBuildInputs = [
    flit-core
    pythonRelaxDepsHook
  ];

  pythonRelaxDeps = [
    "attrs"
    "nbclient"
  ];

  propagatedBuildInputs = [
    attrs
    jsonschema
    nbclient
    nbdime
    nbformat
  ];

  buildInputs = [
    pytest
  ];

  pythonImportsCheck = [ "pytest_notebook" ];

  nativeCheckInputs = [
    black
    coverage
    ipykernel
    pytest-cov
    pytest-regressions
    pytestCheckHook
  ];

  preCheck = ''
    export HOME="$TEMP"
  '';

  disabledTests = [
    "test_diff_to_string"
    "test_execute_notebook_with_coverage"
    "test_regression_coverage"
  ];

  meta = {
    changelog = "https://github.com/chrisjsewell/pytest-notebook/blob/${src.rev}/docs/source/changelog.md";
    description = "Pytest plugin for regression testing and regenerating Jupyter Notebooks";
    homepage = "https://github.com/chrisjsewell/pytest-notebook";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}
+22 −30
Original line number Diff line number Diff line
@@ -9,21 +9,19 @@
, click
, click-command-tree
, click-option-group
, cmsis-pack-manager
, commentjson
, colorama
, crcmod
, cryptography
, deepmerge
, fastjsonschema
, hexdump
, importlib-metadata
, jinja2
, libusbsio
, oscrypto
, pycryptodome
, pyftdi
, platformdirs
, prettytable
, pylink-square
, pyocd
, pyocd-pemicro
, pypemicro
, pyserial
, requests
@@ -33,20 +31,22 @@
, spsdk
, testers
, typing-extensions
, ipykernel
, pytest-notebook
, pytestCheckHook
, voluptuous
}:

buildPythonPackage rec {
  pname = "spsdk";
  version = "2.0.1";
  version = "2.1.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "nxp-mcuxpresso";
    repo = pname;
    rev = version;
    hash = "sha256-C6cz5jhIHI4WkCYT0rURFa4kBAu6cMcKpQHiHACIiu8=";
    repo = "spsdk";
    rev = "refs/tags/${version}";
    hash = "sha256-ZXNqger5WBk2AjTszJLmemYDPClUPy+kNtBWSPcTDro=";
  };

  nativeBuildInputs = [
@@ -55,21 +55,7 @@ buildPythonPackage rec {
  ];

  pythonRelaxDeps = [
    "bincopy"
    "bitstring"
    "cmsis-pack-manager"
    "deepmerge"
    "jinja2"
    "pycryptodome"
    "pylink-square"
    "pyocd"
    "typing-extensions"
    "click"
    "ruamel.yaml"
  ];

  pythonRemoveDeps = [
    "pyocd-pemicro"
  ];

  propagatedBuildInputs = [
@@ -80,20 +66,19 @@ buildPythonPackage rec {
    click
    click-command-tree
    click-option-group
    cmsis-pack-manager
    commentjson
    colorama
    crcmod
    cryptography
    deepmerge
    fastjsonschema
    hexdump
    importlib-metadata
    jinja2
    libusbsio
    oscrypto
    pycryptodome
    platformdirs
    prettytable
    pylink-square
    pyocd
    pyocd-pemicro
    pypemicro
    pyserial
    requests
@@ -103,16 +88,23 @@ buildPythonPackage rec {
  ];

  nativeCheckInputs = [
    pyftdi
    ipykernel
    pytest-notebook
    pytestCheckHook
    voluptuous
  ];

  disabledTests = [
    "test_nxpcrypto_create_signature_algorithm"
    "test_nxpimage_sb31_kaypair_not_matching"
  ];

  pythonImportsCheck = [ "spsdk" ];

  passthru.tests.version = testers.testVersion { package = spsdk; };

  meta = with lib; {
    broken = versionAtLeast cryptography.version "41.1";
    changelog = "https://github.com/nxp-mcuxpresso/spsdk/blob/${src.rev}/docs/release_notes.rst";
    description = "NXP Secure Provisioning SDK";
    homepage = "https://github.com/nxp-mcuxpresso/spsdk";
Loading