Unverified Commit d665a674 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

snagboot: 1.3 -> 2.1 (#378751)

parents e6e08522 15d16164
Loading
Loading
Loading
Loading
+18 −14
Original line number Diff line number Diff line
@@ -2,25 +2,26 @@
  lib,
  stdenv,
  fetchFromGitHub,
  python3,
  python3Packages,
  snagboot,
  testers,
  gitUpdater,
}:

python3.pkgs.buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
  pname = "snagboot";
  version = "1.3";
  format = "pyproject";
  version = "2.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "bootlin";
    repo = "snagboot";
    rev = "v${version}";
    hash = "sha256-ergTa6uR1SyR27H2HAWp/rtgalCnQge07Pi24PrsW+8=";
    tag = "v${version}";
    hash = "sha256-1WyCzfvcvDpYybxV2Jt/Ty4i2ywapJmEAZtlvxe3dpQ=";
  };

  nativeBuildInputs = [
  build-system = with python3Packages; [
    setuptools
  ];

  pythonRemoveDeps = [
@@ -28,18 +29,21 @@ python3.pkgs.buildPythonApplication rec {
    "swig"
  ];

  propagatedBuildInputs = with python3.pkgs; [
    setuptools
  dependencies = with python3Packages; [
    pyyaml
    pyusb
    pyserial
    crccheck
    six
    xmodem
    pyyaml
    libfdt
    tftpy
    crccheck
    # pylibfdt
    # swig
    packaging
  ];

  optional-dependencies = with python3Packages; {
    gui = [ kivy ];
  };

  postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
    rules="src/snagrecover/50-snagboot.rules"
    if [ ! -f "$rules" ]; then