Commit Graph

54 Commits

Author SHA1 Message Date
Robert Helgesson
241e28e3d1
emacs: use runCommand to generate wrapper
This removes the unnecessary compiler build dependency. We also set

    preferLocalBuild = true;
    allowSubstitutes = false;

to not farm out the build on a remote builder or bother with trying to
find a binary substitution.
2019-09-18 22:32:19 +02:00
adisbladis
41d1b8fa88
emacsPackages: Drop old emacsPackages (non-NG) sets
These have been deprecated for a long time now and has not seen much maintenance.
2019-08-30 16:43:16 +01:00
Daniel Schaefer
786f02f7a4 treewide: Remove usage of isNull
isNull "is deprecated; just write e == null instead" says the Nix manual
2019-04-29 14:05:50 +02:00
Mohammed Yaseen Mowzer
d17d18ad81 emacs: Link subdirs.el into emacs-packages-deps
Emacs loads all the elisp files in the top-level of the site-lisp
directory. However some packages (e.g. mu4e) put their elisp files in a
subdirectory of site-lisp. Emacs will not load these packages unless
subdirs.el is present.

This commit links the subdirs.el file from the emacs package into the
emacs-package-deps package so that packages that put their elisp files
in a subdirectory of site-lisp are loaded.
2019-02-02 15:37:13 +02:00
Thomas Tuegel
fb7749620b
melpaBuild: Get package-build from melpa/package-build
This commit causes melpaBuild to use package-build from melpa/package-build
instead of melpa/melpa. Development of package-build happens in the former
repository whereas the latter is much larger, containing also the MELPA
recipes. We do not need to fetch the MELPA recipes from melpa/melpa, as we fetch
them one-by-one for Nixpkgs.
2018-11-27 09:36:28 -06:00
Benjamin Hipple
a7d1474023 emacsPackagesNg.trivialBuild: cleanup and standardize function
No real function change here, but this updates the trivial and melpa builders to
be formatted more consistently with the rest of the builders, and swaps
`eval "$preBuild"` for the more standard `runHook preBuild`.
2018-11-27 00:23:04 -05:00
John Ericson
b9dce11712 lib: Make overrideScope' which takes arguments in the conventional order
The `overrideScope` bound by `makeScope` (via special `callPackage`)
took an override in the form `super: self { … }`. But this is
dangerously close to the `self: super { … }` form used by *everything*
else, even other definitions of `overrideScope`! Since that
implementation did not even share any code either until I changed it
recently in 3cf43547f4, this inconsistency
is almost certainly an oversight and not intentional.

Unfortunately, just as the inconstency is hard to debug if one just
assumes the conventional order, any sudden fix would break existing
overrides in the same hard-to-debug way. So instead of changing the
definition a new `overrideScope'` with the conventional order is added,
and old `overrideScope` deprecated with a warning saying to use
`overrideScope'` instead. That will hopefully get people to stop using
`overrideScope`, freeing our hand to change or remove it in the future.
2018-09-24 17:50:11 -04:00
Periklis Tsirakidis
04f0c25222 Fix pname to ename propagation if null 2018-07-27 08:15:46 +02:00
Thomas Tuegel
7131e353e6
melpaBuild: use Emacs package names to satisfy package-build
package-build expects the recipe file name to match the Emacs package
name. `melpaBuild` takes an extra argument `ename` for the Emacs package
name (default: `pname`, the Nix package name) which is used to name the recipe
file.

Fixes: #43893
See also: #43609
2018-07-23 06:51:51 -05:00
volth
52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
Thomas Tuegel
d3cea48608
emacsPackagesNg: 2018-07-15 update
All package sets are simultaneously updated to accommodate changes to
package-build. Due to new restrictions in package-build, all packages using
`melpaBuild` must now provide a recipe file, even those packages which are not
included in upstream MELPA.
2018-07-15 20:52:41 -05:00
Matthew Justin Bauer
a5e28a554e
nix-buffer: make eshell-path-env be inherited 2018-02-15 17:30:59 -06:00
Matthew Justin Bauer
5b59084e00
Filter nix-buffer packages
Null packages cause an error
2018-02-11 21:52:16 -06:00
Shea Levy
943592f698
Add setFunctionArgs lib function.
Among other things, this will allow *2nix tools to output plain data
while still being composable with the traditional
callPackage/.override interfaces.
2018-01-31 14:02:19 -05:00
Shea Levy
0f925943fd
Fix emacsWithPackages after 7f3ca3e21a.
This is hacky but it does the job, resurrects findInputs from before staging merge
2018-01-04 12:15:55 -05:00
John Ericson
046f091e0d treewide: Don't use envHook anymore
This commits needs a MAJOR audit as I oftentimes just guessed which of
`$hostOffset`, `$targetOffset`, or a fixed offset should be used.
2017-12-30 22:04:22 -05:00
Michael Alan Dorman
ef5ba4d5b2 Fix emacs wrapper expression to honor bash array use
In 8d76eff, @Ericson2314 changed the representation of the value that
`findInputs` generated from a whitespace-separated bunch strings to an
actual array of strings.

Expressions that *consume* that value, however, also needed to be
changed to iterate over all the contents of the array, else they would
only select the first value, which turns out to be somewhat limiting.

Fixes #27873
2017-08-04 07:52:18 -04:00
Rodney Lorrimar
9e56cddf13 emacsWithPackages: support installing larger packages
I was getting the following error building tide from Melpa:

    nix-build  -E '(import <nixpkgs> {}).emacs25WithPackages (p: [p.melpaPackages.tide])'

    File tide-20170509.1134.tar is large (10.2M), really open? (y or n) Error reading from stdin
    builder for ‘/nix/store/gs9ik7yf8iilsikkfing74i70m0diax3-emacs-tide-20170509.1134.drv’ failed with exit code 255
    cannot build derivation ‘/nix/store/m3p080aani4rw82llp8nqk93cw2nvirk-emacs-with-packages-25.2.drv’: 1 dependencies couldn't be built

Solution was to disable the large file warning threshold when
installing packages.
2017-05-29 12:56:09 +01:00
Matthew Bauer
2c0006521b
emacsWithPackages: wrap MacOS app
fixes #22893
2017-05-20 18:51:32 -05:00
Utku Demir
5a78bed2bb Fix documentation of emacsWithPackages
After [this change](901a778c77), it should be `overrideScope` instead of `override`.
2017-05-02 09:52:04 +12:00
Shea Levy
8a1707ad0d nixBufferBuilders: Add haskellMonoRepo builder 2017-05-01 11:44:21 -04:00
Shea Levy
f087b75941 nix-buffer support: Make process-environment changes actually local 2017-03-25 11:13:25 -04:00
Shea Levy
bae77363c3 nixBufferBuilders.withPackages: Fix buffer count logic 2017-03-01 11:05:50 -05:00
Damien Cassou
0e69fb2f19 Merge pull request #18985 from dudebout/emacs-with-c-src
emacs: add an option to install the C source
2016-10-07 17:23:19 +02:00
Shea Levy
eca0f17ad2 nix-buffer support improvements.
Use inherit-local, add per-package elisp hooks.
2016-10-07 10:31:37 -04:00
Nicolas Dudebout
9c3852538c emacsWrapper: remove site-start.elc 2016-09-27 16:13:22 -04:00
Shea Levy
b04cdae902 nixBufferBuilders.withPackages: Make more legible, special-case proof-general.
There's some bigger changes coming, but thought I'd push this first...
2016-09-05 17:55:49 -04:00
Shea Levy
05c132486d Initial version of nixBufferBuilders.withPackages.
This builds elisp to setup an emacs buffer with the packages given
available. See shlevy/nix-buffer for more information.

Currently only modifies $PATH.
2016-09-05 12:01:26 -04:00
Thomas Tuegel
64ba7b53f1 Revert "Merge pull request #17806 from matthewbauer/emacs-wrapper"
This reverts commit da68127737, reversing
changes made to 2ba494b728.

These changes are reverted because they cause an incompatibility which
they should not.
2016-08-19 15:09:41 -05:00
Matthew Bauer
6ceedaaee4 emacs: add versatile "emacsWrapper"
"emacsWrapper" replaces emacsWithPackages. In addition to "packagesFun",
emacsWrapper has an optional variable called "execStart". execStart can
be used to append elisp to the default site-start.el script. This is
useful for providing a way to load a user's .emacs.d/init.el
file. "emacsWithPackages" is implemented with emacsWrapper for
convenience and compatability.
2016-08-17 18:19:58 +00:00
Samuel Rivas
67394f9152 emacs: hide wrapper dependencies
Move all the dependencies to their own derivation, so that we don't publish all
of them if the wrapper is installed in a profile.

The previous solution just moved them to a custom directory to avoid conflicts,
this refactors that and completely hides them, while preserving the desired
improvement of adding only one directory to each of the emacs search paths
2016-05-12 22:43:30 +02:00
Samuel Rivas
f1b0d6410e emacsWithPackages: reduce some duplication 2016-04-03 21:21:50 +02:00
Samuel Rivas
2b199537b7 emacsWithPackages: move bin and site-lisp to private share directory
This is to avoid unwanted side effects when installing a wrapped emacs in the environment:

  * All executables in the dependencies become available in the user environment
  * All site-lisp binaries in the dependencies become accessible to unwrapped emacs

Also, both bin and site-lisp would generate conflicts so installing a wrapped emacs becomes really cumbersome
2016-04-03 21:11:38 +02:00
Thomas Tuegel
32c30411cf emacsWithPackages: link packages into single load-path
This should provide a small speed improvement by avoiding having to set
hundreds of load-paths.
2016-01-20 12:53:11 -06:00
Thomas Tuegel
2b1024646b emacsWithPackages: defer loading package.el
Also stops duplicating load paths.
2016-01-20 12:43:21 -06:00
Thomas Tuegel
97e1258ded emacsWithPackages: use local variables correctly 2016-01-20 12:43:00 -06:00
Thomas Tuegel
9dfd9fe0bf elpa2nix: fix packages with DOS line endings 2016-01-18 15:29:19 -06:00
Thomas Tuegel
decb5802c9 elpaBuild: factor out package installation
Building packages requires package-build.el from Melpa, but installing
packages only requires package.el. Packages from ELPA are already built,
so there is no need to involve package-build.el.
2016-01-18 15:29:19 -06:00
Thomas Tuegel
1724a07e2e melpaBuild: keep original source file names without hash 2016-01-18 15:29:19 -06:00
Thomas Tuegel
cd54d7af47 melpaBuild: don't download dependencies
Stop package.el from trying to download dependencies. It wouldn't work
anyway.
2016-01-18 15:29:17 -06:00
Thomas Tuegel
18251778c9 melpaBuild: don't guess archive file name
package-build can tell us exactly what the archive file name is, instead
of globbing for it.
2016-01-18 15:29:17 -06:00
Thomas Tuegel
4b2303b8c9 melpaBuild: get Emacs package name from recipe
When building a package from a Melpa recipe file, get the Emacs package
name from the recipe. Nix is more restrictive about packages names than
Emacs, so the Nix name for a package is sometimes different.
2016-01-18 15:29:16 -06:00
Thomas Tuegel
7466e0f264 melpaBuild: accept recipeFile in lieu of fileSpecs 2015-12-29 13:23:49 -06:00
Thomas Tuegel
688c005608 melpaBuild: update package-build.el 2015-12-27 10:59:27 -06:00
Thomas Tuegel
0bc4af00ee emacsWithPackages: add user documentation 2015-12-19 09:32:16 -06:00
Thomas Tuegel
dadfd93811 emacsWithPackages: know its own package set
Fixes #10819. emacsWithPackages will know its own package set. This
requires it to be in a package set, rather than at the top level, so it
lives in emacsPackagesNg.
2015-12-19 09:31:41 -06:00
Thomas Tuegel
07a0031029 melpaBuild: add unpackCmd for single-file packages
Emacs packages are commonly distributed as single .el files. This
unpackCmd handles them correctly and sets up sourceRoot. Other sources
are treated in the default manner.
2015-12-06 11:50:10 -06:00
Mathnerd314
eb7404d97a all-packages: Use callPackage where possible 2015-09-14 22:27:19 -06:00
Jan Malakhovski
56fbeb7a93 emacs-packages: add automatic meta.homepages to builders, cleanup other expressions
Because we can.
2015-07-31 02:02:04 +00:00
Thomas Tuegel
5583067fd8 emacsWithPackages: install support files
The wrapper needs to link the desktop file, icons, info and man pages
into place so they will appear when emacsWithPackages is installed.
2015-05-17 14:24:34 -05:00