Commit graph

23 commits

Author SHA1 Message Date
adisbladis
792375796d
Merge pull request #363 from cmm/extra-pkgs-for-default-init
make extraEmacsPackages available when building default init file
2024-02-23 03:59:09 +13:00
Brian Leung
b7c67b5f71
Shut up obsolescence warning 2024-02-04 18:10:04 -08:00
talyz
e574b56c87
elisp: Tangle org-mode files when used with defaultInitFile 2024-01-20 13:21:48 +01:00
Michael Livshin
825ce34adf make extraEmacsPackages available when building init file 2023-10-03 12:31:02 -04:00
Lin Jian
e04309d195
elisp.nix: improve pname of default.le package
The pname is usually the feature name provided by the Emacs lisp
library.  trivialBuild makes use[1] of this assumption to generate
NAME-autoloads.el file.

[1]: e6aa338820/pkgs/build-support/emacs/trivial.nix (L24)
2023-09-08 08:47:41 +08:00
Lin Jian
96f2838796
elisp.nix: add version for default.el package
A recent change[1] in Nixpkgs makes version attribute non-optional.

Fixes: https://github.com/nix-community/emacs-overlay/issues/356

[1]: https://github.com/NixOS/nixpkgs/pull/253448
2023-09-08 08:42:21 +08:00
adisbladis
d068b271bd Remove ensure API breakage notice 2023-07-15 23:33:15 +12:00
adisbladis
94c7550ae2 Extend fromUsePackage config argument compatibility
configText can be sourced from either:

- A config literal
``` nix
{ config = "(use-package foo)"; }
```

- A config path
``` nix
{ config = ./config.el; }
```

- A derivation
``` nix
{ config = pkgs.writeText "config.el" "(use-package foo)"; }
```

- A string with context
``` nix
{ config = "${hello}/config.el"; }
```
2023-06-16 02:56:24 +12:00
Lin Jian
d16c6c1fb2
Use overrideScope' for override
This fixes an issue that override cannot override packages which are
the dependencies of usePkgs and not in usePkgs.

This also preserves backward compatibility of override.  The hash of
the generated Emacs package from emacsWithPackagesFromUsePackage does
not change after this patch is applied using the old style override.
2023-04-11 12:23:43 +08:00
Lin Jian
4fd0bbbedf
elisp.nix: add a param to include user config as a default init file
This is good for AOT native compilation of user config.

Besides being bool, the value of this new option can also be a
derivation produced by pkgs.substituteAll, which avoids IFD comparing
to directly setting that derivation to the config param.
2022-10-15 16:27:56 +08:00
eyjhb
7a2592d4dc
dropped alias: emacsPackagesGen -> emacsPackagesFor 2022-02-26 22:47:05 +01:00
adisbladis
2eefd34724
elisp.nix: Fix errorFun when alwaysEnsure is null (default) 2021-08-12 11:40:51 -05:00
Andreas Fuchs
9e8e8cae4d Default alwaysEnsure to null-as-false, only warn if it wasn't passed 2021-02-18 14:22:52 -05:00
talyz
2d2e50224c
Allow leaf to be used as an alternative to use-package..
..in `emacsWithPackagesFromUsePackage`.
2020-12-27 11:24:17 +01:00
talyz
b900181472
Add alwaysTangle argument to emacsWithPackagesFromUsePackage
Add an option to tangle all Org mode babel code blocks by default and
update the documentation.
2020-08-11 18:17:19 +02:00
talyz
7fd146158e
Use the native Org mode parsing capabilities of fromElisp...
..for IFD free Org babel file support.
2020-08-07 15:24:28 +02:00
adisbladis
c9e1c8cb77
parsePackagesFromUsePackage: Allow passing config as a path & auto-tangle org configs 2020-07-31 22:59:00 +02:00
adisbladis
2cf83a356f
Add API breakage notice trace 2020-07-23 01:23:17 +02:00
talyz
e43d9dbe42
Add option use-package-always-ensure behavior
When `use-package-always-ensure` is set to `t`, `:ensure` defaults to
`t`. This adds the `alwaysEnsure` argument to
`emacsWithPackagesFromUsePackage` which, if set to true, emulates this
behavior.
2020-07-18 21:17:38 +02:00
talyz
a0260daa88
elisp.nix: fix spelling and indentation 2020-07-18 14:43:29 +02:00
Steve Purcell
8439afbe1e Add emacsWithPackagesFromPackageRequires
This provides a mechanism for creating an Emacs closure that contains
the runtime dependencies for a given Emacs package source file, by
inspecting its Package-Requires header.
2020-06-20 15:54:57 +12:00
Sondre Nilsen
8c2e55d96a
emacsPackagesNg -> emacsPackages
Upstream nixpkgs has dropped emacs*Ng*, they are now legacy aliases.
2019-11-04 11:08:03 +00:00
adisbladis
f84321f435
Add a method to make Emacs closures from use-package declarations 2019-08-19 11:15:54 +01:00