diff options
author | Mikhail Klementev <blame@dumpstack.io> | 2019-12-11 14:21:22 +0000 |
---|---|---|
committer | Lassulus <github@lassul.us> | 2019-12-31 16:29:20 +0100 |
commit | dad53fa08b3830179d68503760759c6a5fb45754 (patch) | |
tree | 462f53e050251cead582509b59ea84f2cadb6fb5 /pkgs | |
parent | a45447a3d5f79416438db78093e7b205ba5628dd (diff) |
codeql: init at 2.0.0
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/tools/analysis/codeql/default.nix | 61 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/development/tools/analysis/codeql/default.nix b/pkgs/development/tools/analysis/codeql/default.nix new file mode 100644 index 000000000000..e5770800199a --- /dev/null +++ b/pkgs/development/tools/analysis/codeql/default.nix @@ -0,0 +1,61 @@ +{ stdenv +, fetchzip +, zlib +, xorg +, freetype +, alsaLib +, jdk11 +, curl +, lttng-ust +, autoPatchelfHook +}: + +stdenv.mkDerivation rec { + pname = "codeql"; + version = "2.0.0"; + + dontConfigure = true; + dontBuild = true; + dontStrip = true; + + src = fetchzip { + url = "https://github.com/github/codeql-cli-binaries/releases/download/v${version}/codeql.zip"; + sha256 = "1v6wzjdhfws77fr5r15s03f1ipzc1gh7sl8gvw1fb4pplpa2d08s"; + }; + + nativeBuildInputs = [ + zlib + xorg.libX11 + xorg.libXext + xorg.libXi + xorg.libXtst + xorg.libXrender + freetype + alsaLib + jdk11 + stdenv.cc.cc.lib + curl + lttng-ust + autoPatchelfHook + ]; + + 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/ + ''; + + meta = with stdenv.lib; { + description = "Semantic code analysis engine"; + homepage = "https://semmle.com/codeql"; + maintainers = [ maintainers.dump_stack ]; + license = licenses.unfree; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fb46c31c7f06..48587be70b57 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -813,6 +813,8 @@ in cloudflare-wrangler = callPackage ../development/tools/cloudflare-wrangler { }; + codeql = callPackage ../development/tools/analysis/codeql { }; + container-linux-config-transpiler = callPackage ../development/tools/container-linux-config-transpiler { }; ccextractor = callPackage ../applications/video/ccextractor { }; |