Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
83 lines
2.0 KiB
Nix
83 lines
2.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchzip,
|
|
|
|
installShellFiles,
|
|
makeWrapper,
|
|
perl,
|
|
strace,
|
|
|
|
testers,
|
|
pvs-studio,
|
|
}:
|
|
|
|
# nixpkgs-update: no auto update
|
|
stdenv.mkDerivation rec {
|
|
pname = "pvs-studio";
|
|
version = "7.36.91321.455";
|
|
|
|
src =
|
|
let
|
|
system = stdenv.hostPlatform.system;
|
|
selectSystem = attrs: attrs.${system} or (throw "Unsupported system: ${system}");
|
|
in
|
|
fetchzip {
|
|
url = selectSystem {
|
|
aarch64-darwin = "https://web.archive.org/web/20250411093324/https://files.pvs-studio.com/pvs-studio-${version}-macos-arm64.tgz";
|
|
x86_64-darwin = "https://web.archive.org/web/20250411092440/https://files.pvs-studio.com/pvs-studio-${version}-macos-x86_64.tgz";
|
|
x86_64-linux = "https://web.archive.org/web/20250411091929/https://files.pvs-studio.com/pvs-studio-${version}-x86_64.tgz";
|
|
};
|
|
hash = selectSystem {
|
|
aarch64-darwin = "sha256-KEDKsWXg+CRwsEi7hNKlC3CWldBtvf9Jw79vuLMKSOE=";
|
|
x86_64-darwin = "sha256-Esf+pohienMAkWs1q5fYZ+0RzzK/WxOGljRXYJ0AtFI=";
|
|
x86_64-linux = "sha256-Be4IGFA+307zuMnhXBZko6T27TYeBZHX/zxaXBWVPHo=";
|
|
};
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
makeWrapper
|
|
];
|
|
|
|
nativeRuntimeInputs = lib.makeBinPath (
|
|
[
|
|
perl
|
|
]
|
|
++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform strace) [
|
|
strace
|
|
]
|
|
);
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -D -m 0755 bin/* -t $out/bin
|
|
installShellCompletion --bash etc/bash_completion.d/*
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
postFixup = ''
|
|
wrapProgram "$out/bin/pvs-studio-analyzer" \
|
|
--prefix PATH ":" ${nativeRuntimeInputs}
|
|
'';
|
|
|
|
passthru = {
|
|
tests.version = testers.testVersion { package = pvs-studio; };
|
|
};
|
|
|
|
meta = {
|
|
description = "Static analyzer for C and C++";
|
|
homepage = "https://pvs-studio.com/en/pvs-studio";
|
|
license = lib.licenses.unfreeRedistributable;
|
|
platforms = [
|
|
"aarch64-darwin"
|
|
"x86_64-darwin"
|
|
"x86_64-linux"
|
|
];
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
maintainers = [ ];
|
|
};
|
|
}
|