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
Preview: Emacs enhancements #7431
Conversation
Emacs packages are commonly distributed as single .el files. This unpackCmd handles them correctly and sets up sourceRoot. Other sources are treated in the default manner.
Expressions are generated from the metadata in pkgs/top-level/emacs-packages.json. The packages from emacsPackages which have metadata have been dropped. The remaining packages from emacsPackages have been moved over to emacs-packages, and ported to melpaBuild where that was easy to do.
Wow, this looks really nice! |
I don't think we should keep any packages from Melpa. Melpa uses daily snapshots - we just can't keep up with that. |
Oh wait - this PR doesn't include any predefined package sets? Sorry, misunderstood that. We should definitely ship packages from Marmalade and Melpa-Stable though. |
@ttuegel Great! 🍻 |
Another thing: Is Package collisions aside - I think we should support both. |
Oh, and: Great! Nice work! |
Cool stuff :-) Nitpick: |
It defines |
|
Adding documentation tag - we should update nixos release notes and write documentation for Nixpkgs manual. |
I find MELPA unstable very useful because a lot of emacs packages don't have a stable version. There are about 1400 packages without a declared version number, that's more than the half |
I think there's a way I can keep everyone happy here. I can give each repository a priority in the updater, such that packages from stable repositories are chosen over packages from unstable repositories regardless of their version. If a package is in both stable and unstable MELPA, we would take the stable version; otherwise, we would take the unstable version. I think the packages without stable versions are not updated very often, so there isn't too much version churn to keep up with. @geerds @the-kenny Would this satisfy both of you? |
Yes, good idea! |
First of all, thanks @ttuegel for working on this! I was going to start on my own version when I get back from my honeymoon, but you beat me to it :) A couple comments:
|
When it was finished, it was going to go on Hackage, where it would be kept up-to-date automatically, but...
I hadn't considered that. The archives do not keep old versions, so what I'm doing simply won't work. And, as you point out, only MELPA exposes the information we need to build packages from the original source repositories; by my count, that's about half of the stable packages. Unless we want to mirror all these archives somewhere, there's really no way for us to capture all, or even most, of the available Emacs packages. |
Thinking about it more, I see two paths forward:
The disadvantage to the first approach is that we miss all the ELPA and Marmalade packages; although MELPA is the most comprehensive archive, I think we would still miss about 1000 packages. I was initially against mirroring the packages. Now I think that although mirroring is a little ugly, the coverage gain may be worth it. Mirroring also lets us support our stable releases better: TeXLive has the same problem, and as a result, using TeX on a release branch is a slightly miserable experience. I would appreciate some feedback here. I have to admit a bias: the first option above requires throwing out most of my efforts on elpa2nix! Am I crazy to consider mirroring the package archives? |
I was similarly opposed in spirit to mirroring packages when I first started thinking about this, but as long as we're not breaking GitHub's ToS I think I can live with the kludginess 😄 |
I just reviewed the ToS, and nothing forbids it. The ToS remarks that you must be legally able to redistribute whatever content you put up. The packages are all open-source just to be on *ELPA, so that's not a problem. However, the ToS also warns that repositories may be suspended for bandwidth use exceeding the typical, so we may want to avoid that. That reduces our options to mirroring somewhere else, or using the MELPA recipes. I think using the MELPA recipes is not so bad. There seems to be a lot of duplication between MELPA and Marmalade. (ELPA is small and seems to keep old versions around indefinitely, so I don't think we should worry about that.) The reason that stable MELPA is so small seems to be mainly that unstable MELPA has many different plugins from emacswiki that don't have proper, stable versions. Some of the Marmalade packages on MELPA don't seem to have properly tagged Git repositories; I'm not sure what to do about that. If users do want packages in Nixpkgs that aren't in MELPA, we can submit recipe PRs upstream. I don't have a problem being the Debian of Emacs packages! :) |
To stem the tide of bug reports: yes, the packages generated this way become outdated too quickly. As explained above, I am abandoning elpa2nix. I think we should generate packages based on MELPA's recipes. I intend to work on that in the near future, but I am not working on it at this time. The Emacs wrapper is still useful, though, and I will push it to master when I figure out some byte-compiling issues. |
OK, |
MELPA maintainer here.
Yes, MELPA is generally a superset of Marmalade, except for a few exceptions. The exceptions are split between packages which we declined on quality grounds, and ones which have been manually uploaded from a non-version-controlled source or a
In case it's an issue, I should mention that we don't keep old versions currently. We'd like to start keeping just a few old versions.
There's a MELPA issue somewhere for that: the right course of action is to chase up the upstream maintainers and get them to add tags. There are also a few packages which are in SCM systems which MELPA Stable does not yet handle. For better or worse, we refuse to trust versions embedded in files, since they're simply unreliable. Emacswiki-hosted packages are unlikely to ever make it into MELPA Stable, for exactly that reason. Overall, due to these issues, MELPA Stable is fairly hit-and-miss, since dependencies for a listed package can sometimes be completely missing. The MELPA maintainers don't use Stable ourselves, because MELPA itself is not at all unstable in practice, so Stable is there primarily by popular demand on an "as-is" basis. I think many MELPA Stable users also have MELPA enabled, so that they can explicitly install "stable" packages on a package-by-package basis, while still having all the dependencies available for installation.
Yes, please pass recipes on to us. Regarding this effort in general (which I applaud!), I should point out that sometimes packages get removed from MELPA or even renamed. Not sure what impact that is likely to have on you. (Renaming is tracked via |
That won't be a problem for us. Originally, I was just reading
Right, there was some user feedback about that when I planned to just track MELPA Stable. My plan now is to use all the recipes, keeping stable versions where there is one and falling back to unstable versions when there isn't. We will be keeping our own snapshots, so I don't think there's a problem tracking unstable versions, but it would have been difficult to track daily snapshots from MELPA.
I don't think this will impact us much. It's no problem to have many names refer to the same package (the current name and all of |
Great, sounds like that's all in hand, then. Just ping me or file a MELPA issue if you need anything. |
This commit migrates the Nomad package from the 0.10.x line of releases to 0.11.X. This allows us to also bump the version of Go that is used to 1.14.x. NOTE: 1.14.x will be needed for the rest of the 0.11.x releases as Nomad only bumps patch versions of Go within a release series. CHANGELOG: FEATURES: Container Storage Interface [beta]: Nomad has expanded support of stateful workloads through support for CSI plugins. Exec UI: an in-browser terminal for connecting to running allocations. Audit Logging (Enterprise): Audit logging support for Nomad Enterprise. Scaling APIs: new scaling policy API and job scaling APIs to support external autoscalers Task Dependencies: introduces lifecycle stanza with prestart and sidecar hooks for tasks within a task group BACKWARDS INCOMPATIBILITIES: driver/rkt: The Rkt driver is no longer packaged with Nomad and is instead distributed separately as a driver plugin. Further, the Rkt driver codebase is now in a separate repository. IMPROVEMENTS: core: Optimized streaming RPCs made between Nomad agents [NixOSGH-7044] build: Updated to Go 1.14.1 [NixOSGH-7431] consul: Added support for configuring enable_tag_override on service stanzas. [NixOSGH-2057] client: Updated consul-template library to v0.24.1 - added support for working with consul connect. Deprecated vault_grace [NixOSGH-7170] driver/exec: Added no_pivot_root option for ramdisk use [NixOSGH-7149] jobspec: Added task environment interpolation to volume_mount [NixOSGH-7364] jobspec: Added support for a per-task restart policy [NixOSGH-7288] server: Added minimum quorum check to Autopilot with minQuorum option [NixOSGH-7171] connect: Added support for specifying Envoy expose path configurations [NixOSGH-7323] [NixOSGH-7396] connect: Added support for using Connect with TLS enabled Consul agents [NixOSGH-7602] BUG FIXES: core: Fixed a bug where group network mode changes were not honored [NixOSGH-7414] core: Optimized and fixed few bugs in underlying RPC handling [NixOSGH-7044] [NixOSGH-7045] api: Fixed a panic when canonicalizing a jobspec with an incorrect job type [NixOSGH-7207] api: Fixed a bug where calling the node GC or GcAlloc endpoints resulted in an error EOF return on successful requests [NixOSGH-5970] api: Fixed a bug where /client/allocations/... (e.g. allocation stats) requests may hang in special cases after a leader election [NixOSGH-7370] cli: Fixed a bug where nomad agent -dev fails on Windows [NixOSGH-7534] cli: Fixed a panic when displaying device plugins without stats [NixOSGH-7231] cli: Fixed a bug where alloc exec command in TLS environments may fail [NixOSGH-7274] client: Fixed a panic when running in Debian with /etc/debian_version is empty [NixOSGH-7350] client: Fixed a bug affecting network detection in environments that mimic the EC2 Metadata API [NixOSGH-7509] client: Fixed a bug where a multi-task allocation maybe considered healthy despite a task restarting [NixOSGH-7383] consul: Fixed a bug where modified Consul service definitions would not be updated [NixOSGH-6459] connect: Fixed a bug where Connect enabled allocation would not stop after promotion [NixOSGH-7540] connect: Fixed a bug where restarting a client would prevent Connect enabled allocations from cleaning up properly [NixOSGH-7643] driver/docker: Fixed handling of seccomp security_opts option [NixOSGH-7554] driver/docker: Fixed a bug causing docker containers to use swap memory unexpectedly [NixOSGH-7550] scheduler: Fixed a bug where changes to task group shutdown_delay were not persisted or displayed in plan output [NixOSGH-7618] ui: Fixed handling of multi-byte unicode characters in allocation log view [NixOSGH-7470] [NixOSGH-7551]
This is a preview for the community of some changes to Emacs packaging I have been preparing. I have been using this for some time already and I hope there is still enough time to get it into NixOS 15.05. There are two large changes:
emacsWithPackages [ pkgA pkgB ... ]
provides an Emacs which knows about the specified packages.I look forward to your feedback!
Package Generation
TL;DR: Automatically-updated expressions for 1822 Emacs packages.
The package metadata can be downloaded from any
package.el
-compatible server. An unholy mixture of Elisp and Haskell converts the S-expression downloaded from the server to JSON; along the way, all the packages are downloaded and hashed. This JSON is loaded into a Nix expression usingbuiltins.fromJSON
and a set of packages is born! Two package sets are provided,emacs-packages
includes packages from ELPA, Marmalade, and stable MELPA, whileemacs-packages-unstable
adds packages from unstable MELPA and org-mode ELPA.Features:
melpaBuild
.Emacs Wrapper
The Emacs wrapper defines environments for Emacs without having packages installed in the user or system profiles. File collisions between packages and Emacs is a major cause of breakage. (I'm looking at you, org-mode!) Now, I just have this in my
environment.systemPackages
:and everything Just Works!
The wrapper works by creating a custom
site-start.el
file which adds the packages toload-path
and wrapping Emacs so the custom start-up file is found first. Adding packages to the load path this way comes at the price of start-up time: my load times increased about 5% (0.15 seconds) due to this change. Of course, all my packages actually work now, so that's a big bonus. Of course, it is still possible to use an un-wrapped Emacs, which will read packages from the user and system profiles as before.