nur-packages

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

default.nix (1011B)


      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";
     14     }
     15     .${system} or throwSystem;
     16 in
     17 stdenv.mkDerivation (finalAttrs: {
     18   pname = "pvs-studio";
     19   version = "7.30.81094.390";
     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-lUmNWB3dckCKV7EFZDPGZJseqfXksYtRwCXuIE3Jt64=";
     26         x86_64-darwin = "sha256-4ws+3ya+vvRWJwZw7sfygIe7d/h80ynoe2EMeCBdtks=";
     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 })