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

bytecomp-revert patch fails on 5cd187 #379

Closed
ParetoOptimalDev opened this issue Jan 2, 2024 · 6 comments
Closed

bytecomp-revert patch fails on 5cd187 #379

ParetoOptimalDev opened this issue Jan 2, 2024 · 6 comments

Comments

@ParetoOptimalDev
Copy link

error: builder for '/nix/store/qy953p4yp2xgxkl41yx5zcllk9m8bfa3-emacs-git-20240102.0.drv' failed with exit code 1;
       last 9 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/3jwc5k2l8jdjha5qh61milxyld9a2rgr-source
       > source root is source
       > Running phase: patchPhase
       > applying patch /nix/store/nlzm32a8dnrcx7iihv0smm01ifyzczfm-bytecomp-revert.patch
       > patching file lisp/emacs-lisp/bytecomp.el
       > Hunk #1 FAILED at 3521.
       > Hunk #2 succeeded at 4515 (offset 51 lines).
       > 1 out of 2 hunks FAILED -- saving rejects to file lisp/emacs-lisp/bytecomp.el.rej
       For full logs, run 'nix log /nix/store/qy953p4yp2xgxkl41yx5zcllk9m8bfa3-emacs-git-20240102.0.drv'.

My flake metadata for emacs-overlay:

$ nix flake metadata emacs-overlay
Resolved URL:  path:/nix/store/62qnxpmkwv534n1v13242c1cqghc478q-source?lastModified=1703725068&narHash=sha256-MLYevZuQC5wdzS/RnPYm20SwvSijWzPg97wi9K/qghM%3D&rev=5cd18705d47b49e35f760a83fdc33dc6e1e3f757
Locked URL:    path:/nix/store/62qnxpmkwv534n1v13242c1cqghc478q-source?lastModified=1703725068&narHash=sha256-MLYevZuQC5wdzS/RnPYm20SwvSijWzPg97wi9K/qghM%3D&rev=5cd18705d47b49e35f760a83fdc33dc6e1e3f757
Description:   Bleeding edge Emacs overlay
Path:          /nix/store/62qnxpmkwv534n1v13242c1cqghc478q-source
Revision:      5cd18705d47b49e35f760a83fdc33dc6e1e3f757
Last modified: 2023-12-27 18:57:48
Inputs:
├───flake-utils: github:numtide/flake-utils/4022d587cbbfd70fe950c1e2083a02621806a725
│   └───systems: github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e
├───nixpkgs: github:NixOS/nixpkgs/5f64a12a728902226210bf01d25ec6cbb9d9265b
└───nixpkgs-stable: github:NixOS/nixpkgs/7790e078f8979a9fcd543f9a47427eeaba38f268
@ParetoOptimalDev
Copy link
Author

Building without patches, but maybe this (untested) code removing only the bytecomp patch is better:

  patches = lib.filter (patch: patch.name or (toString patch) != "bytecomp-revert.patch") old.patches;

Or perhaps I need to fix the bytecomp patch and it's still needed. It says its for #318 so I might not need it on my vanilla x86_64 linux but could be needed by others.

@ParetoOptimalDev
Copy link
Author

Oh forgot to update, that didn't work so I just rolled my flake back to an earlier version for now.

@slotThe
Copy link

slotThe commented Jan 2, 2024

The following works for me:

nope ``` nix programs.emacs = { enable = true; package = (pkgs.emacs-git.override { … }).overrideAttrs(old: { patches = builtins.filter (patch: builtins.baseNameOf patch != "bytecomp-revert.patch") old.patches; });

}

</summary>

@ParetoOptimalDev
Copy link
Author

Sadly I get this error that might be related to that patch somehow:

error: builder for '/nix/store/b5xg2r1zp8yiv9k3q7kxn4wzbn9z7004-emacs-beacon-20220730.100.drv' failed with exit code 255;
       last 10 log lines:
       >   (if (consp x61) (let* ((x62 (car-safe x61)) (x63 (cdr-safe x61))) (if (null x63) (let ((package x58) (version x60) (commit x62)) (melpa2nix-build-package-1 (package-recipe-lookup package) version commit)))))
       >   (let* ((x60 (car-safe x59)) (x61 (cdr-safe x59))) (if (consp x61) (let* ((x62 (car-safe x61)) (x63 (cdr-safe x61))) (if (null x63) (let ((package x58) (version x60) (commit x62)) (melpa2nix-build-package-1 (package-recipe-lookup package) version commit))))))
       >   (if (consp x59) (let* ((x60 (car-safe x59)) (x61 (cdr-safe x59))) (if (consp x61) (let* ((x62 (car-safe x61)) (x63 (cdr-safe x61))) (if (null x63) (let ((package x58) (version x60) (commit x62)) (melpa2nix-build-package-1 (package-recipe-lookup package) version commit)))))))
       >   (let* ((x58 (car-safe command-line-args-left)) (x59 (cdr-safe command-line-args-left))) (if (consp x59) (let* ((x60 (car-safe x59)) (x61 (cdr-safe x59))) (if (consp x61) (let* ((x62 (car-safe x61)) (x63 (cdr-safe x61))) (if (null x63) (let ((package x58) (version x60) (commit x62)) (melpa2nix-build-package-1 (package-recipe-lookup package) version commit))))))))
       >   (if (consp command-line-args-left) (let* ((x58 (car-safe command-line-args-left)) (x59 (cdr-safe command-line-args-left))) (if (consp x59) (let* ((x60 (car-safe x59)) (x61 (cdr-safe x59))) (if (consp x61) (let* ((x62 (car-safe x61)) (x63 (cdr-safe x61))) (if (null x63) (let ((package x58) (version x60) (commit x62)) (melpa2nix-build-package-1 (package-recipe-lookup package) version commit)))))))))
       >   melpa2nix-build-package()
       >   command-line-1(("-L" "/build/package-build" "-l" "/nix/store/65hf8xsn31cindnpqcnha1w591jyvzhb-melpa2nix.el" "-f" "melpa2nix-build-package" "beacon" "20220730.100" "d09cfab21be800831644218e9c8c4433087951c0"))
       >   command-line()
       >   normal-top-level()
       > Symbol's function definition is void: package--prepare-dependencies

@slotThe
Copy link

slotThe commented Jan 2, 2024

Oh, sorry about that; maybe I should've let Emacs finish building before posting

@leungbk
Copy link
Member

leungbk commented Jan 2, 2024

I'm not sure if the bytecomp-revert patch is needed at all anymore since Mattias E. made some recent changes upstream...but anyway, I pushed some commits here to make sure the patch applies.

BTW, at the time of writing, the overlay's version of Emacs 30 works on nixos-unstable but not release-23.11 since we merged NixOS/nixpkgs#277331 fairly late. If this bothers anyone, let me know and I'll revert #378 temporarily.

@leungbk leungbk closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants