summary refs log tree commit diff
path: root/pkgs/misc/source-and-tags
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2009-07-09 03:50:47 +0000
committerMarc Weber <marco-oweber@gmx.de>2009-07-09 03:50:47 +0000
commit6abf8471fb3130b08b953966260a261af8fa7cdd (patch)
tree52cd646635654d52fea4ca4011a8c07529992e34 /pkgs/misc/source-and-tags
parent4f81282226bb60bee158208ea7ac2fb5d398de17 (diff)
downloadnixpkgs-6abf8471fb3130b08b953966260a261af8fa7cdd.tar
nixpkgs-6abf8471fb3130b08b953966260a261af8fa7cdd.tar.gz
nixpkgs-6abf8471fb3130b08b953966260a261af8fa7cdd.tar.bz2
nixpkgs-6abf8471fb3130b08b953966260a261af8fa7cdd.tar.lz
nixpkgs-6abf8471fb3130b08b953966260a261af8fa7cdd.tar.xz
nixpkgs-6abf8471fb3130b08b953966260a261af8fa7cdd.tar.zst
nixpkgs-6abf8471fb3130b08b953966260a261af8fa7cdd.zip
fix sourceWithTagsDerivation, myhasktags now based on current haskell derivations
svn path=/nixpkgs/trunk/; revision=16263
Diffstat (limited to 'pkgs/misc/source-and-tags')
-rw-r--r--pkgs/misc/source-and-tags/default.nix33
1 files changed, 17 insertions, 16 deletions
diff --git a/pkgs/misc/source-and-tags/default.nix b/pkgs/misc/source-and-tags/default.nix
index d9b4717cb70..bd831d1fbc8 100644
--- a/pkgs/misc/source-and-tags/default.nix
+++ b/pkgs/misc/source-and-tags/default.nix
@@ -19,22 +19,23 @@ args: with args; {
     # using separate tag directory so that you don't have to glob that much files when starting your editor
     # is this a good choice?
     buildPhase =
-      lib.defineShList "sh_list_names" (lib.catAttrs "name" createTagFiles)
-    + lib.defineShList "sh_list_cmds" (lib.catAttrs "tagCmd" createTagFiles)
-    + "SRC_DEST=\$out/src/\$name
-      ensureDir \$SRC_DEST
-      cp -r \$srcDir \$SRC_DEST
-      cd \$SRC_DEST
-      for a in `seq 0 \${#sh_list}`; do
-          TAG_FILE=\"\$SRC_DEST/\"\${sh_list_names[$a]}$tagSuffix
-          cmd=\"\${sh_list_cmds[$a]}\"
-          echo running tag cmd \"$cmd\" in `pwd`
-          eval \"\$cmd\";
-          TAG_FILES=\"\$TAG_FILES\${TAG_FILES:+:}\$TAG_FILE\"
-       done
-       ensureDir $out/nix-support
-       echo \"TAG_FILES=\\\"\\\$TAG_FILES\\\${TAG_FILES:+:}$TAG_FILES\\\"\" >> $out/nix-support/setup-hook
-    ";
+      let createTags = lib.concatStringsSep "\n"
+          (map (a: ''
+            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"
+           '') createTagFiles );
+      in ''
+      SRC_DEST=$out/src/$name
+      ensureDir $SRC_DEST
+      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
+    '';
   };
   # example usage
   #testSourceWithTags = sourceWithTagsDerivation (ghc68extraLibs ghcsAndLibs.ghc68).happs_server_darcs.passthru.sourceWithTags;