summary refs log tree commit diff
path: root/pkgs/build-support/emacs
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-09-23 11:07:35 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-09-24 17:50:11 -0400
commitb9dce11712d2bfc8cd367df5a7f737a5cec1e252 (patch)
tree1adf097b9eba03bbcca2e09fdef9a11c2c7543d6 /pkgs/build-support/emacs
parent84c8e397d234bcdbd7ee4a41bf6b705d1250250c (diff)
downloadnixpkgs-b9dce11712d2bfc8cd367df5a7f737a5cec1e252.tar
nixpkgs-b9dce11712d2bfc8cd367df5a7f737a5cec1e252.tar.gz
nixpkgs-b9dce11712d2bfc8cd367df5a7f737a5cec1e252.tar.bz2
nixpkgs-b9dce11712d2bfc8cd367df5a7f737a5cec1e252.tar.lz
nixpkgs-b9dce11712d2bfc8cd367df5a7f737a5cec1e252.tar.xz
nixpkgs-b9dce11712d2bfc8cd367df5a7f737a5cec1e252.tar.zst
nixpkgs-b9dce11712d2bfc8cd367df5a7f737a5cec1e252.zip
lib: Make `overrideScope'` which takes arguments in the conventional order
The `overrideScope` bound by `makeScope` (via special `callPackage`)
took an override in the form `super: self { … }`. But this is
dangerously close to the `self: super { … }` form used by *everything*
else, even other definitions of `overrideScope`! Since that
implementation did not even share any code either until I changed it
recently in 3cf43547f4be03d1d6eb0bbfc557e2dbc13b4095, this inconsistency
is almost certainly an oversight and not intentional.

Unfortunately, just as the inconstency is hard to debug if one just
assumes the conventional order, any sudden fix would break existing
overrides in the same hard-to-debug way. So instead of changing the
definition a new `overrideScope'` with the conventional order is added,
and old `overrideScope` deprecated with a warning saying to use
`overrideScope'` instead. That will hopefully get people to stop using
`overrideScope`, freeing our hand to change or remove it in the future.
Diffstat (limited to 'pkgs/build-support/emacs')
-rw-r--r--pkgs/build-support/emacs/wrapper.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix
index 4e780b104b0..e161daffbd3 100644
--- a/pkgs/build-support/emacs/wrapper.nix
+++ b/pkgs/build-support/emacs/wrapper.nix
@@ -21,7 +21,7 @@ set which contains `emacsWithPackages`. For example, to override
 `emacsPackagesNg.emacsWithPackages`,
 ```
 let customEmacsPackages =
-      emacsPackagesNg.overrideScope (super: self: {
+      emacsPackagesNg.overrideScope' (self: super: {
         # use a custom version of emacs
         emacs = ...;
         # use the unstable MELPA version of magit