Merge pull request #199858 from atorres1985-contrib/universal-ctags
universal-ctags: 5.9.20220814.0 -> 5.9.20221106.0
This commit is contained in:
commit
d03f231365
@ -0,0 +1,14 @@
|
||||
This small Nix-specific patch removes a source of impurity from source code,
|
||||
namely the date and time of compilation.
|
||||
|
||||
diff -Naur uctags-old/main/options.c uctags-new/main/options.c
|
||||
--- uctags-old/main/options.c 1969-12-31 21:00:01.000000000 -0300
|
||||
+++ uctags-new/main/options.c 2022-11-06 11:43:00.028550121 -0300
|
||||
@@ -1609,7 +1609,6 @@
|
||||
printf ("Universal Ctags is derived from Exuberant Ctags.\n");
|
||||
printf ("Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert\n");
|
||||
|
||||
- printf (" Compiled: %s, %s\n", __DATE__, __TIME__);
|
||||
printf (" URL: %s\n", PROGRAM_URL);
|
||||
|
||||
printFeatureList ();
|
@ -1,55 +1,83 @@
|
||||
{ lib, stdenv, buildPackages, fetchFromGitHub, autoreconfHook, coreutils, pkg-config, perl, python3Packages, libiconv, jansson }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, autoreconfHook
|
||||
, buildPackages
|
||||
, coreutils
|
||||
, fetchFromGitHub
|
||||
, jansson
|
||||
, libiconv
|
||||
, perl
|
||||
, pkg-config
|
||||
, python3
|
||||
, libseccomp
|
||||
, libyaml
|
||||
, pcre2
|
||||
, libxml2
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "universal-ctags";
|
||||
version = "5.9.20220814.0";
|
||||
version = "5.9.20221106.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "universal-ctags";
|
||||
repo = "ctags";
|
||||
rev = "p${version}";
|
||||
sha256 = "sha256-U1PjmBb99v7N+Dd7n2r1Xx09yflf0OxRlb4f1Sg0UvI=";
|
||||
rev = "p${finalAttrs.version}";
|
||||
hash = "sha256-6piWdofvlX+ysXmRPnQc7PlZuHSyVqdVxOztY2+Pcss=";
|
||||
};
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config python3Packages.docutils ];
|
||||
buildInputs = [ jansson ] ++ lib.optional stdenv.isDarwin libiconv;
|
||||
depsBuildBuild = [
|
||||
buildPackages.stdenv.cc
|
||||
];
|
||||
|
||||
# to generate makefile.in
|
||||
autoreconfPhase = ''
|
||||
./autogen.sh
|
||||
'';
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
perl
|
||||
pkg-config
|
||||
(python3.withPackages (p: [ p.docutils ]))
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libseccomp
|
||||
libyaml
|
||||
pcre2
|
||||
libxml2
|
||||
jansson
|
||||
]
|
||||
++ lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
configureFlags = [ "--enable-tmpdir=/tmp" ];
|
||||
|
||||
postPatch = ''
|
||||
# Remove source of non-determinism
|
||||
substituteInPlace main/options.c \
|
||||
--replace "printf (\" Compiled: %s, %s\n\", __DATE__, __TIME__);" ""
|
||||
patches = [
|
||||
./000-nixos-specific.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Tmain/utils.sh \
|
||||
--replace /bin/echo ${coreutils}/bin/echo
|
||||
|
||||
# Remove git-related housekeeping from check phase
|
||||
substituteInPlace makefiles/testing.mak \
|
||||
--replace "check: tmain units tlib man-test check-genfile" \
|
||||
"check: tmain units tlib man-test"
|
||||
'';
|
||||
|
||||
postConfigure = ''
|
||||
sed -i 's|/usr/bin/env perl|${perl}/bin/perl|' misc/optlib2c
|
||||
patchShebangs misc/*
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkFlags = [
|
||||
"man-test" "tlib" "tmain" "tutil" "units"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://docs.ctags.io/en/latest/";
|
||||
description = "A maintained ctags implementation";
|
||||
homepage = "https://ctags.io/";
|
||||
longDescription = ''
|
||||
Universal Ctags (abbreviated as u-ctags) is a maintained implementation of
|
||||
ctags. ctags generates an index (or tag) file of language objects found in
|
||||
source files for programming languages. This index makes it easy for text
|
||||
editors and other tools to locate the indexed items.
|
||||
'';
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = [ maintainers.AndersonTorres ];
|
||||
platforms = platforms.unix;
|
||||
# universal-ctags is preferred over emacs's ctags
|
||||
priority = 1;
|
||||
mainProgram = "ctags";
|
||||
maintainers = [ maintainers.mimame ];
|
||||
priority = 1; # over the emacs implementation
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- a/Tmain/sorted-help-message.d/run.sh 2017-01-10 11:20:51.515093465 +0100
|
||||
+++ b/Tmain/sorted-help-message.d/run.sh 2017-01-10 11:17:56.639213720 +0100
|
||||
@@ -27,7 +27,7 @@
|
||||
extract_long_options()
|
||||
{
|
||||
sed -n '/Usage:/,$p' | \
|
||||
- sed -n 's/\(^ --[:alnum:][<>[:alnum:]_-]*\).*/\1/p'
|
||||
+ sed -n 's/\(^ --[[:alnum:]][<>[:alnum:]_-]*\).*/\1/p'
|
||||
}
|
||||
|
||||
extract_debug_options()
|
||||
|
Loading…
Reference in New Issue
Block a user