Skip to content
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

newlisp: init at 10.7.5 #326778

Merged
merged 2 commits into from
Oct 29, 2024
Merged

newlisp: init at 10.7.5 #326778

merged 2 commits into from
Oct 29, 2024

Conversation

rc-zb
Copy link
Contributor

@rc-zb rc-zb commented Jul 13, 2024

Description of changes

Add the reference implementation of newLISP, a Lisp-like, general-purpose scripting language.

And add myself to the maintainer lists of Nixpkgs as well as this package.

Limitations

  • The recipe follows the upstream, and should also work in FreeBSD, macOS, Windows, etc. But I haven't tested. So these platforms are not added to meta.platforms.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Jul 13, 2024
@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Sep 3, 2024
@rc-zb rc-zb marked this pull request as ready for review September 3, 2024 03:01
@ofborg ofborg bot added the 11.by: package-maintainer This PR was created by the maintainer of the package it changes label Sep 3, 2024
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/4517

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Sep 7, 2024
Copy link
Contributor

@jian-lin jian-lin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

pname = "newlisp";
version = "10.7.5";

src = fetchurl {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetchzip is better than fetchurl, see https://discourse.nixos.org/t/fetchzip-or-fetchurl-which-should-i-use/36572/2

This is just a suggestion which does not block the merge of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I guess that leaving the unpacking process to an explicit, (easier-to) injectable phase may provides a better interface.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaving the unpacking process to an explicit, (easier-to) injectable phase may provides a better interface.

Could you give me a concrete example showing the benefits?

FYI, it indeed happened that upstream changed mtime of files in the tarball and thus invalidated our hash of fetchurl.

As I said above, I do not have a strong opinion on this and can merge this PR as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Just a matter of sense. Have no strong preference, too.

@jian-lin
Copy link
Contributor

cc @NixOS/lisp for review

Copy link
Member

@hraban hraban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aside from @jian-lin's comments no feedback from me. Very clean derivation, what a relief from some of the gnarlier ones 😂

email = "rc-zb@outlook.com";
github = "rc-zb";
githubId = 161540043;
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

welcome 🙌

version = "10.7.5";

src = fetchurl {
url = "https://www.newlisp.org/downloads/newlisp-${finalAttrs.version}.tgz";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love the use of finalAttrs.version but note that it will always fail the embedded hash here, unless you allow overriding that, too. Which is probably overkill since it's easier for anyone who wants a different version to just bring their own src and inject that, but it's worth noting that this doesn't actually have the effect it suggests it will.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless you allow overriding that

It is possible to override hash separately, see #310373 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do this just for reusing the version while keeping the scope clean (unlike the rough rec). Never thought about someone overriding version only. 😶

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice yeah good point you can do a nested override. Fair enough!

pname = "newlisp";
version = "10.7.5";

src = fetchurl {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaving the unpacking process to an explicit, (easier-to) injectable phase may provides a better interface.

Could you give me a concrete example showing the benefits?

FYI, it indeed happened that upstream changed mtime of files in the tarball and thus invalidated our hash of fetchurl.

As I said above, I do not have a strong opinion on this and can merge this PR as is.

@jian-lin jian-lin merged commit b75ebbd into NixOS:master Oct 29, 2024
28 of 29 checks passed
@rc-zb rc-zb deleted the init-newlisp branch October 29, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants