mirror of
https://github.com/nix-community/nix-doom-emacs
synced 2025-08-09 12:57:26 -05:00
fixup! override emacsWithPackages
instead of wrapping it
This commit is contained in:
39
default.nix
39
default.nix
@ -172,17 +172,28 @@ let
|
||||
load-config-from-site
|
||||
]));
|
||||
in
|
||||
emacs.overrideAttrs (esuper: {
|
||||
buildCommand = esuper.buildCommand + ''
|
||||
for prog in $out/bin/*; do
|
||||
wrapProgram $out/bin/$(basename $prog) --set DOOMDIR ${doomDir}
|
||||
done
|
||||
# emacsWithPackages assumes share/emacs/site-lisp/subdirs.el
|
||||
# exists, but doesn't pass it along. When home-manager calls
|
||||
# emacsWithPackages again on this derivation, it fails due to
|
||||
# a dangling link to subdirs.el.
|
||||
# https://github.com/NixOS/nixpkgs/issues/66706
|
||||
rm -rf $out/share
|
||||
ln -s ${esuper.emacs}/share $out
|
||||
'';
|
||||
})
|
||||
emacs.overrideAttrs (esuper:
|
||||
let cmd = ''
|
||||
for prog in $out/bin/*; do
|
||||
wrapProgram $out/bin/$(basename $prog) --set DOOMDIR ${doomDir}
|
||||
done
|
||||
# emacsWithPackages assumes share/emacs/site-lisp/subdirs.el
|
||||
# exists, but doesn't pass it along. When home-manager calls
|
||||
# emacsWithPackages again on this derivation, it fails due to
|
||||
# a dangling link to subdirs.el.
|
||||
# https://github.com/NixOS/nixpkgs/issues/66706
|
||||
rm -rf $out/share
|
||||
ln -s ${esuper.emacs}/share $out
|
||||
'';
|
||||
in
|
||||
if esuper ? buildCommand then
|
||||
{
|
||||
buildCommand = esuper.buildCommand + cmd;
|
||||
}
|
||||
else if esuper ? installPhase then
|
||||
{
|
||||
installPhase = esuper.installPhase + cmd;
|
||||
}
|
||||
else
|
||||
abort "emacsWithPackages uses unknown derivation type"
|
||||
)
|
||||
|
Reference in New Issue
Block a user