Renamed packageFile arg to packageElisp for clarity

This commit is contained in:
Steve Purcell 2020-06-21 15:36:01 +12:00
parent 257557be07
commit fa7e127f03
3 changed files with 7 additions and 7 deletions

View file

@ -64,7 +64,7 @@ can be handy for CI purposes:
...
let
emacsForCI = pkgs.emacsWithPackagesFromPackageRequires {
packageFile = builtins.readFile ./flycheck.el;
packageElisp = builtins.readFile ./flycheck.el;
extraEmacsPackages = epkgs: [
epkgs.package-lint
];

View file

@ -7,13 +7,13 @@ Package-Requires declarations.
let
parse = pkgs.callPackage ./parse.nix { };
in
{ packageFile
{ packageElisp
, extraEmacsPackages ? epkgs: [ ]
, package ? pkgs.emacs
, override ? (epkgs: epkgs)
}:
let
packages = parse.parsePackagesFromPackageRequires packageFile;
packages = parse.parsePackagesFromPackageRequires packageElisp;
emacsPackages = pkgs.emacsPackagesGen package;
emacsWithPackages = emacsPackages.emacsWithPackages;
in

View file

@ -6,8 +6,8 @@ let
(x: builtins.typeOf x == "string")
(builtins.split _sep _s);
# Parse (all) Package-Requires elisp headers found in the input string
# `packageFile` into a list of package name strings.
# Parse (all) Package-Requires packageElisp headers found in the input string
# `packageElisp` into a list of package name strings.
#
# Example inputs:
#
@ -19,9 +19,9 @@ let
# => [ "dash" "pkg-info" ]
# ;; Package-Requires: ((dash) (pkg-info "0.4"))
# => [ "dash" "pkg-info" ]
parsePackagesFromPackageRequires = packageFile:
parsePackagesFromPackageRequires = packageElisp:
let
lines = splitString "\r?\n" packageFile;
lines = splitString "\r?\n" packageElisp;
requires =
lib.concatMapStrings
(line: