drupol / latex-letter

5 stars 0 forks source link

Full local template example not (no longer) working #1

Open f0rdprefect opened 4 days ago

f0rdprefect commented 4 days ago

Wonderful template and really easy to use by provided nix run example. However the full local example does not work.

Do

nix flake new --template github:drupol/latex-letter#default ./my-new-document
cd my-new-document/
nix build .#letter-scrlttr2

Get

warning: creating lock file '/home/matt/src/my-new-document/flake.lock'
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'pandoc-letter-scrlttr2'
         whose name attribute is located at /nix/store/9j895vklndff575s0rc8xhhvr0qcri2i-source/pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'buildPhase' of derivation 'pandoc-letter-scrlttr2'

         at /nix/store/mfqipbl371wircdqcva5clp7m274d0fx-source/flake.nix:81:9:

           80|
           81|         buildPhase = ''
             |         ^
           82|            runHook preBuild

       error: attribute 'pandoc-templates' missing

       at /nix/store/mfqipbl371wircdqcva5clp7m274d0fx-source/flake.nix:86:27:

           85|              --standalone \
           86|              --template=${pkgs.pandoc-templates}/share/pandoc/templates/letter.tex \
             |                           ^
           87|              -o letter.pdf \

Expect

Same pdf result as when using the nix run example command

drupol commented 4 days ago

Thanks for reporting this!

I've switched to Typst and I haven't used LaTeX since quite a while but I will try to check what's going on soon.

drupol commented 4 days ago

Can you try again?

f0rdprefect commented 4 days ago

Unfortunately no.

Something is really strange now.

it starts with

copying `/nix/store`

and after really a long time (20 minutes or so)

error:
       … while updating the lock file of flake 'path:/home/matt/src/my-new-document?lastModified=1726231063&narHash=sha256-RgEwp8CsgCwkOatzPG%2B6%2B1q7j1QEunGMOYnjRnPf7Y4%3D'

       … while updating the flake input 'latex-letter'

       error: getting status of '/nix/store/hf4xm7h1dghm3r2ry392biadcg9qsqy0-source/flake.nix': No such file or directory
drupol commented 4 days ago

Can you try again, I just fixed the issue.

f0rdprefect commented 4 days ago

Tried again. Works. Thanks alot!

-- But --

It takes quite long, even when running it the second time to evaluate. Then I wanted to compare it to the nix run example so I did a

nix run github:drupol/latex-letter#letter-scrlttr2 -- --output=letter.pdf --from=markdown letter.md

and got

error: flake 'github:drupol/latex-letter' does not provide attribute 'apps.x86_64-linux.letter-scrlttr2', 'packages.x86_64-linux.letter-scrlttr2', 'legacyPackages.x86_64-linux.letter-scrlttr2' or 'letter-scrlttr2'

sorry...

drupol commented 4 days ago

Indeed you're right, I forgot that... going to fix this now.