1{ stdenv, fetchFromGitHub, perl, makeWrapper
2, sysfsutils, dmidecode, kmod }:
3
4stdenv.mkDerivation {
5 name = "edac-utils-2015-01-07";
6
7 src = fetchFromGitHub {
8 owner = "grondo";
9 repo = "edac-utils";
10 rev = "f9aa96205f610de39a79ff43c7478b7ef02e3138";
11 sha256 = "1dmfqb15ffldl5zirbmwiqzpxbcc2ny9rpfvxcfvpmh5b69knvdg";
12 };
13
14 nativeBuildInputs = [ perl makeWrapper ];
15 buildInputs = [ sysfsutils ];
16
17 configureFlags = [
18 "--sysconfdir=/etc"
19 "--localstatedir=/var"
20 ];
21
22 installFlags = [
23 "sysconfdir=\${out}/etc"
24 ];
25
26 postInstall = ''
27 wrapProgram "$out/sbin/edac-ctl" \
28 --set PATH : "" \
29 --prefix PATH : "${dmidecode}/bin" \
30 --prefix PATH : "${kmod}/bin"
31 '';
32
33 meta = with stdenv.lib; {
34 homepage = http://github.com/grondo/edac-utils;
35 description = "Handles the reporting of hardware-related memory errors";
36 license = licenses.gpl2;
37 platforms = platforms.linux;
38 maintainers = with maintainers; [ wkennington ];
39 };
40}