diff options
Diffstat (limited to 'pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix')
-rw-r--r-- | pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix index 1e9a8191b3f16..00646b6d81b38 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix @@ -23,6 +23,11 @@ formats commits for you. */ +let + # Read ./recipes-archive-melpa.json in an outer let to make sure we only do this once. + defaultArchive = builtins.fromJSON (builtins.readFile ./recipes-archive-melpa.json); +in + { lib, pkgs }: variant: self: let dontConfigure = pkg: @@ -57,7 +62,7 @@ let if pkg != null then dontConfigure (externalSrc pkg pkgs.rtags) else null; - generateMelpa = lib.makeOverridable ({ archiveJson ? ./recipes-archive-melpa.json + generateMelpa = lib.makeOverridable ({ archiveJson ? defaultArchive }: let inherit (import ./libgenerated.nix lib self) melpaDerivation; @@ -66,7 +71,7 @@ let (s: s != null) (map (melpaDerivation variant) - (lib.importJSON archiveJson) + (if builtins.isList archiveJson then archiveJson else lib.importJSON archiveJson) ) ) ); |