mbpfan: 1.9.1 -> 2.0.1

removed patch for lsmod/grep as they are no longer used (dgraziotin/mbpfan@5f2da79)

+2 -42
+2 -13
pkgs/os-specific/linux/mbpfan/default.nix
··· 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "mbpfan-${version}"; 5 - version = "1.9.1"; 5 + version = "2.0.1"; 6 6 src = fetchFromGitHub { 7 7 owner = "dgraziotin"; 8 8 repo = "mbpfan"; 9 9 rev = "v${version}"; 10 - sha256 = "0issn5233h2nclrmh2jzyy5y0dyyd57f1ia7gvs3bys95glcm2s5"; 10 + sha256 = "1iri1py9ym0zz7fcacbf0d9y3i3ay77jmajckchagamkfha16zyp"; 11 11 }; 12 - patches = [ 13 - ./fixes.patch 14 - (fetchpatch { # buffer overflow fix https://github.com/dgraziotin/mbpfan/issues/72 15 - url = https://github.com/dgraziotin/mbpfan/commit/f2736c8ab93cafffc25b86bcc6c33e6cbd537243.patch; 16 - sha256 = "10sldc69c91qk3hq0f6r3gxay38l2iw93nl85qh94mwpb8hy92yj"; }) 17 - ]; 18 - postPatch = '' 19 - substituteInPlace src/main.c \ 20 - --replace '@GREP@' '${gnugrep}/bin/grep' \ 21 - --replace '@LSMOD@' '${kmod}/bin/lsmod' 22 - ''; 23 12 installPhase = '' 24 13 mkdir -p $out/bin $out/etc 25 14 cp bin/mbpfan $out/bin
-29
pkgs/os-specific/linux/mbpfan/fixes.patch
··· 1 - diff --git a/src/main.c b/src/main.c 2 - index e8af708..6cfee17 100644 3 - --- a/src/main.c 4 - +++ b/src/main.c 5 - @@ -71,7 +71,7 @@ void check_requirements() 6 - * Check for coretemp and applesmc modules 7 - * Credits: -http://stackoverflow.com/questions/12978794 8 - */ 9 - - FILE *fd = popen("lsmod | grep coretemp", "r"); 10 - + FILE *fd = popen("@LSMOD@ | @GREP@ coretemp", "r"); 11 - char buf[16]; 12 - 13 - if (!(fread (buf, 1, sizeof (buf), fd) > 0)) { 14 - @@ -87,7 +87,7 @@ void check_requirements() 15 - 16 - pclose(fd); 17 - 18 - - fd = popen("lsmod | grep applesmc", "r"); 19 - + fd = popen("@LSMOD@ | @GREP@ applesmc", "r"); 20 - 21 - if (!(fread (buf, 1, sizeof (buf), fd) > 0)) { 22 - DIR* dir = opendir(APPLESMC_PATH); 23 - @@ -145,4 +145,4 @@ int main(int argc, char *argv[]) 24 - void (*fan_control)() = mbpfan; 25 - go_daemon(fan_control); 26 - exit(EXIT_SUCCESS); 27 - -} 28 - \ No newline at end of file 29 - +}