Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at master 77 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchzip, 5 bison, 6 flex, 7 rasdaemon, 8}: 9 10{ 11 edac-inject = rasdaemon.inject; 12 13 mce-inject = stdenv.mkDerivation rec { 14 pname = "mce-inject"; 15 version = "4cbe46321b4a81365ff3aafafe63967264dbfec5"; 16 17 src = fetchzip { 18 url = "https://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git/snapshot/mce-inject-${version}.tar.gz"; 19 sha256 = "0gjapg2hrlxp8ssrnhvc19i3r1xpcnql7xv0zjgbv09zyha08g6z"; 20 }; 21 22 nativeBuildInputs = [ 23 bison 24 flex 25 ]; 26 27 makeFlags = [ "destdir=${placeholder "out"}" ]; 28 29 postInstall = '' 30 mkdir $out/sbin 31 mv $out/usr/sbin/mce-inject $out/sbin/mce-inject 32 33 mkdir $out/test 34 cp test/* $out/test/. 35 ''; 36 37 meta = with lib; { 38 description = "MCE error injection tool"; 39 license = licenses.gpl2Only; 40 platforms = platforms.linux; 41 maintainers = [ ]; 42 }; 43 }; 44 45 aer-inject = stdenv.mkDerivation rec { 46 pname = "aer-inject"; 47 version = "9bd5e2c7886fca72f139cd8402488a2235957d41"; 48 49 src = fetchzip { 50 url = "https://git.kernel.org/pub/scm/linux/kernel/git/gong.chen/aer-inject.git/snapshot/aer-inject-${version}.tar.gz"; 51 sha256 = "0bh6mzpk2mr4xidkammmkfk21b4dbq793qjg25ryyxd1qv0c6cg4"; 52 }; 53 54 nativeBuildInputs = [ 55 bison 56 flex 57 ]; 58 59 # how is this necessary? 60 makeFlags = [ "DESTDIR=${placeholder "out"}" ]; 61 62 postInstall = '' 63 mkdir $out/bin 64 mv $out/usr/local/aer-inject $out/bin/aer-inject 65 66 mkdir -p $out/examples 67 cp examples/* $out/examples/. 68 ''; 69 70 meta = with lib; { 71 description = "PCIE AER error injection tool"; 72 license = licenses.gpl2Only; 73 platforms = platforms.linux; 74 maintainers = [ ]; 75 }; 76 }; 77}