diff options
author | Evils <evils.devils@protonmail.com> | 2020-04-11 23:22:23 +0200 |
---|---|---|
committer | tomberek <tomberek@users.noreply.github.com> | 2021-10-30 22:22:12 -0400 |
commit | ea0e9dac2a8de2c6cd67507c41c8f915557eafc1 (patch) | |
tree | f218fb119923c5c1693d94014c8698ab05d66f4e /pkgs/os-specific/linux/error-inject | |
parent | 93f3805d8847b6fdfcc06022841c3274066df522 (diff) | |
download | nixpkgs-ea0e9dac2a8de2c6cd67507c41c8f915557eafc1.tar nixpkgs-ea0e9dac2a8de2c6cd67507c41c8f915557eafc1.tar.gz nixpkgs-ea0e9dac2a8de2c6cd67507c41c8f915557eafc1.tar.bz2 nixpkgs-ea0e9dac2a8de2c6cd67507c41c8f915557eafc1.tar.lz nixpkgs-ea0e9dac2a8de2c6cd67507c41c8f915557eafc1.tar.xz nixpkgs-ea0e9dac2a8de2c6cd67507c41c8f915557eafc1.tar.zst nixpkgs-ea0e9dac2a8de2c6cd67507c41c8f915557eafc1.zip |
error-inject: init mce, edac and aer
Diffstat (limited to 'pkgs/os-specific/linux/error-inject')
-rw-r--r-- | pkgs/os-specific/linux/error-inject/default.nix | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/error-inject/default.nix b/pkgs/os-specific/linux/error-inject/default.nix new file mode 100644 index 00000000000..87a40580deb --- /dev/null +++ b/pkgs/os-specific/linux/error-inject/default.nix @@ -0,0 +1,68 @@ +{ lib, stdenv, fetchgit +, bison, flex, rasdaemon +}: + +{ + edac-inject = rasdaemon.inject; + + mce-inject = stdenv.mkDerivation rec { + pname = "mce-inject"; + version = "4cbe46321b4a81365ff3aafafe63967264dbfec5"; + + src = fetchgit { + url = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git"; + rev = version; + sha256 = "0gjapg2hrlxp8ssrnhvc19i3r1xpcnql7xv0zjgbv09zyha08g6z"; + }; + + nativeBuildInputs = [ bison flex ]; + + makeFlags = [ "destdir=${placeholder "out"}" ]; + + postInstall = '' + mkdir $out/sbin + mv $out/usr/sbin/mce-inject $out/sbin/mce-inject + + mkdir $out/test + cp test/* $out/test/. + ''; + + meta = with lib; { + description = "MCE error injection tool"; + license = licenses.gpl2Only; + platforms = platforms.linux; + maintainers = [ maintainers.evils ]; + }; + }; + + aer-inject = stdenv.mkDerivation rec { + pname = "aer-inject"; + version = "9bd5e2c7886fca72f139cd8402488a2235957d41"; + + src = fetchgit { + url = "git://git.kernel.org/pub/scm/linux/kernel/git/gong.chen/aer-inject.git"; + rev = version; + sha256 = "0bh6mzpk2mr4xidkammmkfk21b4dbq793qjg25ryyxd1qv0c6cg4"; + }; + + nativeBuildInputs = [ bison flex ]; + + # how is this necessary? + makeFlags = [ "DESTDIR=${placeholder "out"}" ]; + + postInstall = '' + mkdir $out/bin + mv $out/usr/local/aer-inject $out/bin/aer-inject + + mkdir -p $out/examples + cp examples/* $out/examples/. + ''; + + meta = with lib; { + description = "PCIE AER error injection tool"; + license = licenses.gpl2Only; + platforms = platforms.linux; + maintainers = [ maintainers.evils ]; + }; + }; +} |