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

emacsPackages: clean the bulk-updating scripts #351056

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

AndersonTorres
Copy link
Member

@AndersonTorres AndersonTorres commented Oct 25, 2024

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.

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.

Adding documentation is always good.

Please remove those commits updating elisp packages.

pkgs/applications/editors/emacs/elisp-packages/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to put this doc into Nixpkgs manual. https://nixos.org/manual/nixpkgs/unstable/#chap-language-support is a good place.

Copy link
Contributor

Choose a reason for hiding this comment

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

What is motivation of factoring out this lib-update-scripts.sh? It has only one consumer and factoring out it adds complexity like SOURCE and DIR.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am cogitating to split the functions here so that they could be loaded via source lib-update-scripts.sh and so be executed interactively.

E.g. the function that tests the package set can be run whether the set was generated locally or downloaded from the overlay.

Copy link
Contributor

@jian-lin jian-lin Oct 25, 2024

Choose a reason for hiding this comment

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

Sounds good. What about adding that to the doc?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have documented it.

pkgs/applications/editors/emacs/elisp-packages/README.md Outdated Show resolved Hide resolved
@AndersonTorres AndersonTorres force-pushed the elisp branch 5 times, most recently from 9cae614 to af1a662 Compare October 26, 2024 01:24
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux and removed 10.rebuild-darwin: 501+ 10.rebuild-darwin: 1001-2500 10.rebuild-linux: 501+ 10.rebuild-linux: 1001-2500 labels Oct 26, 2024
@AndersonTorres AndersonTorres force-pushed the elisp branch 7 times, most recently from e110470 to 6539e9f Compare October 26, 2024 17:19
@jian-lin

This comment was marked as resolved.

@AndersonTorres AndersonTorres marked this pull request as ready for review November 1, 2024 02:15
@AndersonTorres
Copy link
Member Author

@jian-lin now it is ready.

I did the following modifications

@ofborg ofborg bot added 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux and removed 10.rebuild-linux: 1 10.rebuild-linux: 1-10 labels Nov 1, 2024
@DamienCassou DamienCassou removed their request for review November 4, 2024 14:36
@github-actions github-actions bot added the 8.has: documentation This PR adds or changes documentation label Dec 6, 2024
@AndersonTorres AndersonTorres marked this pull request as draft December 6, 2024 14:49
@AndersonTorres
Copy link
Member Author

Drafted

@github-actions github-actions bot added 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Dec 6, 2024
The tasks executed by the update-from-overlay script are very useful for
interactive as well as batch update sessions.

Thinking about it, I refactored the whole thing:

- The tasks are now functions kept in a file, `update-scripts-library.sh`.

  This file is meant to be sourced, so that the functions can be used in both
  batch and interactive environments.

- The update-from-overlay script was rewritten accordingly.

- Since Bash lacks serious data structures, I am using a JSON file as database.
They are identical except for the parameters they use.
Let's merge them in a single script.

Now they can be called via `./update-package-sets <package sets>`.
They will be gathered in a more fitting documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants