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