diff options
author | AndersonTorres <torres.anderson.85@protonmail.com> | 2022-11-06 11:55:56 -0300 |
---|---|---|
committer | AndersonTorres <torres.anderson.85@protonmail.com> | 2022-11-06 13:40:52 -0300 |
commit | c5385d8717adca5a4fac6b62341dcbb807750119 (patch) | |
tree | 6a0e457135df22b259f388ee499df2a9a1ad97e6 | |
parent | f804318543bece66b7d0cd55163c19ac8a83dcb0 (diff) | |
download | nixpkgs-c5385d8717adca5a4fac6b62341dcbb807750119.tar nixpkgs-c5385d8717adca5a4fac6b62341dcbb807750119.tar.gz nixpkgs-c5385d8717adca5a4fac6b62341dcbb807750119.tar.bz2 nixpkgs-c5385d8717adca5a4fac6b62341dcbb807750119.tar.lz nixpkgs-c5385d8717adca5a4fac6b62341dcbb807750119.tar.xz nixpkgs-c5385d8717adca5a4fac6b62341dcbb807750119.tar.zst nixpkgs-c5385d8717adca5a4fac6b62341dcbb807750119.zip |
universal-ctags: 5.9.20220814.0 -> 5.9.20221106.0
3 files changed, 71 insertions, 41 deletions
diff --git a/pkgs/development/tools/misc/universal-ctags/000-nixos-specific.patch b/pkgs/development/tools/misc/universal-ctags/000-nixos-specific.patch new file mode 100644 index 00000000000..8445b36b204 --- /dev/null +++ b/pkgs/development/tools/misc/universal-ctags/000-nixos-specific.patch @@ -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 (); diff --git a/pkgs/development/tools/misc/universal-ctags/default.nix b/pkgs/development/tools/misc/universal-ctags/default.nix index f91b5e8b967..362c1cbcb9d 100644 --- a/pkgs/development/tools/misc/universal-ctags/default.nix +++ b/pkgs/development/tools/misc/universal-ctags/default.nix @@ -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 }; -} +}) diff --git a/pkgs/development/tools/misc/universal-ctags/sed-test.patch b/pkgs/development/tools/misc/universal-ctags/sed-test.patch deleted file mode 100644 index 7c44d699d79..00000000000 --- a/pkgs/development/tools/misc/universal-ctags/sed-test.patch +++ /dev/null @@ -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() - |