nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

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.28.78353.377";
     14 
     15   src = fetchurl {
     16     url = "https://cdn.pvs-studio.com/pvs-studio-${finalAttrs.version}-${suffix}.tgz";
     17     hash = {
     18       x86_64-linux = "sha256-XZFehz46Fkka5J2tYE66yxZhUzDYSwYhT6M9QnumFac=";
     19       x86_64-darwin = "sha256-S8Tb5g+Dod9OAsL1+sv2CNt1a+aF6WfCUV4YeOIYp1k=";
     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 })