2023-07-15 17:15:38 +00:00
|
|
|
{ lib }:
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
rec {
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.74.0";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
srcHash = "sha256-PH0fTT6n6o3Jtuq+cyyRb048Tuv3VGNduCZCEKTXMrE=";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
# submodule dependencies
|
|
|
|
# these are fetched so we:
|
|
|
|
# 1. don't fetch the many submodules we don't need
|
|
|
|
# 2. avoid fetchSubmodules since it's prone to impurities
|
2022-12-17 10:02:37 +00:00
|
|
|
submodules = {
|
2023-07-15 17:15:38 +00:00
|
|
|
"cli/src/semgrep/semgrep_interfaces" = {
|
2024-02-29 20:09:43 +00:00
|
|
|
owner = "semgrep";
|
2022-12-17 10:02:37 +00:00
|
|
|
repo = "semgrep-interfaces";
|
2024-06-05 15:53:02 +00:00
|
|
|
rev = "9f38254957c50c68ea402eebae0f7aa40dd01cbf";
|
|
|
|
hash = "sha256-/P8b7nSwNZSrm7dUFkehDaGz+r+bofrlFfuIo4U7tJM=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# fetch pre-built semgrep-core since the ocaml build is complex and relies on
|
|
|
|
# the opam package manager at some point
|
2023-07-15 17:15:38 +00:00
|
|
|
# pulling it out of the python wheel as r2c no longer release a built binary
|
|
|
|
# on github releases
|
|
|
|
core = {
|
|
|
|
x86_64-linux = {
|
|
|
|
platform = "any";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-ZA5KlbSLkC0IJGqyK0XhuDKRx53987vf53vSM0zwD9k=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
aarch64-linux = {
|
|
|
|
platform = "musllinux_1_0_aarch64.manylinux2014_aarch64";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-aHq87uzk9TtnlMDfAS6492ocXRJSHdBinng0hu2xLas=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
x86_64-darwin = {
|
|
|
|
platform = "macosx_10_14_x86_64";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-OorDXQ0oYHV8aPu9o1dQAd22u78/EjpUWA2yPYG0S9E=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
aarch64-darwin = {
|
|
|
|
platform = "macosx_11_0_arm64";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-g8sFLh2V9NDIvAZOaDhMpFxKqbS/S1eKep4v1vlOOo8=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://semgrep.dev/";
|
2024-02-29 20:09:43 +00:00
|
|
|
downloadPage = "https://github.com/semgrep/semgrep/";
|
|
|
|
changelog = "https://github.com/semgrep/semgrep/blob/v${version}/CHANGELOG.md";
|
2022-07-18 16:21:45 +00:00
|
|
|
description = "Lightweight static analysis for many languages";
|
|
|
|
longDescription = ''
|
|
|
|
Semgrep is a fast, open-source, static analysis tool for finding bugs and
|
|
|
|
enforcing code standards at editor, commit, and CI time. Semgrep analyzes
|
|
|
|
code locally on your computer or in your build environment: code is never
|
|
|
|
uploaded. Its rules look like the code you already write; no abstract
|
|
|
|
syntax trees, regex wrestling, or painful DSLs.
|
|
|
|
'';
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ jk ambroisie ];
|
|
|
|
};
|
|
|
|
}
|