-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
melpaBuild: allow nix unstable version format #316726
melpaBuild: allow nix unstable version format #316726
Conversation
I believe this is an extra reason to merge #315949 :) |
@@ -96,17 +113,17 @@ genericBuild ({ | |||
-L "$NIX_BUILD_TOP/package-build" \ | |||
-l "$melpa2nix" \ | |||
-f melpa2nix-build-package \ | |||
$ename $version $commit | |||
$ename $melpaVersion $commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it really work? I am impressed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why you comment at this line. But yes, the whole PR works. You can try it out yourself :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was mostly a reaction of 50% skeptic plus 50% amazed.
f896f70
to
ce114b6
Compare
ce114b6
to
ba7021a
Compare
Before, an unstable version of melpaBuild has to be in MELPA format, which has some disadvantages: - existing update scripts cannot be reused[1] - it causes inconsistence. This patch fixes that by allowing an unstable version to be in Nix format. We heuristically detect if it is an unstable version in Nix format. If so, we convert it to MELPA format. This does not bring evaluation performance overhead. Here is my benchmark result using hyperfine-1.18.0 and nix-2.18.1. Without this patch: Benchmark 1: NIXPKGS_ALLOW_BROKEN=1 nix eval --include nixpkgs=$PWD --file . emacs.pkgs.melpaPackages --apply 'pkgSet: map (drv: drv.drvPath) (builtins.filter (p: p.type or null == "derivation") (builtins.attrValues pkgSet))' --no-eval-cache >/dev/null Time (mean ± σ): 9.126 s ± 0.048 s [User: 6.531 s, System: 0.997 s] Range (min … max): 9.056 s … 9.186 s 10 runs With this patch applied: Benchmark 1: NIXPKGS_ALLOW_BROKEN=1 nix eval --include nixpkgs=$PWD --file . emacs.pkgs.melpaPackages --apply 'pkgSet: map (drv: drv.drvPath) (builtins.filter (p: p.type or null == "derivation") (builtins.attrValues pkgSet))' --no-eval-cache >/dev/null Time (mean ± σ): 9.124 s ± 0.057 s [User: 6.522 s, System: 1.011 s] Range (min … max): 9.040 s … 9.220 s 10 runs [1]: https://github.com/NixOS/nixpkgs/blob/177c9eddadc6abbaf62a19c90cc27a9fcde08e2d/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix#L93-L108
ba7021a
to
ee46aa8
Compare
Why is this PR taking so long to land? |
The current PR to update staging-next takes a bit more time than usual. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Before, an unstable version of melpaBuild has to be in MELPA format, which has some disadvantages:
This patch fixes that by allowing an unstable version to be in Nix format.
We heuristically detect if it is an unstable version in Nix format. If so, we convert it to MELPA format.
This does not bring evaluation performance overhead. Here is my benchmark result using hyperfine-1.18.0 and nix-2.18.1.
Without this patch:
With this patch applied:
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.