depot/third_party/nixpkgs/pkgs/development/tools/analysis/smatch/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

39 lines
839 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, sqlite
, openssl
, buildllvmsparse ? false
, buildc2xml ? false
, libllvm
, libxml2
}:
stdenv.mkDerivation rec {
pname = "smatch";
version = "1.73";
src = fetchFromGitHub {
owner = "error27";
repo = "smatch";
rev = version;
sha256 = "sha256-Pv3bd2cjnQKnhH7TrkYWfDEeaq6u/q/iK1ZErzn6bME=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ sqlite openssl ]
++ lib.optionals buildllvmsparse [ libllvm ]
++ lib.optionals buildc2xml [ libxml2.dev ];
makeFlags = [ "PREFIX=${placeholder "out"}" "CXX=${stdenv.cc.targetPrefix}c++" ];
meta = with lib; {
description = "Semantic analysis tool for C";
homepage = "https://sparse.docs.kernel.org/";
maintainers = [ ];
license = licenses.gpl2Plus;
platforms = platforms.all;
};
}