about summary refs log tree commit diff
path: root/pkgs/profpatsch/text-letter.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-05-18 19:38:38 +0200
committerProfpatsch <mail@profpatsch.de>2021-05-18 19:39:11 +0200
commit4c9515ceb43f90700d1e376233a6c44ce8a15f11 (patch)
tree991d731494707aef251e79bf6794d41a5498ef6d /pkgs/profpatsch/text-letter.nix
parent35d235889532a57325a7f3ef2f5bcbdf41184167 (diff)
pkgs/profpatsch: init text-letter
A simple text letter formatter (A4) for printing.
Diffstat (limited to 'pkgs/profpatsch/text-letter.nix')
-rw-r--r--pkgs/profpatsch/text-letter.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/profpatsch/text-letter.nix b/pkgs/profpatsch/text-letter.nix
new file mode 100644
index 00000000..d9ee9ef5
--- /dev/null
+++ b/pkgs/profpatsch/text-letter.nix
@@ -0,0 +1,25 @@
+{ pkgs, rust-deps, writeRustSimple, writeExecline, getBins }:
+
+let
+  bins = getBins pkgs.coreutils [ "date" "cat" ];
+
+  mustache-interpol = writeRustSimple "mustache-interpol" {
+    dependencies = [
+      rust-deps.mustache
+      rust-deps.toml
+      rust-deps.regex
+      rust-deps.lazy_static
+    ];
+  } (./text-letter.rs);
+
+  text-letter = writeExecline "write-letter" {} [
+    "pipeline" [ bins.cat "/home/philip/kot/work/pa/krankenkasse/2021-05-18-tk-anschreiben-assurance-maladie.toml" ]
+    mustache-interpol
+  ];
+
+in {
+   inherit
+     mustache-interpol
+     text-letter
+     ;
+}