diff options
author | Marc Weber <marco-oweber@gmx.de> | 2009-12-11 13:58:15 +0000 |
---|---|---|
committer | Marc Weber <marco-oweber@gmx.de> | 2009-12-11 13:58:15 +0000 |
commit | f2ec65a53868d70a524bec01810718729b2425ba (patch) | |
tree | 34b4ff577739dff4f64617590b9e87d0b586fe63 /pkgs/misc/source-and-tags/default.nix | |
parent | e102a7173ec72b397fd8ce0a656dd3756d565508 (diff) |
fix source-and-tags
svn path=/nixpkgs/trunk/; revision=18892
Diffstat (limited to 'pkgs/misc/source-and-tags/default.nix')
-rw-r--r-- | pkgs/misc/source-and-tags/default.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/misc/source-and-tags/default.nix b/pkgs/misc/source-and-tags/default.nix index bd831d1fbc812..17bd4a3afe746 100644 --- a/pkgs/misc/source-and-tags/default.nix +++ b/pkgs/misc/source-and-tags/default.nix @@ -24,17 +24,18 @@ args: with args; { TAG_FILE="$SRC_DEST/${a.name}$tagSuffix" echo running tag cmd "${a.tagCmd}" in `pwd` ${a.tagCmd} - TAG_FILES="$TAG_FILES\''${TAG_FILES:+:}$TAG_FILE" + TAG_FILES="$TAG_FILES''${TAG_FILES:+:}$TAG_FILE" '') createTagFiles ); in '' SRC_DEST=$out/src/$name ensureDir $SRC_DEST + pwd; ls cp -r $srcDir $SRC_DEST cd $SRC_DEST ${createTags} ensureDir $out/nix-support - echo "TAG_FILES=\"\$TAG_FILES\\''${TAG_FILES:+:}$TAG_FILES\"" >> $out/nix-support/setup-hook + echo "TAG_FILES=\"\$TAG_FILES\''${TAG_FILES:+:}$TAG_FILES\"" >> $out/nix-support/setup-hook ''; }; # example usage @@ -51,7 +52,14 @@ args: with args; { createTagFiles = [ { name = "${deriv.name}_haskell"; # tagCmd = "${toString ghcsAndLibs.ghc68.ghc}/bin/hasktags --ignore-close-implementation --ctags `find . -type f -name \"*.*hs\"`; sort tags > \$TAG_FILE"; } - tagCmd = "${toString hasktags}/bin/hasktags-modified --ignore-close-implementation --ctags `find . -type f -name \"*.*hs\"`; sort tags > \$TAG_FILE"; } + # *.*hs.* to catch gtk2hs .hs.pp files + tagCmd = " + srcs=\"`find . -type f -name \"*.*hs\"; find . -type f -name \"*.*hs.*\";`\" + [ -z \"$srcs\" ] || { + ${toString hasktags}/bin/hasktags-modified --ignore-close-implementation --ctags $srcs + sort tags > \$TAG_FILE + }"; + } ]; }; }; |