2021-09-03 13:22:02 +01:00
|
|
|
{ lib, stdenv, fetchzip, zlib, xorg, freetype, jdk11, curl, autoPatchelfHook }:
|
2019-12-11 14:21:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "codeql";
|
2021-08-10 13:20:18 +01:00
|
|
|
version = "2.5.9";
|
2019-12-11 14:21:22 +00:00
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/github/codeql-cli-binaries/releases/download/v${version}/codeql.zip";
|
2021-08-10 13:20:18 +01:00
|
|
|
sha256 = "sha256-r3Jm+VYjn0Dz4BCSbADbgTWL1owbyIXlkoj6mOmZcZk=";
|
2019-12-11 14:21:22 +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
|
|
|
|
|
|
|
|
sed -i 's;"$CODEQL_DIST/tools/$CODEQL_PLATFORM/java/bin/java";"${jdk11}/bin/java";' $out/codeql/codeql
|
|
|
|
|
|
|
|
ln -s $out/codeql/codeql $out/bin/
|
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2019-12-11 14:21:22 +00:00
|
|
|
description = "Semantic code analysis engine";
|
2021-09-03 13:22:39 +01:00
|
|
|
homepage = "https://codeql.github.com";
|
2019-12-11 14:21:22 +00:00
|
|
|
maintainers = [ maintainers.dump_stack ];
|
|
|
|
license = licenses.unfree;
|
|
|
|
};
|
|
|
|
}
|