elisp-packages/manual-packages.nix: get rid of with

As related in https://nix.dev/anti-patterns/language#with-attrset-expression:

- Static analysis can’t reason about the code, because it would have to actually
  evaluate this file to see what variables are in scope;

- As soon as there are two with used, it’s not clear anymore from which the
  variables are coming from;

- Scoping rules around with are not intuitive. Examples:
  - https://github.com/NixOS/nix/issues/490
  - https://github.com/pikajude/nixpkgs/commit/eea78e554e03906524f87406bb3a17d5c5264029
This commit is contained in:
Anderson Torres
2023-03-05 13:17:08 -03:00
parent 794f34657e
commit 451dfa6d84
@@ -1,7 +1,10 @@
{ lib, pkgs }:
self: with self; {
self:
let
inherit (pkgs) callPackage;
in
{
agda-input = callPackage ./manual-packages/agda-input { };
agda2-mode = callPackage ./manual-packages/agda2-mode { };
@@ -84,8 +87,8 @@ self: with self; {
sunrise-commander = callPackage ./manual-packages/sunrise-commander { };
# camelCase aliases for some of the kebab-case expressions above
colorThemeSolarized = color-theme-solarized;
emacsSessionManagement = session-management-for-emacs;
rectMark = rect-mark;
sunriseCommander = sunrise-commander;
colorThemeSolarized = self.color-theme-solarized;
emacsSessionManagement = self.session-management-for-emacs;
rectMark = self.rect-mark;
sunriseCommander = self.sunrise-commander;
}