From ace1af62097fa8dd1d2bf4a83215cec0095c24a9 Mon Sep 17 00:00:00 2001 From: niten Date: Sat, 23 Mar 2024 11:24:18 -0700 Subject: [PATCH] Switched to files... --- to-xml.nix | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/to-xml.nix b/to-xml.nix index eb3fa46..57792d3 100644 --- a/to-xml.nix +++ b/to-xml.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: with lib; let @@ -18,16 +18,4 @@ let body = concatStringsSep "" (map renderElement children); in renderTag tag attrs body; - toXMLFile = 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"; - }; - - toFormattedXML = content: - let xmlFile = toXMLFile "formatted-xml" content; - in readFile xmlFile; in { inherit toXML toXMLFile toFormattedXML; }