Merge pull request #185771 from arcz/semgrep

This commit is contained in:
Martin Weinelt 2022-08-11 11:56:47 +02:00 committed by GitHub
commit bdef9923bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,13 @@
{ lib, fetchFromGitHub, fetchzip }: { lib, fetchFromGitHub, fetchzip, stdenv }:
rec { rec {
version = "0.106.0"; version = "0.108.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "returntocorp"; owner = "returntocorp";
repo = "semgrep"; repo = "semgrep";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-/L8w8imvfjO3ICe0FBhfVrTivK58/9Y+j9Hc71tlpjA="; sha256 = "sha256-Vdrv7lVPsBsxkwwfviD5zRAdsD02RfWmM+IlaThduQs=";
}; };
# submodule dependencies # submodule dependencies
@ -24,15 +24,18 @@ rec {
interfacesSrc = fetchFromGitHub { interfacesSrc = fetchFromGitHub {
owner = "returntocorp"; owner = "returntocorp";
repo = "semgrep-interfaces"; repo = "semgrep-interfaces";
rev = "8bc79b2bca62c051e46a33fb65751357a71b87b6"; rev = "bad298d06a5dc50e69b6818ba73f0cc9b9a17b58";
sha256 = "sha256-k/rsTGYqHnw/4bsmeg7pQ/ckNglvuA0yhuz+OayXCdw="; sha256 = "sha256-AgNSvjVsP4b4zwkmq6BoNcOX3xdCSnQmXK+fVSkDXxQ=";
}; };
# fetch pre-built semgrep-core since the ocaml build is complex and relies on # fetch pre-built semgrep-core since the ocaml build is complex and relies on
# the opam package manager at some point # the opam package manager at some point
coreRelease = fetchzip { coreRelease = if stdenv.isDarwin then fetchzip {
url = "https://github.com/returntocorp/semgrep/releases/download/v${version}/semgrep-v${version}-ubuntu-16.04.tgz"; url = "https://github.com/returntocorp/semgrep/releases/download/v${version}/semgrep-v${version}-osx.zip";
sha256 = "sha256-ARf776uOJkCBGsJI8ul3IDWI24vFQxs2jlGEA6uXG+o="; sha256 = "sha256-f3ah4yGvtUL3Ievz+3hhh5Am1YMplRxsRQzdRAoF9uU=";
} else fetchzip {
url = "https://github.com/returntocorp/semgrep/releases/download/v${version}/semgrep-v${version}-ubuntu-16.04.tgz";
sha256 = "sha256-qie9svlzRoAsI33W+Sxh4YTVk1iPV0NVXfzfKlEUul4=";
}; };
meta = with lib; { meta = with lib; {
@ -50,6 +53,6 @@ rec {
license = licenses.lgpl21Plus; license = licenses.lgpl21Plus;
maintainers = with maintainers; [ jk ambroisie ]; maintainers = with maintainers; [ jk ambroisie ];
# limited by semgrep-core # limited by semgrep-core
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" "x86_64-darwin" ];
}; };
} }