Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-18.03 58 lines 1.7 kB view raw
1{ fetchurl, stdenv, ncurses 2, emacsSupport ? true, emacs 3}: 4 5stdenv.mkDerivation rec { 6 name = "cscope-15.8b"; 7 8 src = fetchurl { 9 url = "mirror://sourceforge/cscope/${name}.tar.gz"; 10 sha256 = "1byk29rcpyygrnr03h5j3y8j0aqxldd9dr5ihi9q982sy28x12a8"; 11 }; 12 13 configureFlags = "--with-ncurses=${ncurses.dev}"; 14 15 buildInputs = [ ncurses ]; 16 nativeBuildInputs = stdenv.lib.optional emacsSupport emacs; 17 18 postInstall = stdenv.lib.optionalString emacsSupport '' 19 cd "contrib/xcscope" 20 21 sed -i "cscope-indexer" \ 22 -"es|^PATH=.*$|PATH=\"$out/bin:\$PATH\"|g" 23 sed -i "xcscope.el" \ 24 -"es|\"cscope-indexer\"|\"$out/libexec/cscope/cscope-indexer\"|g"; 25 26 mkdir -p "$out/libexec/cscope" 27 cp "cscope-indexer" "$out/libexec/cscope" 28 29 mkdir -p "$out/share/emacs/site-lisp" 30 emacs --batch --eval '(byte-compile-file "xcscope.el")' 31 cp xcscope.el{,c} "$out/share/emacs/site-lisp" 32 ''; 33 34 crossAttrs = { 35 postInstall = ""; 36 propagatedBuildInputs = [ ncurses.crossDrv ]; 37 }; 38 39 meta = { 40 description = "A developer's tool for browsing source code"; 41 42 longDescription = '' 43 Cscope is a developer's tool for browsing source code. It has 44 an impeccable Unix pedigree, having been originally developed at 45 Bell Labs back in the days of the PDP-11. Cscope was part of 46 the official AT&T Unix distribution for many years, and has been 47 used to manage projects involving 20 million lines of code! 48 ''; 49 50 license = "BSD-style"; 51 52 homepage = http://cscope.sourceforge.net/; 53 54 maintainers = with stdenv.lib.maintainers; [viric]; 55 56 platforms = stdenv.lib.platforms.unix; 57 }; 58}