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