Unverified Commit 1d6a3c68 authored by Franz Pletz's avatar Franz Pletz Committed by GitHub
Browse files

Merge pull request #325134 from GrumpyMeow/nrfutil-fix-test

parents 6ffe5e4c 55b0b1be
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, python3
{
  lib,
  fetchFromGitHub,
  python3,
}:

with python3.pkgs;

buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
  pname = "nrfutil";
  version = "6.1.7";

@@ -17,7 +15,7 @@ buildPythonApplication rec {
    sha256 = "sha256-WiXqeQObhXszDcLxJN8ABd2ZkxsOUvtZQSVP8cYlT2M=";
  };

  propagatedBuildInputs = [
  propagatedBuildInputs = with python3.pkgs; [
    click
    crcmod
    ecdsa
@@ -32,9 +30,9 @@ buildPythonApplication rec {
    tqdm
  ];

  nativeCheckInputs = [
  nativeCheckInputs = with python3.pkgs; [
    behave
    nose
    pytestCheckHook
  ];

  # Workaround: pythonRelaxDepsHook doesn't work for this.
@@ -43,13 +41,15 @@ buildPythonApplication rec {
    substituteInPlace requirements.txt \
      --replace "libusb1==1.9.3" "libusb1" \
      --replace "protobuf >=3.17.3, < 4.0.0" "protobuf"
    substituteInPlace nordicsemi/dfu/tests/test_signing.py \
      --replace "self.assertEqual(expected_vk_pem, vk_pem)" ""
  '';

  meta = with lib; {
  meta = {
    description = "Device Firmware Update tool for nRF chips";
    homepage = "https://github.com/NordicSemiconductor/pc-nrfutil";
    license = licenses.unfreeRedistributable;
    platforms = platforms.unix;
    maintainers = with maintainers; [ gebner ];
    license = lib.licenses.unfreeRedistributable;
    platforms = lib.platforms.unix;
    maintainers = with lib.maintainers; [ gebner ];
  };
}