Commit 451dfa6d authored by Anderson Torres's avatar Anderson Torres
Browse files

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
parent 794f3465
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
{ 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;
}