2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchzip, zlib, xorg, freetype, jdk11, curl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "codeql";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "2.11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/github/codeql-cli-binaries/releases/download/v${version}/codeql.zip";
|
2022-09-30 11:47:45 +00:00
|
|
|
sha256 = "sha256-nY31/coUnBNkKg10SOd64sBBkV44g+eIXyKIrPq1IWU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
zlib
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXtst
|
|
|
|
xorg.libXrender
|
|
|
|
freetype
|
|
|
|
jdk11
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
curl
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# codeql directory should not be top-level, otherwise,
|
|
|
|
# it'll include /nix/store to resolve extractors.
|
|
|
|
mkdir -p $out/{codeql,bin}
|
|
|
|
cp -R * $out/codeql/
|
|
|
|
|
|
|
|
ln -sf $out/codeql/tools/linux64/lib64trace.so $out/codeql/tools/linux64/libtrace.so
|
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
sed -i 's%\$CODEQL_DIST/tools/\$CODEQL_PLATFORM/java%\${jdk11}%g' $out/codeql/codeql
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
ln -s $out/codeql/codeql $out/bin/
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Semantic code analysis engine";
|
2021-10-08 15:17:17 +00:00
|
|
|
homepage = "https://codeql.github.com";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.dump_stack ];
|
2022-04-27 09:35:20 +00:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
};
|
|
|
|
}
|