aboutsummaryrefslogtreecommitdiff
path: root/modules/pkgs/writeXML.nix
blob: 1cfc075952e572a64cafbb98ac16e095569760cd (plain)
1
2
3
4
5
6
7
8
9
10
11
{ writeText, runCommand, libxml2 }:

name: text:
  let
    f = writeText "${name}.raw" text;
  in
  runCommand name { } ''
    ${libxml2}/bin/xmllint \
      --format --noblanks --nocdata ${f} \
        > $out
  ''