python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / tools / analysis / codeql / default.nix
blob27f758f39b5abbdd1e93b8195bd2a96fc39dfb7d
1 { lib, stdenv, fetchzip, zlib, xorg, freetype, jdk11, curl }:
3 stdenv.mkDerivation rec {
4   pname = "codeql";
5   version = "2.11.0";
7   dontConfigure = true;
8   dontBuild = true;
9   dontStrip = true;
11   src = fetchzip {
12     url = "https://github.com/github/codeql-cli-binaries/releases/download/v${version}/codeql.zip";
13     sha256 = "sha256-nY31/coUnBNkKg10SOd64sBBkV44g+eIXyKIrPq1IWU=";
14   };
16   nativeBuildInputs = [
17     zlib
18     xorg.libX11
19     xorg.libXext
20     xorg.libXi
21     xorg.libXtst
22     xorg.libXrender
23     freetype
24     jdk11
25     stdenv.cc.cc.lib
26     curl
27   ];
29   installPhase = ''
30     # codeql directory should not be top-level, otherwise,
31     # it'll include /nix/store to resolve extractors.
32     mkdir -p $out/{codeql,bin}
33     cp -R * $out/codeql/
35     ln -sf $out/codeql/tools/linux64/lib64trace.so $out/codeql/tools/linux64/libtrace.so
37     sed -i 's%\$CODEQL_DIST/tools/\$CODEQL_PLATFORM/java%\${jdk11}%g' $out/codeql/codeql
39     ln -s $out/codeql/codeql $out/bin/
40   '';
42   meta = with lib; {
43     description = "Semantic code analysis engine";
44     homepage = "https://codeql.github.com";
45     maintainers = [ maintainers.dump_stack ];
46     platforms = lib.platforms.linux ++ lib.platforms.darwin;
47     license = licenses.unfree;
48   };