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