nixpkgs/pkgs/os-specific/linux/mceinject/default.nix
Artturin f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00

39 lines
1.1 KiB
Nix

{ 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 ];
env.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;
};
}