From 68056e3333b764d761ef6e62ebe8d1d00d6cfcec Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 28 Mar 2021 23:57:16 +0200 Subject: chipsec: 1.5.1 -> 1.5.10 --- pkgs/tools/security/chipsec/default.nix | 37 +++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'pkgs/tools/security/chipsec') diff --git a/pkgs/tools/security/chipsec/default.nix b/pkgs/tools/security/chipsec/default.nix index 7e00c0b07cf7..7497fe4bb9af 100644 --- a/pkgs/tools/security/chipsec/default.nix +++ b/pkgs/tools/security/chipsec/default.nix @@ -1,29 +1,40 @@ -{ stdenv, lib, fetchFromGitHub, python2Packages, nasm, libelf -, kernel ? null, withDriver ? false }: -python2Packages.buildPythonApplication rec { +{ lib +, stdenv +, fetchFromGitHub +, kernel ? null +, libelf +, nasm +, python3 +, withDriver ? false +}: + +python3.pkgs.buildPythonApplication rec { pname = "chipsec"; - version = "1.5.1"; + version = "1.5.10"; + disabled = !stdenv.isLinux; src = fetchFromGitHub { owner = "chipsec"; repo = "chipsec"; rev = version; - sha256 = "1rxr9i08a22m15slvlkrhnki30jixi2ds096kmmc2nqzfr9yibmb"; + sha256 = "sha256-3ZFLBn0HtQo4/6pFNPinA9hHnkbW/Y1AxXgwzrAvNMk="; }; - disabled = !stdenv.isLinux; + KERNEL_SRC_DIR = lib.optionalString withDriver "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; nativeBuildInputs = [ - nasm libelf + libelf + nasm ]; - setupPyBuildFlags = lib.optional (!withDriver) "--skip-driver"; + checkInputs = [ + python3.pkgs.distro + python3.pkgs.pytestCheckHook + ]; - checkPhase = "python setup.py build " - + lib.optionalString (!withDriver) "--skip-driver " - + "test"; + setupPyBuildFlags = lib.optional (!withDriver) "--skip-driver"; - KERNEL_SRC_DIR = lib.optionalString withDriver "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; + pythonImportsCheck = [ "chipsec" ]; meta = with lib; { description = "Platform Security Assessment Framework"; @@ -34,7 +45,7 @@ python2Packages.buildPythonApplication rec { interfaces, and forensic capabilities. It can be run on Windows, Linux, Mac OS X and UEFI shell. ''; - license = licenses.gpl2; + license = licenses.gpl2Only; homepage = "https://github.com/chipsec/chipsec"; maintainers = with maintainers; [ johnazoidberg ]; platforms = if withDriver then [ "x86_64-linux" ] else platforms.all; -- cgit v1.2.3