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

emacs-packages: Clean up redundant packages & allow overriding attrsets #65874

Merged
merged 20 commits into from Aug 7, 2019

Conversation

adisbladis
Copy link
Member

@adisbladis adisbladis commented Aug 3, 2019

Motivation for this change

I'm creating an auto updating emacs overlay based on https://github.com/adisbladis/exwm-overlay which will contain all our auto-generated emacs package sets and need the ability to override the loading of these.

Things done

With these changes I can generate a new melpaPackages from my locally generated json like this:

myMelpaPackages = emacsPackagesNg.melpaPackages.override {
  archiveJson = ./repos/recipes-archive-melpa.json;
};

And then use it to create a new emacsPackagesNg set:

emacsPackagesNg.override { melpaPackages = myMelpaPackages; }

or for a more complete example see the melpa branch in my overlay repo: nix-community/emacs-overlay@f7edeaa

Also the updater script can now be called from anywhere and the output JSON will be in current working directory.

While i do think this method is a bit crude it was by far the easiest way I could come up with to achieve what I wanted.

I also started cleaning up a bit of redundant packages that come autogenerated from melpa that we don't need explicit derivations for.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • 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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @gridaphobe @oxij @talyz @mdorman

edit: The scope of this PR grew a bit as I went along and cleaned up redundant packages. If need be I can split it into 2 PRs.

If you'd like to join in on this effort or if you're just interested in the emacs packaging in nixpkgs I've created #nixos-emacs on freenode.

@adisbladis adisbladis requested review from bendlas and etu August 3, 2019 22:02
@adisbladis adisbladis requested a review from ttuegel August 4, 2019 01:17
@adisbladis adisbladis force-pushed the emacs-melpa-overrides branch 2 times, most recently from 3e2d64e to 0695e2a Compare August 4, 2019 14:10
@adisbladis adisbladis changed the title Emacs melpa overrides emacs-packages: Clean up package set & allow overriding melpa JSON Aug 4, 2019
@adisbladis adisbladis force-pushed the emacs-melpa-overrides branch 4 times, most recently from 83b3da8 to 85e32c1 Compare August 4, 2019 18:09
@adisbladis adisbladis changed the title emacs-packages: Clean up package set & allow overriding melpa JSON WIP: emacs-packages: Clean up package set & allow overriding melpa JSON Aug 4, 2019
@adisbladis adisbladis changed the title WIP: emacs-packages: Clean up package set & allow overriding melpa JSON emacs-packages: Clean up package set & allow overriding melpa JSON Aug 4, 2019
@adisbladis adisbladis changed the title emacs-packages: Clean up package set & allow overriding melpa JSON emacs-packages: Clean up package set & allow overriding attrsets Aug 4, 2019
@adisbladis adisbladis changed the title emacs-packages: Clean up package set & allow overriding attrsets emacs-packages: Clean up redundant packages & allow overriding attrsets Aug 5, 2019
@adisbladis
Copy link
Member Author

adisbladis commented Aug 7, 2019

I will merge these changes within the next 24 hours (probably way sooner) if there are no objections.

@adisbladis adisbladis mentioned this pull request Aug 7, 2019
10 tasks
This enables using the melpa json generator in an overlay
Use autogenerated modules from melpa instead
Use autogenerated modules from melpa instead
Use autogenerated modules from melpa instead
It's now merged upstream in evil-mode
Use melpa generated package instead
It's in the melpa generated package `circe`
It's in the melpa generated package `circe`
Use melpa generated package instead
It's in the melpa generated package `circe`
Use autogenerated package from melpa
Use generated melpa package instead
Use auto-generated melpa package
Use auto-generated melpa package
Use auto-generated melpa package
This allows overriding the individual package sets composing
emacsPackagesNg.

Example:
```
myEmacsPackages = emacsPackagesNg.override {
  melpaPackages = {};
};
```
And let emacs-packages.nix only aggregate the attrsets
@adisbladis adisbladis merged commit f20d403 into NixOS:master Aug 7, 2019
@multun
Copy link
Member

multun commented Aug 13, 2019

@adisbladis 978b346 broke irony :(
Do you have any idea why ?

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.

None yet

2 participants