lm-sensors: switch to fetchFromGitHub

+16 -7
+16 -7
pkgs/os-specific/linux/lm-sensors/default.nix
··· 1 - { lib, stdenv, fetchzip, bison, flex, which, perl 2 - , sensord ? false, rrdtool ? null 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , bison 5 + , flex 6 + , which 7 + , perl 8 + , sensord ? false 9 + , rrdtool ? null 3 10 }: 4 11 5 12 assert sensord -> rrdtool != null; ··· 7 14 stdenv.mkDerivation rec { 8 15 pname = "lm-sensors"; 9 16 version = "3.6.0"; 10 - dashedVersion = lib.replaceStrings ["."] ["-"] version; 17 + dashedVersion = lib.replaceStrings [ "." ] [ "-" ] version; 11 18 12 - src = fetchzip { 13 - url = "https://github.com/lm-sensors/lm-sensors/archive/V${dashedVersion}.tar.gz"; 14 - sha256 = "1ipf6wjx037sqyhy0r5jh4983h216anq9l68ckn2x5c3qc4wfmzn"; 19 + src = fetchFromGitHub { 20 + owner = "lm-sensors"; 21 + repo = "lm-sensors"; 22 + rev = "V${dashedVersion}"; 23 + hash = "sha256-9lfHCcODlS7sZMjQhK0yQcCBEoGyZOChx/oM0CU37sY="; 15 24 }; 16 25 17 26 nativeBuildInputs = [ bison flex which ]; 18 27 buildInputs = [ perl ] 19 - ++ lib.optional sensord rrdtool; 28 + ++ lib.optional sensord rrdtool; 20 29 21 30 makeFlags = [ 22 31 "PREFIX=${placeholder "out"}"