summary refs log tree commit diff
path: root/pkgs/development/tools/misc/universal-ctags
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:33 +0000
committerAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:57 +0000
commit9ff36293d1e428cd7bf03e8d4b03611b6d361c28 (patch)
tree1ab51a42b868c55b83f6ccdb80371b9888739dd9 /pkgs/development/tools/misc/universal-ctags
parent1c4fcd0d4b0541e674ee56ace1053e23e562cc80 (diff)
parentddc3c396a51918043bb0faa6f676abd9562be62c (diff)
downloadnixpkgs-archive.tar
nixpkgs-archive.tar.gz
nixpkgs-archive.tar.bz2
nixpkgs-archive.tar.lz
nixpkgs-archive.tar.xz
nixpkgs-archive.tar.zst
nixpkgs-archive.zip
Last good Nixpkgs for Weston+nouveau? archive
I came this commit hash to terwiz[m] on IRC, who is trying to figure out
what the last version of Spectrum that worked on their NUC with Nvidia
graphics is.
Diffstat (limited to 'pkgs/development/tools/misc/universal-ctags')
-rw-r--r--pkgs/development/tools/misc/universal-ctags/default.nix54
-rw-r--r--pkgs/development/tools/misc/universal-ctags/sed-test.patch12
2 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/universal-ctags/default.nix b/pkgs/development/tools/misc/universal-ctags/default.nix
new file mode 100644
index 00000000000..51ea6302743
--- /dev/null
+++ b/pkgs/development/tools/misc/universal-ctags/default.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, buildPackages, fetchFromGitHub, autoreconfHook, coreutils, pkg-config, perl, python3Packages, libiconv, jansson }:
+
+stdenv.mkDerivation rec {
+  pname = "universal-ctags";
+  version = "5.9.20220220.0";
+
+  src = fetchFromGitHub {
+    owner = "universal-ctags";
+    repo = "ctags";
+    rev = "p${version}";
+    sha256 = "1118iq33snxyw1jk8nwvsl08f3zdainksh0yiapzvg0y5906jjjd";
+  };
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ autoreconfHook coreutils pkg-config python3Packages.docutils ];
+  buildInputs = [ jansson ] ++ lib.optional stdenv.isDarwin libiconv;
+
+  # to generate makefile.in
+  autoreconfPhase = ''
+    ./autogen.sh
+  '';
+
+  configureFlags = [ "--enable-tmpdir=/tmp" ];
+
+  postPatch = ''
+    # Remove source of non-determinism
+    substituteInPlace main/options.c \
+      --replace "printf (\"  Compiled: %s, %s\n\", __DATE__, __TIME__);" ""
+
+    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
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A maintained ctags implementation";
+    homepage = "https://ctags.io/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    # universal-ctags is preferred over emacs's ctags
+    priority = 1;
+    maintainers = [ maintainers.mimame ];
+  };
+}
diff --git a/pkgs/development/tools/misc/universal-ctags/sed-test.patch b/pkgs/development/tools/misc/universal-ctags/sed-test.patch
new file mode 100644
index 00000000000..7c44d699d79
--- /dev/null
+++ b/pkgs/development/tools/misc/universal-ctags/sed-test.patch
@@ -0,0 +1,12 @@
+--- 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()
+