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

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 Aug 3, 2019

@adisbladis adisbladis force-pushed the adisbladis:emacs-melpa-overrides branch from 216deaf to 36cc11c Aug 3, 2019

@adisbladis adisbladis requested a review from ttuegel Aug 4, 2019

@adisbladis adisbladis force-pushed the adisbladis:emacs-melpa-overrides branch from 36cc11c to 8a5985a Aug 4, 2019

@adisbladis adisbladis requested a review from matthewbauer Aug 4, 2019

@adisbladis adisbladis force-pushed the adisbladis:emacs-melpa-overrides branch 2 times, most recently from 3e2d64e to 0695e2a Aug 4, 2019

@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 adisbladis:emacs-melpa-overrides branch 4 times, most recently from 83b3da8 to 85e32c1 Aug 4, 2019

@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 force-pushed the adisbladis:emacs-melpa-overrides branch from 4c1ae64 to 37567f8 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 adisbladis force-pushed the adisbladis:emacs-melpa-overrides branch from dac344e to 0c79966 Aug 6, 2019

@adisbladis

This comment has been minimized.

Copy link
Member Author

commented Aug 7, 2019

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

@adisbladis adisbladis referenced this pull request Aug 7, 2019
0 of 10 tasks complete

adisbladis added some commits Aug 3, 2019

emacs-packages: Allow update script to be called from any location
Previously working directory was important
melpa-packages: Add ability to ovveride melpa JSON archive location
This enables using the melpa json generator in an overlay
emacs-packages: Move shm
Use autogenerated modules from melpa instead
emacs-packages: Drop manually created nyan-mode derivation
Use autogenerated modules from melpa instead

adisbladis added some commits Aug 4, 2019

emacs-packages: Drop stgit
Use autogenerated modules from melpa instead
emacsPackagesNg.evil-jumper: Drop package
It's now merged upstream in evil-mode
emacs-packages: Drop emacsql-sqlite package
Use melpa generated package instead
emacs-packages: Drop lcs package
It's in the melpa generated package `circe`
emacs-packages: Drop package `lui`
It's in the melpa generated package `circe`
emacs-packages: Drop `redshank` package
Use melpa generated package instead
emacs-packages: Drop `shorten` package
It's in the melpa generated package `circe`
emacs-packages: Drop manually packaged pdf-tools
Use autogenerated package from melpa
emacs-packages: Drop zmq package
Use generated melpa package instead
emacs-packages: Drop emacs-libvterm package
Use auto-generated melpa package
emacs-packages: Drop elpy package
Use auto-generated melpa package
emacs-packages: Drop irony package
Use auto-generated melpa package
emacs-packages: Add overriding capability to emacsPackagesNg
This allows overriding the individual package sets composing
emacsPackagesNg.

Example:
```
myEmacsPackages = emacsPackagesNg.override {
  melpaPackages = {};
};
```
emacs-packages: Move manually created packages to it's own file
And let emacs-packages.nix only aggregate the attrsets

@adisbladis adisbladis force-pushed the adisbladis:emacs-melpa-overrides branch from 0c79966 to be74dec Aug 7, 2019

@adisbladis adisbladis merged commit f20d403 into NixOS:master Aug 7, 2019

@multun

This comment has been minimized.

Copy link

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
2 participants
You can’t perform that action at this time.