straight: fix overriding straight derivation used

This commit is contained in:
László Vaskó
2021-08-06 08:54:29 +02:00
parent 2b91ea635b
commit aec5f224d1

View File

@@ -2,8 +2,6 @@
emacsPackages emacsPackages
# Emacs package to use during build # Emacs package to use during build
, emacs ? emacsPackages.emacs , emacs ? emacsPackages.emacs
# You may override to use your version of `straight`
, straight ? null
# Your `init.el` file to use for discovering and installing packages # Your `init.el` file to use for discovering and installing packages
, emacsInitFile , emacsInitFile
# Additional argument to pass to Emacs or your init file # Additional argument to pass to Emacs or your init file
@@ -18,7 +16,7 @@
let let
libstraight = epkgs.callPackage ./libstraight.nix { inherit abortOnNotFound epkgs emacs; }; libstraight = epkgs.callPackage ./libstraight.nix { inherit abortOnNotFound epkgs emacs; };
epkgs = epkgs =
if straight == null then if !(emacsPackages ? straight) then
emacsPackages.overrideScope' (self: super: emacsPackages.overrideScope' (self: super:
{ straight = self.callPackage ./straight { }; }) { straight = self.callPackage ./straight { }; })
else else