about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/universal-ctags/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/universal-ctags/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/misc/universal-ctags/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/universal-ctags/default.nix b/nixpkgs/pkgs/development/tools/misc/universal-ctags/default.nix
new file mode 100644
index 000000000000..47aa49178141
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/misc/universal-ctags/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, perl, pythonPackages, libiconv }:
+
+stdenv.mkDerivation {
+  pname = "universal-ctags";
+  version = "unstable-2019-07-30";
+
+  src = fetchFromGitHub {
+    owner = "universal-ctags";
+    repo = "ctags";
+    rev = "920e7910146915e5cae367bc9f135ffd8b042042";
+    sha256 = "14n3ix77rkhq6vq6kspmgjrmm0kg0f8cxikyqdq281sbnfq8bajn";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig pythonPackages.docutils ];
+  buildInputs = stdenv.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__);" ""
+  '';
+
+  postConfigure = ''
+    sed -i 's|/usr/bin/env perl|${perl}/bin/perl|' misc/optlib2c
+  '';
+
+  doCheck = true;
+
+  checkFlags = "units";
+
+  meta = with stdenv.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 ];
+  };
+}