about summary refs log tree commit diff
path: root/pkgs/profpatsch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/profpatsch')
-rw-r--r--pkgs/profpatsch/text-letter.nix11
-rw-r--r--pkgs/profpatsch/text-letter.rs8
2 files changed, 10 insertions, 9 deletions
diff --git a/pkgs/profpatsch/text-letter.nix b/pkgs/profpatsch/text-letter.nix
index f12f0ff2..987bc8dd 100644
--- a/pkgs/profpatsch/text-letter.nix
+++ b/pkgs/profpatsch/text-letter.nix
@@ -1,7 +1,9 @@
 { pkgs, rust-deps, writeRustSimple, writeExecline, getBins }:
 
 let
-  bins = getBins pkgs.coreutils [ "date" "cat" ];
+  bins = getBins pkgs.coreutils [ "date" "cat" ]
+      // getBins pkgs.paps [ "paps" ]
+      // getBins pkgs.ghostscript [ "ps2pdf" ];
 
   mustache-interpol = writeRustSimple "mustache-interpol" {
     dependencies = [
@@ -16,9 +18,16 @@ let
     mustache-interpol
   ];
 
+  text-letter-pdf = writeExecline "write-letter-pdf" {} [
+    "pipeline" [ text-letter ]
+    "pipeline" [ bins.paps "--encoding=utf8" ]
+    bins.ps2pdf "-"
+  ];
+
 in {
    inherit
      mustache-interpol
      text-letter
+     text-letter-pdf
      ;
 }
diff --git a/pkgs/profpatsch/text-letter.rs b/pkgs/profpatsch/text-letter.rs
index 55921adc..1ff3bdf8 100644
--- a/pkgs/profpatsch/text-letter.rs
+++ b/pkgs/profpatsch/text-letter.rs
@@ -83,10 +83,6 @@ fn main() {
 
 
 
-
-
-
-
 {{{from_address_one_line}}}
 
 {{{an}}}
@@ -96,10 +92,6 @@ fn main() {
 
 
 
-
-
-
-
 {{content}}
 "###
     ).expect("the template is malformed");