about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-10-12 23:12:15 +0200
committerGitHub <noreply@github.com>2021-10-12 23:12:15 +0200
commitfe4db7e66ebbd53ef8a44957f2b51a5884e5a8d8 (patch)
tree7dc502cc5afcfee350dbad8f26eb6f6fc8034898 /pkgs/os-specific
parentb18a7461690d13193a376725d8ac98a8131f72f9 (diff)
parente30966365a6ff9433cd0624c60557b632fd22957 (diff)
Merge pull request #140415 from arkivm/mce-inject
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/mceinject/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/mceinject/default.nix b/pkgs/os-specific/linux/mceinject/default.nix
new file mode 100644
index 0000000000000..3e89ed83361f9
--- /dev/null
+++ b/pkgs/os-specific/linux/mceinject/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub, bison, flex }:
+
+stdenv.mkDerivation rec {
+  pname = "mceinject";
+  version = "unstable-2013-01-19";
+
+  src = fetchFromGitHub {
+    owner  = "andikleen";
+    repo   = "mce-inject";
+    rev    = "4cbe46321b4a81365ff3aafafe63967264dbfec5";
+    sha256 = "0gjapg2hrlxp8ssrnhvc19i3r1xpcnql7xv0zjgbv09zyha08g6z";
+  };
+
+  nativeBuildInputs = [ flex bison ];
+
+  NIX_CFLAGS_COMPILE = "-Os -g -Wall";
+
+  NIX_LDFLAGS = [ "-lpthread" ];
+
+  makeFlags = [ "prefix=" ];
+
+  enableParallelBuilding = true;
+
+  installFlags = [ "destdir=$(out)" "manprefix=/share" ];
+
+  meta = with lib; {
+    description = "A tool to inject machine checks into x86 kernel for testing";
+    longDescription = ''
+      mce-inject allows to inject machine check errors on the software level
+      into a running Linux kernel. This is intended for validation of the
+      kernel machine check handler.
+    '';
+    homepage = "https://github.com/andikleen/mce-inject/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ arkivm ];
+    platforms = platforms.linux;
+  };
+}