From c68c81fb0150b251b2e72d9cdd5d735403c3df50 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Wed, 24 Feb 2021 15:01:08 +0100 Subject: [PATCH] emacsPackagesFor: Remove all pkgs inherits from call site --- pkgs/top-level/all-packages.nix | 7 +------ pkgs/top-level/emacs-packages.nix | 15 ++++++--------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1790312c7313..fcabf57cf4b2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21947,12 +21947,7 @@ in stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv; }; - emacsPackagesFor = emacs: import ./emacs-packages.nix { - inherit lib newScope stdenv pkgs; - inherit fetchFromGitHub fetchurl; - inherit emacs texinfo makeWrapper runCommand writeText; - inherit (xorg) lndir; - }; + emacsPackagesFor = emacs: import ./emacs-packages.nix { inherit pkgs lib emacs; }; inherit (gnome3) empathy; diff --git a/pkgs/top-level/emacs-packages.nix b/pkgs/top-level/emacs-packages.nix index 076e67a1e740..d3c62b3ff779 100644 --- a/pkgs/top-level/emacs-packages.nix +++ b/pkgs/top-level/emacs-packages.nix @@ -32,12 +32,7 @@ # `meta` with `platforms` and `homepage` set to something you are # unlikely to want to override for most packages -{ lib, newScope, stdenv, fetchurl, fetchFromGitHub, runCommand, writeText - -, emacs, texinfo, lndir, makeWrapper - -, pkgs -}: +{ pkgs, lib ? pkgs.lib, emacs }: let @@ -50,7 +45,8 @@ let }; mkElpaPackages = import ../applications/editors/emacs-modes/elpa-packages.nix { - inherit lib stdenv texinfo writeText; + inherit (pkgs) stdenv texinfo writeText; + inherit lib; }; # Contains both melpa stable & unstable @@ -65,14 +61,15 @@ let }; emacsWithPackages = import ../build-support/emacs/wrapper.nix { - inherit lib lndir makeWrapper runCommand; + inherit (pkgs) lndir makeWrapper runCommand; + inherit lib; }; mkManualPackages = import ../applications/editors/emacs-modes/manual-packages.nix { inherit lib pkgs; }; -in lib.makeScope newScope (self: lib.makeOverridable ({ +in lib.makeScope pkgs.newScope (self: lib.makeOverridable ({ elpaPackages ? mkElpaPackages self , melpaStablePackages ? mkMelpaStablePackages self , melpaPackages ? mkMelpaPackages self