source-and-tags: fix default.nix

Tested by observing that the following command produces a correctly
looking TAGS file:

$ nix-shell -E 'let pkgs = import ./. {}; in pkgs.myEnvFun {name = "myEnvFun-htags-test"; buildInputs = [(pkgs.sourceAndTags.sourceWithTagsDerivation (pkgs.sourceAndTags.addHasktagsTaggingInfo pkgs.haskellPackages.scientific).passthru.sourceWithTags)];}' --run 'cat $TAG_FILES'
This commit is contained in:
Bas van Dijk 2018-04-24 23:12:40 +02:00
parent 78d9bffc0a
commit 40bb3374e9

View File

@ -1,4 +1,4 @@
args: with args; { { stdenv, lib, glibcLocales, unzip, hasktags, ctags } : {
# optional srcDir # optional srcDir
annotatedWithSourceAndTagInfo = x : (x ? passthru && x.passthru ? sourceWithTags annotatedWithSourceAndTagInfo = x : (x ? passthru && x.passthru ? sourceWithTags
|| x ? meta && x.meta ? sourceWithTags ); || x ? meta && x.meta ? sourceWithTags );
@ -59,8 +59,8 @@ args: with args; {
# without this creating tag files for lifted-base fails # without this creating tag files for lifted-base fails
export LC_ALL=en_US.UTF-8 export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8 export LANG=en_US.UTF-8
${if args.stdenv.isLinux then "export LOCALE_ARCHIVE=${args.pkgs.glibcLocales}/lib/locale/locale-archive;" else ""} ${if stdenv.isLinux then "export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive;" else ""}
${toString hasktags}/bin/hasktags --ignore-close-implementation --ctags . ${toString hasktags}/bin/hasktags --ignore-close-implementation --ctags .
mv tags \$TAG_FILE mv tags \$TAG_FILE
}"; }";