-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
tigerjython: init at 2.39 #316431
tigerjython: init at 2.39 #316431
Conversation
Result of 1 package failed to build:
|
The failure here was a hash mismatch. Probably the solution here is to update the hash in the source for TigerJython.tar and for the tjlogo64.png files. |
I realized that this problem is not that uncommon across nixpkgs, I did that here: http://web.archive.org/web/20240119124245/https://tigerjython.ch/user/pages/download/TigerJython.tar.gz You'll have to generate another snapshot when there's a new release, but this is much easier to maintain than a custom git repo. |
That is a good idea. However, I am not sure if that approach is a stable enough solution for a 150MB download file. However, I took your advice and automated the creation of the archive using Github Actions and put the docs for that on the front page of https://github.com/zero-overhead/tj. That way we get booth a.) simple way to create an archive, b.) high availability and bandwidth in case a whole class of e.g. 24 pupils is running a What do you think? Is that a way forward? PS: I recon I could even extend this GH action to update the package.nix, test it and send a pull request. But that would be an optimization I would only consider later, and for sources that release frequently new versions and were it is important to be up to date. TigerJython is very mature (and I assume mostly used in schools in the DACH area anyway). Using an older version is not a security risk - pupils just might not be able to connect the latest Robot or Platform or use the new actor X on model Y. |
What can I do to make this PR moving forward? |
web.archive.org is used extensively throughout the tree (112 files in |
Thank you for your review. I was not aware that using archive.org is the standard way of doing it, furthermore I assumed that each installation will trigger a download from that side. I changed the source accordingly - and use the same approach for a PR for another software (I like to be) used in schools - filius. |
AFAICT unfreeRedistributable packages are not built on hydra... |
Sorry, you’re right; I got my wires crossed. Won’t tarballs.nixos.org still cache the source derivation though? I admit I haven’t spent much time working with non‐free packages, so I could be totally wrong here. In any case I’m pretty sure the Internet Archive can take the load. |
Thank you for your help. I understood that the current state of the PR is as good as it gets? Can I improve something else? Do I need to edit any other files? |
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've requested some changes.
Also, could you squash your commits into 2 commits?
- one for adding yourself as a maintainer
- and one for adding the package itself
https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#commit-conventions
https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#commit-conventions
Thank you. I incorporated the change requests. Can you give me a hint how I can squash the 3 commits into 2? |
You can run |
@TomaSajt @emilazy @Noodlez1232 @LeSuisse - Thank you all for your help - graciously appreciated. I learned a lot for my next contribution. Now I am eager to see how/if I can use Nix in school to ensure unified computer setup in a BYOD world. |
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.
Per NixOS/rfcs#166, format the file with
nix run nixpkgs#nixfmt-rfc-style -- pkgs/by-name/ti/tigerjython/package.nix
Since updating this seems somewhat cumbersome, I wonder if an updateScript could be written to handle it. |
@vigress8 thank you for your review. I included the suggested changes (and fixed a small bug in the java wrapper). With regards to the suggested update script as a side note: TigerJython is mature and not releasing frequently. I included the steps a human (me) or a script would need to do. Do you assume scraping https://tigerjython.ch/en/products/download for version string and download link is stable enough to implement? My current view is that the risk of failures in webscraping is higher than the effort of a yearly (before Autumn term) manual update. |
Fair enough, it's not quite fit for automation. But perhaps a script meant to run manually, and the result checked by a human, would be useful. |
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.
The PR looks pretty complete now, though I still have some small suggestions.
Also I'm a bit concerned about the long download times. It might be possible to hack together something where we symlink the tarball's files instead of copying them into the main package. This way they should not get cleared. What do you think, is it worth trying? |
I am not able to hack together such a thing. Would the generic solutions to this situation not be - as suggested by you - to cache unfreeRedistributable packages? This was the Issue you linked. I personally plan to use only the stable branch (School - things must work in class, no experiments on infrastructure during terms) Alternatively I ask upstream if I can declare the package with a free license such that caching happens automatically? |
I've though about the download speed a bit more and I think it's fine as it is for now. If someone has an issue with long download times when rebuilding, we can ask them to just manually download the tar.gz file and do |
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.
LGTM for the most part.
If some issue comes up in the future, we can fix it then.
Result of 1 package built:
|
@LeSuisse - what do you think? Is this PR ready? To start TigerJython currently I use export NIXPKGS_ALLOW_UNFREE=1; nix run github:nixos/nixpkgs/pull/316431/head#tigerjython --extra-experimental-features "nix-command flakes" --impure but it would be more convinient to have it as a standard package. |
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’m sorry this stalled out. I couldn’t merge things back when I left my original comments but I can now. This looks good to me and I’m happy to add it as‐is. Thank you for your contribution!
Description of changes
Adding new package TigerJython https://tigerjython.ch/
TigerJython offers everything you need to go from programming beginner to professional. You will find a wide variety of tutorials and can get started right away in programming environments specially developed for you.
TigerJython runs on the Java Virtual Machine (JVM), although we also offer the browser-based online solution WebTigerJython and WebTigerPython. The design and development of TigerJython follow the guidelines of simplicity, understandability, and—naturally—Python's battery included philosophy with an extensive set of libraries.
Things done
Taking the existing .tar.gz file from https://tigerjython.ch/en/products/download wrapping it to run the .jar file using the current stable JRE.
There are no dependencies introduced - just wrapping a jar for convenience.
I run
nix-build -A tigerjython
and then/nix/store/...-tigerjython-2.39/bin/tigerjython
successfully.