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

Open
wants to merge 2 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
@jian-lin

This comment was marked as resolved.

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.
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>`.
@AndersonTorres AndersonTorres changed the title emacsPackages: clean the things up emacsPackages: clean the bulk-updating scripts Nov 1, 2024
@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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: emacs Text editor 8.has: clean-up 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 0 This PR does not cause any packages to rebuild
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants