11 lines
300 B
Nix
11 lines
300 B
Nix
{ lib, pkgs, toXML, ... }:
|
|
|
|
name: content:
|
|
let preformatXML = pkgs.writeText "${name}-preformat.xml" (toXML content);
|
|
in pkgs.stdenv.mkDerivation {
|
|
name = "${name}.xml";
|
|
phases = [ "installPhase" ];
|
|
buildInputs = with pkgs; [ xmlformat ];
|
|
installPhase = "xmlformat ${preformatXML} > $out";
|
|
}
|