git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #52988 from JohnAZoidberg/chipsec

chipsec: init at 1.3.7

commit0109c84f7107e2d392345568572778a2645a192a authorJoachim F <joachifm@users.noreply.github.com> dateMon 22 Apr 2019, 08:09 (8 years ago) parent9458ddb1636f11
2 files changed+50
pkgs/tools/security/chipsec/default.nix+40 pkgs/top-level/all-packages.nix+10
pkgs/tools/security/chipsec/default.nixnew file+40
@@ -0,0 +1,40 @@
1+{ stdenv, lib, fetchFromGitHub, python27Packages, nasm, libelf
2+, kernel ? null, withDriver ? false }:
3+python27Packages.buildPythonApplication rec {
4+ name = "chipsec-${version}";
5+ version = "1.3.7";
6+
7+ src = fetchFromGitHub {
8+ owner = "chipsec";
9+ repo = "chipsec";
10+ rev = version;
11+ sha256 = "00hwhi5f24y429zazhm77l1pp31q7fmx7ks3sfm6d16v89zbcp9a";
12+ };
13+
14+ nativeBuildInputs = [
15+ nasm libelf
16+ ];
17+
18+ setupPyBuildFlags = lib.optional (!withDriver) "--skip-driver";
19+
20+ checkPhase = "python setup.py build "
21+ + lib.optionalString (!withDriver) "--skip-driver "
22+ + "test";
23+
24+ KERNEL_SRC_DIR = lib.optionalString withDriver "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
25+
26+ meta = with stdenv.lib; {
27+ description = "Platform Security Assessment Framework";
28+ longDescription = ''
29+ CHIPSEC is a framework for analyzing the security of PC platforms
30+ including hardware, system firmware (BIOS/UEFI), and platform components.
31+ It includes a security test suite, tools for accessing various low level
32+ interfaces, and forensic capabilities. It can be run on Windows, Linux,
33+ Mac OS X and UEFI shell.
34+ '';
35+ license = licenses.gpl2;
36+ homepage = https://github.com/chipsec/chipsec;
37+ maintainers = with maintainers; [ johnazoidberg ];
38+ platforms = if withDriver then [ "x86_64-linux" ] else platforms.all;
39+ };
40+}
pkgs/top-level/all-packages.nix+10
@@ -683,6 +683,11 @@ in
683683
684684 chezmoi = callPackage ../tools/misc/chezmoi { };
685685
686+ chipsec = callPackage ../tools/security/chipsec {
687+ kernel = null;
688+ withDriver = false;
689+ };
690+
686691 clair = callPackage ../tools/admin/clair { };
687692
688693 cloud-sql-proxy = callPackage ../tools/misc/cloud-sql-proxy { };
@@ -15041,6 +15046,11 @@ in
1504115046
1504215047 blcr = callPackage ../os-specific/linux/blcr { };
1504315048
15049+ chipsec = callPackage ../tools/security/chipsec {
15050+ inherit kernel;
15051+ withDriver = true;
15052+ };
15053+
1504415054 cryptodev = callPackage ../os-specific/linux/cryptodev { };
1504515055
1504615056 cpupower = callPackage ../os-specific/linux/cpupower { };