mirror of
https://github.com/nix-community/nix-doom-emacs
synced 2025-08-11 13:07:28 -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
|
load-config-from-site
|
||||||
]));
|
]));
|
||||||
in
|
in
|
||||||
emacs.overrideAttrs (esuper: {
|
emacs.overrideAttrs (esuper:
|
||||||
buildCommand = esuper.buildCommand + ''
|
let cmd = ''
|
||||||
for prog in $out/bin/*; do
|
for prog in $out/bin/*; do
|
||||||
wrapProgram $out/bin/$(basename $prog) --set DOOMDIR ${doomDir}
|
wrapProgram $out/bin/$(basename $prog) --set DOOMDIR ${doomDir}
|
||||||
done
|
done
|
||||||
# emacsWithPackages assumes share/emacs/site-lisp/subdirs.el
|
# emacsWithPackages assumes share/emacs/site-lisp/subdirs.el
|
||||||
# exists, but doesn't pass it along. When home-manager calls
|
# exists, but doesn't pass it along. When home-manager calls
|
||||||
# emacsWithPackages again on this derivation, it fails due to
|
# emacsWithPackages again on this derivation, it fails due to
|
||||||
# a dangling link to subdirs.el.
|
# a dangling link to subdirs.el.
|
||||||
# https://github.com/NixOS/nixpkgs/issues/66706
|
# https://github.com/NixOS/nixpkgs/issues/66706
|
||||||
rm -rf $out/share
|
rm -rf $out/share
|
||||||
ln -s ${esuper.emacs}/share $out
|
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