about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/freeorion/fix-paths.xslt
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/games/freeorion/fix-paths.xslt')
-rw-r--r--nixpkgs/pkgs/games/freeorion/fix-paths.xslt13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/freeorion/fix-paths.xslt b/nixpkgs/pkgs/games/freeorion/fix-paths.xslt
new file mode 100644
index 000000000000..f0db646b81ad
--- /dev/null
+++ b/nixpkgs/pkgs/games/freeorion/fix-paths.xslt
@@ -0,0 +1,13 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="xml" omit-xml-declaration="no" indent="yes" />
+
+  <xsl:template match='node() | @*'>
+    <xsl:copy>
+      <xsl:apply-templates select='node() | @*'/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match='//text()[starts-with(., "@nixStore@")]'>
+    <xsl:value-of select='concat("@out@", substring-after(substring-after(., "@nixStore@"), "/"))'/>
+  </xsl:template>
+</xsl:stylesheet>