Fails to build due to 'emacs-ghub' melpa package
nckrse opened this issue · 4 comments
Hello,
Just recently, I am having issues building 'nix-doom-emacs' on both master and develop branches. I am installing via home-manager and you can see my configuration at the end of this comment. It seems to be related to a MELPA package thats required by nix-doom-emacs.
nix-doom-emacs build fails due to during MELPA 'emacs-ghub' package (github.com/magit/ghub) install due to package name not matching up:
Debugger entered--Lisp error: (error "Single file ghub-pkg.el does not match package nam...")
signal(error ("Single file ghub-pkg.el does not match package nam..."))
error("Single file %s does not match package name %s" "ghub-pkg.el" "ghub")
(if (string-equal (downcase (concat name ".el")) (downcase (file-name-nondirectory file))) nil (error "Single file %s does not match package name %s" file name))
emacs-ghub is required by straight it looks like, which is used by the base emacs-with-packages for recipe installation (?) which would make sense:
nix-store --query --referrers /nix/store/pryw0slmw21h46010p99hmcixngaqvlb-emacs-ghub-20220429.1708.drv
/nix/store/hy22353f46nbw49338kfimhfklxjijcn-emacs-forge-20220506.420.drv
/nix/store/qnh6larvwsqpg5maj3vfm7qbxd50zq19-emacs-forge-20220506.420.drv
/nix/store/qzpawybrndznp3m1863vwm65isfjkh54-emacs-code-review-20220503.1344.drv
/nix/store/jhqy4rs1skdh6gcj715xa3543mrw9qbs-install-repo.drv
/nix/store/w06n1jlkgxfa67h0n7gcs93zw1s5ffi4-emacs-code-review-20220503.1344.drv
/nix/store/k49v48v6klpbm00y0xw0pj645zm2qn6z-install-repo.drv
nix-store --query --referrers /nix/store/jhqy4rs1skdh6gcj715xa3543mrw9qbs-install-repo.drv
/nix/store/6dqqamr0p38zflf914pd50vdfr5xflw9-straight-emacs-env.drv
nix-store --query --referrers /nix/store/6dqqamr0p38zflf914pd50vdfr5xflw9-straight-emacs-env.drv
/nix/store/msir64mjlnrf2n772r5f47a65fpa8hii-nix-integration.patch.drv
/nix/store/xsiacifa9byahyii8xbpfn2m2ld8rdq6-build-summary.drv
/nix/store/z4qzr31rzhabw09v80d8hzvps1cki79j-emacs-with-packages-28.1.drv
I found a recent issue (magit/ghub/issues/156) in 'magit/ghub' regarding this exact issue I am experiencing. The workaround is to update MELPA checkout, which would be done as part of the nix-doom-emacs derivation build, so i'm not sure how that fix would apply here. Apparently the issue started after melpa/package-build@35017a2
I've tried clearing my garbage, performing home-manager re-build and also removed from HM configuration for a successful build but same issue once I add it back into my nix config.
Configuration:
{ pkgs, ... }:
let
doom-emacs = pkgs.callPackage (builtins.fetchTarball {
url = https://github.com/nix-community/nix-doom-emacs/archive/develop.tar.gz;
}) {
doomPrivateDir = ./doom.d;
dependencyOverrides = {
"emacs-overlay" = (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
});
};
emacsPackagesOverlay = self: super: {
gitignore-mode = pkgs.emacsPackages.git-modes;
gitconfig-mode = pkgs.emacsPackages.git-modes;
};
};
in
{
home.packages = [ doom-emacs ];
home.file.".emacs.d/init.el".text = ''
(load "default.el")
'';
}
Regards,
Nick
It looks like you're already overriding emacs-overlay with the latest build. Emacs-overlay is updated every 8h by the nix-community builder, try again in 8 hours and see if your issue is fixed.
To prevent random breakages you should have your configuration in version control with flake inputs or niv so you can choose when to update.
@starcraft66, thank you for the quick response. The issue has been happening for several days now and have tried several fresh re-builds, but now that you've mentioned nix-community/emacs-overlay, I see that emacs-overlay/issues/227 has been opened.
@ckiee, thank you for the recommendations. I use flakes for most of my project based/isolated nix builds and have been keeping my core userbase apps in home-manager but this may have to change soon. Niv may be useful for pinning versions with home-manager, I'll look into that
Fixed in NixOS/nixpkgs#174178