summary refs log tree commit diff
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2017-07-27 06:34:10 -0400
committerGitHub <noreply@github.com>2017-07-27 06:34:10 -0400
commit107d931b4431927b569ba3281bab2aaa4516bc76 (patch)
tree081eeaf5440ca25ed688642c3c6fe5e6c42586db
parentfddd8869e65c1e316d20537e10dd579a338ed2b0 (diff)
parentf5c0607f8d566a5aa2cf74346348bcdb492637e4 (diff)
downloadnixpkgs-107d931b4431927b569ba3281bab2aaa4516bc76.tar
nixpkgs-107d931b4431927b569ba3281bab2aaa4516bc76.tar.gz
nixpkgs-107d931b4431927b569ba3281bab2aaa4516bc76.tar.bz2
nixpkgs-107d931b4431927b569ba3281bab2aaa4516bc76.tar.lz
nixpkgs-107d931b4431927b569ba3281bab2aaa4516bc76.tar.xz
nixpkgs-107d931b4431927b569ba3281bab2aaa4516bc76.tar.zst
nixpkgs-107d931b4431927b569ba3281bab2aaa4516bc76.zip
Merge pull request #27677 from peterhoeg/u/mcelog
mcelog: 148 -> 153
-rw-r--r--nixos/modules/hardware/mcelog.nix24
-rw-r--r--pkgs/os-specific/linux/mcelog/default.nix16
2 files changed, 22 insertions, 18 deletions
diff --git a/nixos/modules/hardware/mcelog.nix b/nixos/modules/hardware/mcelog.nix
index e4ac7d39053..13ad238870c 100644
--- a/nixos/modules/hardware/mcelog.nix
+++ b/nixos/modules/hardware/mcelog.nix
@@ -3,7 +3,7 @@
 with lib;
 
 {
-  meta.maintainers = [ maintainers.grahamc ];
+  meta.maintainers = with maintainers; [ grahamc ];
   options = {
 
     hardware.mcelog = {
@@ -19,19 +19,17 @@ with lib;
   };
 
   config = mkIf config.hardware.mcelog.enable {
-    systemd.services.mcelog = {
-      description = "Machine Check Exception Logging Daemon";
-      wantedBy = [ "multi-user.target" ];
-
-      serviceConfig = {
-        ExecStart = "${pkgs.mcelog}/bin/mcelog --daemon --foreground";
-        SuccessExitStatus = [ 0 15 ];
-
-        ProtectHome = true;
-        PrivateNetwork = true;
-        PrivateTmp = true;
+    systemd = {
+      packages = [ pkgs.mcelog ];
+
+      services.mcelog = {
+        wantedBy = [ "multi-user.target" ];
+        serviceConfig = {
+          ProtectHome = true;
+          PrivateNetwork = true;
+          PrivateTmp = true;
+        };
       };
     };
   };
-
 }
diff --git a/pkgs/os-specific/linux/mcelog/default.nix b/pkgs/os-specific/linux/mcelog/default.nix
index 64b937390f1..a7f5ffaae4a 100644
--- a/pkgs/os-specific/linux/mcelog/default.nix
+++ b/pkgs/os-specific/linux/mcelog/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "mcelog-${version}";
-  version = "148";
+  version = "153";
 
   src = fetchFromGitHub {
-    sha256 = "04mzscvr38r2q9da9wmv3cxb99vrkxks1mzgvwsxk753xan3p42c";
-    rev = "v${version}";
-    repo = "mcelog";
-    owner = "andikleen";
+    owner  = "andikleen";
+    repo   = "mcelog";
+    rev    = "v${version}";
+    sha256 = "1wz55dzqdiam511d6p1958al6vzlhrhs73s7gly0mzm6kpji0gxa";
   };
 
   postPatch = ''
@@ -28,6 +28,12 @@ stdenv.mkDerivation rec {
 
   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; {
     description = "Log x86 machine checks: memory, IO, and CPU hardware errors";
     longDescription = ''