2021-01-23 12:26:19 +00:00
|
|
|
|
{ lib, stdenv, binutils , fetchurl, ncurses5 }:
|
2018-08-30 18:24:31 +01:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-06-13 05:00:00 +01:00
|
|
|
|
version = "0.0.30";
|
|
|
|
|
pname = "kythe";
|
2018-08-30 18:24:31 +01:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-06-13 05:00:00 +01:00
|
|
|
|
url = "https://github.com/kythe/kythe/releases/download/v${version}/${pname}-v${version}.tar.gz";
|
|
|
|
|
sha256 = "12bwhqkxfbkh3mm4wfvqflwhmbzpmlhlfykdpy6h7p9ih9ky8w6r";
|
2018-08-30 18:24:31 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
|
[ binutils ];
|
|
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
cd tools
|
|
|
|
|
for exe in http_server \
|
|
|
|
|
kythe read_entries triples verifier \
|
2018-11-21 15:23:29 +00:00
|
|
|
|
write_entries write_tables entrystream; do
|
2018-08-30 18:24:31 +01:00
|
|
|
|
echo "Patching:" $exe
|
|
|
|
|
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $exe
|
2021-01-23 12:26:19 +00:00
|
|
|
|
patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc ncurses5 ]}" $exe
|
2018-08-30 18:24:31 +01:00
|
|
|
|
done
|
|
|
|
|
cd ../
|
|
|
|
|
cp -R ./ $out
|
2018-11-21 15:23:29 +00:00
|
|
|
|
ln -s $out/tools $out/bin
|
2018-08-30 18:24:31 +01:00
|
|
|
|
'';
|
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
|
meta = with lib; {
|
2020-10-11 06:55:05 +01:00
|
|
|
|
description = "A pluggable, (mostly) language-agnostic ecosystem for building tools that work with code";
|
2018-08-30 18:24:31 +01:00
|
|
|
|
longDescription = ''
|
|
|
|
|
The Kythe project was founded to provide and support tools and standards
|
|
|
|
|
that encourage interoperability among programs that manipulate source
|
|
|
|
|
code. At a high level, the main goal of Kythe is to provide a standard,
|
|
|
|
|
language-agnostic interchange mechanism, allowing tools that operate on
|
|
|
|
|
source code — including build systems, compilers, interpreters, static
|
|
|
|
|
analyses, editors, code-review applications, and more — to share
|
|
|
|
|
information with each other smoothly. '';
|
2020-04-01 02:11:51 +01:00
|
|
|
|
homepage = "https://kythe.io/";
|
2018-08-30 18:24:31 +01:00
|
|
|
|
license = licenses.asl20;
|
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
maintainers = [ maintainers.mpickering ];
|
|
|
|
|
};
|
|
|
|
|
}
|