Skip to content

emacsPackages.copilot: fix dependencies#328400

Closed
JaviMerino wants to merge 1 commit intoNixOS:masterfrom
JaviMerino:fix_emacs_copilot
Closed

emacsPackages.copilot: fix dependencies#328400
JaviMerino wants to merge 1 commit intoNixOS:masterfrom
JaviMerino:fix_emacs_copilot

Conversation

@JaviMerino
Copy link
Contributor

Description of changes

Since #327952, copilot fails to load:

nix-build -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/f5380ca553a9f988fe47b99e28ed6b9975a375fa.tar.gz --expr "(import <nixpkgs> {}).emacsPackages.emacsWithPackages (epkgs: [epkgs.copilot])" && result/bin/emacs -q --eval "(use-package copilot)"
[...]
 ■  Error (use-package): copilot/:catch: Cannot open load file: No such file or directory, s

The required packages are not needed for building, only for running. Move them all to propagatedUserEnvPkgs.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Copy link
Contributor

@jian-lin jian-lin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These elisp dependencies are indeed needed for compilation. You can see errors about missing files in the build log. Even though the whole nix build still succeeds, *.elc and .eln files are missing.

@JaviMerino
Copy link
Contributor Author

JaviMerino commented Jul 19, 2024

I see. Another thing that works is:

propagatedUserEnvPkgs = packageRequires ++ [ nodejs ];

Is this preferred?

@jian-lin
Copy link
Contributor

jian-lin commented Jul 19, 2024

This is correct. But I plan to change genericBuild instead.

@JaviMerino
Copy link
Contributor Author

Yes, but I plan to change genericBuild instead.

In that case, should I close this pull request?

@jian-lin
Copy link
Contributor

jian-lin commented Jul 19, 2024

This PR can remain open and be closed atomically when my (future) PR is merged.

@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jul 19, 2024
Since f5380ca (emacsPackages.copilot: move nodejs to
propagatedUserEnvPkgs, 2024-07-17), copilot fails to load:

    nix-build -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/f5380ca553a9f988fe47b99e28ed6b9975a375fa.tar.gz --expr "(import <nixpkgs> {}).emacsPackages.emacsWithPackages (epkgs: [epkgs.copilot])" && result/bin/emacs -q --eval "(use-package copilot)"
    [...]
     ■  Error (use-package): copilot/:catch: Cannot open load file: No such file or directory, s

The required packages are not added to propagatedUserEnvPkgs.  Add
them manually until the genericBuild is fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: emacs Text editor 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants