mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-26 23:20:18 +02:00
commit
107d931b44
|
@ -3,7 +3,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
meta.maintainers = [ maintainers.grahamc ];
|
meta.maintainers = with maintainers; [ grahamc ];
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
hardware.mcelog = {
|
hardware.mcelog = {
|
||||||
|
@ -19,19 +19,17 @@ with lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.hardware.mcelog.enable {
|
config = mkIf config.hardware.mcelog.enable {
|
||||||
systemd.services.mcelog = {
|
systemd = {
|
||||||
description = "Machine Check Exception Logging Daemon";
|
packages = [ pkgs.mcelog ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
|
|
||||||
serviceConfig = {
|
services.mcelog = {
|
||||||
ExecStart = "${pkgs.mcelog}/bin/mcelog --daemon --foreground";
|
wantedBy = [ "multi-user.target" ];
|
||||||
SuccessExitStatus = [ 0 15 ];
|
serviceConfig = {
|
||||||
|
ProtectHome = true;
|
||||||
ProtectHome = true;
|
PrivateNetwork = true;
|
||||||
PrivateNetwork = true;
|
PrivateTmp = true;
|
||||||
PrivateTmp = true;
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "mcelog-${version}";
|
name = "mcelog-${version}";
|
||||||
version = "148";
|
version = "153";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
sha256 = "04mzscvr38r2q9da9wmv3cxb99vrkxks1mzgvwsxk753xan3p42c";
|
owner = "andikleen";
|
||||||
rev = "v${version}";
|
repo = "mcelog";
|
||||||
repo = "mcelog";
|
rev = "v${version}";
|
||||||
owner = "andikleen";
|
sha256 = "1wz55dzqdiam511d6p1958al6vzlhrhs73s7gly0mzm6kpji0gxa";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -28,6 +28,12 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
installFlags = [ "DESTDIR=$(out)" "prefix=" "DOCDIR=/share/doc" ];
|
installFlags = [ "DESTDIR=$(out)" "prefix=" "DOCDIR=/share/doc" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/lib/systemd/system
|
||||||
|
substitute mcelog.service $out/lib/systemd/system/mcelog.service \
|
||||||
|
--replace /usr/sbin $out/bin
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Log x86 machine checks: memory, IO, and CPU hardware errors";
|
description = "Log x86 machine checks: memory, IO, and CPU hardware errors";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
|
Loading…
Reference in a new issue