lol

Adding cbrowser. Have cscope on the path to use it (which you should already have, because otherwise how would you have created the database for cbrowser?)

svn path=/nixpkgs/trunk/; revision=29831

+85
+49
pkgs/development/tools/misc/cbrowser/backslashes-quotes.diff
··· 1 + Based on this: 2 + http://sourceforge.net/tracker/?func=detail&aid=1493886&group_id=5152&atid=305152 3 + fix the infinite loops in quote highlight - ID: 1493886 4 + 5 + --- cbrowser-0.8-2/ftcllib.tcl 2000-07-04 01:17:43.000000000 +0200 6 + +++ cbrowser-0.8/ftcllib.tcl 2006-05-24 00:39:18.833762522 +0200 7 + @@ -1290,13 +1290,39 @@ 8 + foreach {start end} [concat 1.0 [$widget tag ranges comment] end] { 9 + 10 + while {[set temp [$widget search -regexp -- $pattern $start $end]] != ""} { 11 + + set startquote [$widget index "$temp + 1chars"] 12 + 13 + - set endquote [$widget search -regexp -- {[^\\]\"} "$temp + 1chars" $end] 14 + + set temp [$widget index "$startquote + 1chars"] 15 + + while {1==1} { 16 + + set endquote [$widget search -regexp -- {\"} $temp $end] 17 + + 18 + + # The program will not break if a /*C comment*/ is between C quotes. 19 + + if { $endquote == "" } { 20 + + set endquote $startquote 21 + + break 22 + + } 23 + + 24 + + # look for double backslashes 25 + + if {[set temp2 [$widget search -regexp -- {\\\\} $temp $endquote]] != ""} { 26 + + set temp "$temp2 + 2chars" 27 + + continue 28 + + } 29 + + 30 + + # look for \" 31 + + if {[set temp2 [$widget search -regexp -- {\\\"} $temp $endquote]] != ""} { 32 + + set temp "$temp2 + 2chars" 33 + + continue 34 + + } 35 + + 36 + + break 37 + + } 38 + 39 + if {[strlen $endquote] > 0} { 40 + - set start [$widget index "$endquote + 2chars"] 41 + + set start [$widget index "$endquote + 1chars"] 42 + 43 + - $widget tag add quote "$temp + 1chars" $start 44 + + $widget tag add quote $startquote $start 45 + + } else { 46 + + set start [$widget index "$start + 1chars"] 47 + } 48 + } 49 + }
+34
pkgs/development/tools/misc/cbrowser/default.nix
··· 1 + { fetchurl, stdenv, cscope, tk, makeWrapper }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "cbrowser-0.8"; 5 + 6 + src = fetchurl { 7 + url = "mirror://sourceforge/cbrowser/cbrowser-0.8.tar.gz"; 8 + sha256 = "1050mirjab23qsnq3lp3a9vwcbavmh9kznzjm7dr5vkx8b7ffcji"; 9 + }; 10 + 11 + patches = [ ./backslashes-quotes.diff ]; 12 + 13 + buildInputs = [ tk makeWrapper ]; 14 + 15 + installPhase = '' 16 + ensureDir $out/bin $out/share/${name} 17 + cp -R * $out/share/${name}/ 18 + 19 + makeWrapper $out/share/${name}/cbrowser $out/bin/cbrowser \ 20 + --prefix PATH : ${tk}/bin 21 + ''; 22 + 23 + meta = { 24 + description = "Tcl/Tk GUI front-end to cscope"; 25 + 26 + license = "GPLv2+"; 27 + 28 + homepage = http://sourceforge.net/projects/cbrowser/; 29 + 30 + maintainers = with stdenv.lib.maintainers; [viric]; 31 + 32 + platforms = with stdenv.lib.platforms; linux; 33 + }; 34 + }
+2
pkgs/top-level/all-packages.nix
··· 2764 2764 2765 2765 byacc = callPackage ../development/tools/parsing/byacc { }; 2766 2766 2767 + cbrowser = callPackage ../development/tools/misc/cbrowser { }; 2768 + 2767 2769 ccache = callPackage ../development/tools/misc/ccache { }; 2768 2770 2769 2771 complexity = callPackage ../development/tools/misc/complexity { };