default.nix (1018B)
1 { 2 lib, 3 stdenv, 4 fetchurl, 5 }: 6 let 7 inherit (stdenv.hostPlatform) system; 8 throwSystem = throw "Unsupported system: ${system}"; 9 10 suffix = 11 { 12 x86_64-linux = "x86_64"; 13 x86_64-darwin = "macos-x86_64"; 14 } 15 .${system} or throwSystem; 16 in 17 stdenv.mkDerivation (finalAttrs: { 18 pname = "pvs-studio"; 19 version = "7.35.89253.317"; 20 21 src = fetchurl { 22 url = "https://cdn.pvs-studio.com/pvs-studio-${finalAttrs.version}-${suffix}.tgz"; 23 hash = 24 { 25 x86_64-linux = "sha256-pnrRriufaRPwZzAFKHRDFbyg1LEi9rUs31LwKdJj96M="; 26 x86_64-darwin = "sha256-HRJMF+ETqjDTXZx7qzX9mmdRiH9jHSL1RXBQA4CNkYE="; 27 } 28 .${system} or throwSystem; 29 }; 30 31 installPhase = "sh ./install.sh $out"; 32 33 meta = { 34 description = "Static code analyzer for C, C++"; 35 homepage = "https://www.viva64.com/en/pvs-studio/"; 36 license = lib.licenses.unfree; 37 maintainers = [ lib.maintainers.sikmir ]; 38 platforms = [ 39 "x86_64-linux" 40 "x86_64-darwin" 41 ]; 42 skip.ci = true; 43 }; 44 })