2021-02-05 17:12:51 +00:00
|
|
|
{ fetchurl, lib, stdenv, libtool, makeWrapper
|
2021-04-05 15:23:46 +00:00
|
|
|
, coreutils, ctags, ncurses, python3Packages, sqlite, universal-ctags
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
let
|
|
|
|
pygments = python3Packages.pygments;
|
|
|
|
in stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "global";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "6.6.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/global/${pname}-${version}.tar.gz";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-LdHmqUXpPAE5D7lBpOaU9McbvXVp1kFJwE6Se79NzOg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ libtool makeWrapper ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [ ncurses sqlite ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
propagatedBuildInputs = [ pygments ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-ltdl-include=${libtool}/include"
|
|
|
|
"--with-ltdl-lib=${libtool.lib}/lib"
|
2023-07-15 17:15:38 +00:00
|
|
|
"--with-ncurses=${ncurses}"
|
|
|
|
"--with-sqlite3"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--with-exuberant-ctags=${ctags}/bin/ctags"
|
|
|
|
"--with-universal-ctags=${universal-ctags}/bin/ctags"
|
|
|
|
"--with-posix-sort=${coreutils}/bin/sort"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/share/emacs/site-lisp"
|
|
|
|
cp -v *.el "$out/share/emacs/site-lisp"
|
|
|
|
|
|
|
|
wrapProgram $out/bin/gtags \
|
2021-04-05 15:23:46 +00:00
|
|
|
--prefix PYTHONPATH : "$(toPythonPath ${pygments})"
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapProgram $out/bin/global \
|
2021-04-05 15:23:46 +00:00
|
|
|
--prefix PYTHONPATH : "$(toPythonPath ${pygments})"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Source code tag system";
|
|
|
|
longDescription = ''
|
|
|
|
GNU GLOBAL is a source code tagging system that works the same way
|
|
|
|
across diverse environments (Emacs, vi, less, Bash, web browser, etc).
|
|
|
|
You can locate specified objects in source files and move there easily.
|
|
|
|
It is useful for hacking a large project containing many
|
|
|
|
subdirectories, many #ifdef and many main() functions. It is similar
|
|
|
|
to ctags or etags but is different from them at the point of
|
|
|
|
independence of any editor. It runs on a UNIX (POSIX) compatible
|
|
|
|
operating system like GNU and BSD.
|
|
|
|
'';
|
|
|
|
homepage = "https://www.gnu.org/software/global/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ pSub peterhoeg ];
|
|
|
|
platforms = platforms.unix;
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://cvs.savannah.gnu.org/viewvc/global/global/NEWS?view=markup&pathrev=VERSION-${lib.replaceStrings [ "." ] [ "_" ] version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|