New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pplatex- tex error pretty printer #60666
Conversation
Tested and currently using on my local computer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! I have added some comments to improve the expression (notably you are not allowed to import nixpkgs within nixpkgs), I hope this will help.
@@ -0,0 +1,40 @@ | |||
with | |||
import <nixpkgs> {} | |||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of these three lines, use:
{ cmake, stdenv, pkgconfig, pcre, texlive, fetchFromGitHub }:
And then add a line for you package in pkgs/top-level/all-packages.nix
like:
pplatex = callPackage ../tools/typesetting/tex/pplatex {};
To test you package, run nix-build /path/to/nixpkgs/clone -A pplatex
.
buildInputs = | ||
[ | ||
pkgs.cmake | ||
pkgs.gnumake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make already part of stdenv
pkgs.gnumake | ||
pkgs.pkgconfig | ||
pkgs.pcre | ||
pkgs.texlive.combined.scheme-small |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the pkgs.
prefix of all buildInputs.
|
||
buildInputs = | ||
[ | ||
pkgs.cmake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake and pkgconfig should be nativeBuildInputs
instead of buildInputs
.
''; | ||
homepage = https://github.com/stefanhepp/pplatex; | ||
license = stdenv.lib.licenses.gpl3Plus; | ||
maintainers = [ stdenv.lib.maintainers.srgom ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you would need to add an entry into maintainers/maintainers-list.nix
to put yourself as a maintainer
Thank you for your kind pointers- they will be useful in future packages, I want to do things the right way. |
@SRGOM, are you planning on leaving this for someone else to finish? The software looks interesting |
@alexarice You guys have been kind to give me pointers but I am very new to nix and cannot afford to spend any more time on this. I plan on come back to it at a later date but wouldn't mind if somebody else finished this. |
@SRGOM you can have a look at some changes here teto@6a58278 |
To my untrained eye, the changes seem to be exactly what I did (thus I can say it would compile) + resolution of all(?) the comments on this PR. So I think good to go. |
On second thoughts, you actually do need some sort of tex dependency. I think I may have tried using the minimal scheme too but that didn't work. If you have actually compiled this on your machine then great but if you haven't then please consider putting back the tex dependency |
@teto I don't want to sound impolite but the wording of your comment got me wondering- are you suggesting that I copy your changes and add to this PR? While I would be fine doing so, I'm more than 100% open to you or anybody else taking over this PR or just creating a new PR from the perfect code that you've already written. |
I was voluntarily vague as I prefer to encourage new contributors but if you have no interest then it's fine to leave it to others. The thing is I already have many open PRs, it gets hard for me to keep track of all of them so I prefer to complete some of these first before adding another one. Bottomline is I may open my PR but I can't give an estimate so if you are in a hurry, you can just cherry-pick the change. Latex is not needed, just pcre is listed in dependencies and the program worked fine without it. |
No hurry at all, since you've done all the hard work already. To some my style may seem lousy but I feel that as a new contributor if I an do the initial hard part, then it doesn't take anyone long to do final fixups. What's a quick git checkout plus a few ctrl-r (to invoke history) for experienced people is hours of work for me at this stage. Thank you, I will close this PR and let you take it forward. |
I disagree, the approach you mention doesn't scale. True some steps might be faster for seasoned developers/maintainers but even if they are 10 times faster, if everyone discharges the work on these people then work adds up.
depends but most of the time the final fixups take longer than the initial part I would say, otherwise we wouldn't have > 1000 PRs waiting for merge. It's easy to get something going but the devil is in the details as they say. |
You're obviously right about devil being in the details. It's the last 10% that takes 90% of time in most cases. And since you've been here much longer than I am, probably right about the not-scaling part too. But the alternative for me would have been not submitting the PR. I'm just trying to thank and give back in whichever way I can, whatever little I can. |
Continued here: #73461 |
Tested and currently using on my local computer
Sorry for the sloppy pull request but I'm very new to Nix and I cannot justify spending too much time to get everything working perfectly. I feel like I've spent good time getting the initial work done and any expert can bring this up to standard in minutes. That said, I'm sure you guys are busy too so please feel free to reject.
Motivation for this change
Sick of terrible TeX errors, pplatex pretty prints them and makes them (actually) readable.
Things done
Tested on my own machine by doing an (import .....) inside configuration.nix.
Tested using sandboxing (nix.useSandbox on NixOS, or option
sandbox
innix.conf
on non-NixOS)Built on platform(s)
Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
Tested compilation of all pkgs that depend on this change using
nix-shell -p nix-review --run "nix-review wip"
Tested execution of all binary files (usually in
./result/bin/
)Determined the impact on package closure size (by running
nix path-info -S
before and after)Assured whether relevant documentation is up to date
Fits CONTRIBUTING.md.