Comments (20)
Sure, I can give it a try and add it to my to-do list! 👍🏻
Yeah, it's really convenient, but as soon as I have some free time, I'll attempt to set this up locally.
Do you have any recommendations for the setup? I was thinking about using WSL2 to run everything as it works with that too according to the NIX documentation.
Also, if I encounter any problems or complications during the installation, may I open a pull request with some additional to-dos?
May you assign this issue to me so I have it on my list? :)
from dnd-5e-latex-character-sheet-template.
I had it working on overleaf a couple of years ago, but for whatever reason it doesn't seem to work any more.
It's certainly possible to get it up and running there, but I've never really been able to keep it in sync, as £17/month for the git integration feels a bit much, so I have no way of testing that it currently works.
There has been a lot of work put into the Nix build system by @soispha, and it's really quite painless to run locally now, once you have Nix installed, or if you fork the repository and allow GitHub actions to run, there is an action which will build the latex files for you result.zip at the bottom here will show an example.
from dnd-5e-latex-character-sheet-template.
Oh okay I understand. I get the problem with the sync, £17/month is a lot.
I will try either Nix or GitHub actions, thank you very much for the fast and helpful answer! :)
from dnd-5e-latex-character-sheet-template.
Let me know how it goes. It would be great to have some feedback/a more genuine set up guide.
Also this is quite a complex document and compilation on overleaf was very slow, so it’s never really real-time, but I do get the allure of just being able to edit on a webpage.
from dnd-5e-latex-character-sheet-template.
I use WSL when I'm on a windows machine, and it's very good, but is obviously a huge hurdle for most people.
I just use the standard Ubuntu image then install Nix with the script on their site.
Feel free to ask for more help/raise issues as they come up etc.
from dnd-5e-latex-character-sheet-template.
Alright gotcha! Thanks, then I will try to install it in my WSL (I have some experience with it)
I will come back to that offer thanks!
from dnd-5e-latex-character-sheet-template.
Sorry for the long pause, I kinda get stuck when executing nix build --experimental-features 'nix-command flakes'
I keep getting the following error in my WSL:
warning: Ignoring setting 'auto-allocate-uids' because experimental feature 'auto-allocate-uids' is not enabled
warning: Ignoring setting 'impure-env' because experimental feature 'configurable-impure-env' is not enabled
error: builder for '/nix/store/fz8zpd6ipc807w1yrn1xn86ibyczkw4l-characters-example_2-dnd-char-sheet-1.0.drv' failed with exit code 127;
last 5 log lines:
> Running phase: unpackPhase
> unpacking source archive /nix/store/r3mc3ja4w4j9v1w3q3jazlw9krp0dcdz-gg9xin9f2wk7w6412jprabawzn9rysa0-source
> source root is gg9xin9f2wk7w6412jprabawzn9rysa0-source
> Running phase: patchPhase
> /nix/store/bknngadwym46j65qs14ic2w79rpav888-stdenv-linux/setup: line 1582: $'\r': command not found
For full logs, run 'nix log /nix/store/fz8zpd6ipc807w1yrn1xn86ibyczkw4l-characters-example_2-dnd-char-sheet-1.0.drv'.
error: 1 dependencies of derivation '/nix/store/z5bkfa5j2xvlb56y57llsp3vidjvbj4r-characters-all.drv' failed to build
Could be a stupid question but I don't really know what to do as I am fairly new with custom LateX stuff and never used NIX too.
Can anyone help me with this?
Using Ubuntu 22.04
from dnd-5e-latex-character-sheet-template.
Can you run the log command and paste the output please
nix log /nix/store/fz8zpd6ipc807w1yrn1xn86ibyczkw4l-characters-example_2-dnd-char-sheet-1.0.drv
Also can you confirm this also happens when running make build
from dnd-5e-latex-character-sheet-template.
Thanks for the quick reply!
Log output:
nix log /nix/store/fz8zpd6ipc807w1yrn1xn86ibyczkw4l-characters-example_2-dnd-char-sheet-1.0.drv --experimental-features 'nix-command flakes'
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/fz8zpd6ipc807w1yrn1xn86ibyczkw4l-characters-example_2-dnd-char-sheet-1.0.drv^*'
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/r3mc3ja4w4j9v1w3q3jazlw9krp0dcdz-gg9xin9f2wk7w6412jprabawzn9rysa0-source
source root is gg9xin9f2wk7w6412jprabawzn9rysa0-source
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
/nix/store/bknngadwym46j65qs14ic2w79rpav888-stdenv-linux/setup: line 1582: $'\r': command not found
When running make build
I get the following:
error: builder for '/nix/store/fz8zpd6ipc807w1yrn1xn86ibyczkw4l-characters-example_2-dnd-char-sheet-1.0.drv' failed with exit code 127;
last 5 log lines:
> Running phase: unpackPhase
> unpacking source archive /nix/store/r3mc3ja4w4j9v1w3q3jazlw9krp0dcdz-gg9xin9f2wk7w6412jprabawzn9rysa0-source
> source root is gg9xin9f2wk7w6412jprabawzn9rysa0-source
> Running phase: patchPhase
> /nix/store/bknngadwym46j65qs14ic2w79rpav888-stdenv-linux/setup: line 1582: $'\r': command not found
For full logs, run 'nix log /nix/store/fz8zpd6ipc807w1yrn1xn86ibyczkw4l-characters-example_2-dnd-char-sheet-1.0.drv'.
error: 1 dependencies of derivation '/nix/store/z5bkfa5j2xvlb56y57llsp3vidjvbj4r-characters-all.drv' failed to build
make: *** [Makefile:6: build] Error 1
from dnd-5e-latex-character-sheet-template.
So the same as with make build
and the other way, so at least that's consistent.
May I ask how you cloned the repo? in WSL or windows based git client? I haven't seen this issue before, but I wonder if it's something to do with the encoding of linux vs. mac
from dnd-5e-latex-character-sheet-template.
I'm not really sure neither. I will try a complete clean install of nix, followed by git cloning the repo and then trying it again 👍🏻
from dnd-5e-latex-character-sheet-template.
from dnd-5e-latex-character-sheet-template.
Alright so I completely deleted the existing project, uninstalled nix via sudo rm -rf /nix/
inside WSL, and then reinstalled it as described on their page with sh <(curl -L https://nixos.org/nix/install) --no-daemon
for single user installation.
Then I cloned my fork via https://github.com/PalmaAnd/DND-5e-LaTeX-Character-Sheet-Template.git
and now after I cd into the project and run make I get the following error again:
nix --extra-experimental-features nix-command --extra-experimental-features flakes build
error: builder for '/nix/store/fz8zpd6ipc807w1yrn1xn86ibyczkw4l-characters-example_2-dnd-char-sheet-1.0.drv' failed with exit code 127;
last 5 log lines:
> Running phase: unpackPhase
> unpacking source archive /nix/store/r3mc3ja4w4j9v1w3q3jazlw9krp0dcdz-gg9xin9f2wk7w6412jprabawzn9rysa0-source
> source root is gg9xin9f2wk7w6412jprabawzn9rysa0-source
> Running phase: patchPhase
> /nix/store/bknngadwym46j65qs14ic2w79rpav888-stdenv-linux/setup: line 1582: $'\r': command not found
For full logs, run 'nix log /nix/store/fz8zpd6ipc807w1yrn1xn86ibyczkw4l-characters-example_2-dnd-char-sheet-1.0.drv'.
error: 1 dependencies of derivation '/nix/store/z5bkfa5j2xvlb56y57llsp3vidjvbj4r-characters-all.drv' failed to build
make: *** [Makefile:6: build] Error 1
When running nix log /nix/store/fz8zpd6ipc807w1yrn1xn86ibyczkw4l-characters-example_2-dnd-char-sheet-1.0.drv --extra-experimental-features nix-command
I get the same log as before...
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/fz8zpd6ipc807w1yrn1xn86ibyczkw4l-characters-example_2-dnd-char-sheet-1.0.drv^*'
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/r3mc3ja4w4j9v1w3q3jazlw9krp0dcdz-gg9xin9f2wk7w6412jprabawzn9rysa0-source
source root is gg9xin9f2wk7w6412jprabawzn9rysa0-source
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
/nix/store/bknngadwym46j65qs14ic2w79rpav888-stdenv-linux/setup: line 1582: $'\r': command not found
I can't find anything, maybe it is some small configuration I made at some point in time in WSL?
Sorry for the spam and these long logs and all that 😅
Ohh I think I found it... looks like a issue with bash and the \r
command. I will look into it further and send an update ASAP
from dnd-5e-latex-character-sheet-template.
Ohh I think I found it... looks like a issue with bash and the \r command.
This seems really weird to me (as your fork builds fine for me). Would you like to show me the line from the setup script that fails (in your example line 1582)?
from dnd-5e-latex-character-sheet-template.
from dnd-5e-latex-character-sheet-template.
Sure, this is the code snippet:
if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then return; fi
if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then return; fi
if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then return; fi
if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then return; fi
if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then return; fi
if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then return; fi
if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then return; fi
if [[ -n $NIX_LOG_FD ]]; then
echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" >&"$NIX_LOG_FD"
fi
showPhaseHeader "$curPhase"
dumpVars
local startTime=$(date +"%s")
# Evaluate the variable named $curPhase if it exists, otherwise the
# function named $curPhase.
eval "${!curPhase:-$curPhase}"
local endTime=$(date +"%s")
showPhaseFooter "$curPhase" "$startTime" "$endTime"
if [ "$curPhase" = unpackPhase ]; then
# make sure we can cd into the directory
[ -n "${sourceRoot:-}" ] && chmod +x "${sourceRoot}"
cd "${sourceRoot:-.}"
fi
The eval "${!curPhase:-$curPhase}"
is the problem here
Thank you both very much for all the time and help 😅
from dnd-5e-latex-character-sheet-template.
Could it be that the $curPhase
variable contains a \n\r
line ending? Because that could mean that bash tries to evaluate the command after the \n
, which being a \r
doesn't work.
But the flake.nix
file does not contain any carriage returns on my local checkout of your fork, and you haven't changed it locally, have you?
from dnd-5e-latex-character-sheet-template.
Okay, sorry for the long pause dos2unix ./*
fixed the problem, or at least I got into the building phase I finally was able to execute the following without an error:
nix --extra-experimental-features nix-command --extra-experimental-features flakes build
warning: Git tree '/home/andre/projects/DND-5e-LaTeX-Character-Sheet-Template' is dirty
[1/1/3 built, 0.0 MiB DL] building characters-unnamed-dnd-char-sheet-1.0 (buildPhase): unnamed.xdv -> unnamed.pdf
I will post an update soon, just got a lot to do with university atm sorry
from dnd-5e-latex-character-sheet-template.
from dnd-5e-latex-character-sheet-template.
Also, that shouldn’t be an issue, you should have files at results/
nix just likes you to have your changes committed when you run.
from dnd-5e-latex-character-sheet-template.
Related Issues (19)
- The font path problem HOT 3
- Multiple character sheets merges weapon list HOT 7
- cant compile character sheet at all. HOT 1
- Document compiles but all the text is at the bottom left of the page HOT 7
- Nix Flake HOT 5
- Project usability tasks
- Dependency Dashboard
- Lock file maintenance
- Run workflow weekly
- Single and Multi-file example characters
- Github action to compare compiled examples with known good versions HOT 1
- Unsafe options in latexmkrc HOT 1
- Multilingual support and generating empty sheets? HOT 2
- Half caster sheet
- Half caster spell sheet HOT 11
- Better LaTeX linting
- Make target to build all characters
- Text issues when compiling locally HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dnd-5e-latex-character-sheet-template.