Commit Graph

56 Commits

Author SHA1 Message Date
f9dee4bac7 Change storage location to XDG default
Co-authored-by: Thiago Kenji Okada <thiagokokada@gmail.com>
Co-authored-by: ckie <git-525ff67@ckie.dev>
2022-08-19 19:55:07 +01:00
b72dc63c39 Update patches 2022-08-16 17:33:04 +01:00
d60b73a090 Update doom-emacs config paths 2022-08-09 20:54:42 +01:00
281b1f2a6c Merge pull request #200 from thiagokokada/add-hm-module-check
Add Home-Manager module check
2022-07-11 20:56:08 +01:00
07913a9ba7 Make wrapEmacs non-hermetic
This will allow someone to ovewrite doom-emacs runtime environment
variables, e.g. DOOMDIR, so they can load a modified doom.d directory
for testing.

Fixes: #203
2022-07-10 20:52:33 +01:00
84c37396e8 Doc align fixes 2022-07-10 20:03:14 +01:00
9111d480a8 Use --init-directory in Emacs 29+ (#191)
* Use `--init-directory` in Emacs 29+

This will allow a few advantages:
- We can load `early-init.el` file properly, fixing Flash Of Unstyled
Contents (FOUC) issues and improving the performance slightly
- Eventually we can drop `default.el` file loading in Home-Manager
module. Not done here since this would complicate the code without
necessity, however this can be done once Emacs 29+ is default

* Fix build in Emacs <29

* Add #checks.<arch>.init-example-el-emacsGit

* Add .#checks.x86_64-linux.init-example-el-emacsGit to CI

* Fix review issues

* Move config files to share/emacs.d

* Separate tests in two steps

* Add TODOS

* Simplify emacs-dir generation
2022-07-10 20:46:49 +03:00
ffa42074ba Move patches to its own directory 2022-07-08 16:48:39 +01:00
744cfb8a1d Remove flake-compat-helper.nix 2022-07-08 16:26:18 +01:00
4717e4e835 catch up to upstream; it builds again!
Fixes #170.
Fixes #183.
2022-07-01 18:37:29 +03:00
271f69afc2 start fixing CI; this gets a bit further into the build 2022-07-01 16:31:03 +03:00
5c28f6f460 default.nix: typo: hadful -> handy 2022-05-10 12:36:49 +03:00
70185befa5 default.nix: run nixfmt 2022-05-10 12:36:49 +03:00
2df4f288c7 copy dereferencing links from doomPrivateDir
This fixes #41. Previously `config.el` being a symlink meant permissions
could not be set and the build would fail.
2022-01-24 16:51:19 +02:00
6379986368 default: restore compatibility with the HM module 2021-12-11 19:10:24 +02:00
d639071134 expose doom-emacs binaries in the main derivation 2021-12-10 16:29:00 +02:00
d259993f6d allow doomPrivateDir to be a derivation too
In my personal config I pass in a derivation as doomPrivateDir is made
by a `pkgs.runCommand`. This allows that to work again.
2021-12-10 15:33:06 +02:00
665e729bb8 Assert that doomPrivateDir is a path 2021-12-10 15:07:53 +02:00
e9a82e6557 Add a patch for restart-emacs
Before this change, trying to use `doom/restart-and-restore` would
result in a failed to load `default.el` as the wrong binary would be launched.

This fixes that.
2021-06-29 23:06:23 +02:00
5ee8044b04 github actions: niv -> flakes
Use flake.nix/lock as a single source of truth for resolving
dependencies

NOTE: this patch implies a dependency update as well.
2021-01-23 17:15:48 +01:00
44dd899fce flake: rename inputs to prevent errors on update
If input name contains `.` character then `invalid flake input path
element` error message is displayed on running `nix flake update
--update-input x.y`
2021-01-23 17:08:15 +01:00
f9286c8c56 Emacs wrapper: extract duplicated wrapProgram call
Additional refactors made:

* eliminated the quirky $out/bin/$(basename $prog) path calculation as
  it equals to $prog anyway (I have no idea why was it that way...)
* Removed the platform dependent optionalString call as there is an
  additional runtime check anyway for the existence of Applications
  directory.

Referecnes: #100
2020-12-04 20:46:26 +00:00
4cd7e15082 Wrap emacs app if it was created on darwin 2020-12-04 21:44:15 +01:00
b344cf066d load config.el from outside of nix store
That way a rebuild is not needed to pick up modifications from it
2020-09-27 23:06:17 +02:00
23cf6b9884 support gccEmacs
If built with gccEmacs, in `straight--native-compile-package` step tries
to access $HOME because `comp-eln-load-path` contains
"~/.emacs.d/eln-cache/". It errors on this as it is set to a readonly canary value of
`/homeless-shellter` in the nix build sandbox.

The workaround is twofold:
 * Ignore `kill-emacs` from optimization. It would result in eln file
   being written before doom sets up the load path outside of HOME.
 * The above solution doesn't help in the actual build phase because the
   worker processes compiling packages does not inherit this value but
   it is set in them at a later time. This causes the build to fail
   before `comp-eln-load-path` would be successfully overridden. Having
   a writable $HOME does not seem to produce any build output there
   hence the override and the check in `postInstall` to verify that the
   directory is indeed empty.

The runtime value of `comp-eln-load-path` also had to be changed because
it is by default is located under the volatile `doom-cache-dir` which is
not a part of the derivation so the build time generated `.eln` files
couldn't be loaded from that.

References: #57
2020-09-27 12:37:17 +02:00
b5e8dbeaa1 output formating: use nix variables for reusability in other stages 2020-09-26 17:08:31 +02:00
f71655a7d0 Overlay support for emacs (elisp) dependencies
This is needed as custom packages may need the same treatment as
built-in dependencies of doom. See `./overrides.nix` for details.

The `bundledPackages` option may be consolidated to use this argument as
well in the future.

References: #55
2020-09-20 09:01:40 +02:00
546c7a84b7 nix-doom-emacs: add env variables to aid debugging 2020-08-21 16:42:04 +02:00
64928132dd nix-doom-emacs: add a summary at the end of build
It makes debugging so much easier
2020-08-21 16:42:04 +02:00
a4d5042100 fixup! override emacsWithPackages instead of wrapping it 2020-07-02 20:53:18 +02:00
638118e72d override emacsWithPackages instead of wrapping it
This way all conditional outputs e.g. the MacOS App will be present in
the final derivation.

See: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/emacs/wrapper.nix#L162

Resolves: #14
2020-06-22 11:24:59 +02:00
2ab836b8f4 extracting overrides to its own file
This is the most volatile part of the code base, default.nix should be
fairly stable by now.
2020-06-10 01:26:08 +02:00
4095b104d7 magit: generate version information during build 2020-06-10 01:13:55 +02:00
1c1e3ce4c0 Make it compatible with ocaml module
Fixes: #12
2020-06-02 21:43:03 +02:00
60f0e9bd16 add ob-racket to sources 2020-04-03 01:38:38 -04:00
28f1da710e Use recursive flag on cp for private directory
If the private directory has multiple folders in it, building the derivation will omit them.
2020-03-22 23:06:24 +01:00
4502c27759 Fix git command shim
References: https://github.com/vlaci/nix-doom-emacs/issues/5
2020-03-16 19:15:32 +01:00
2143f7f7bb Fix package overriding 2020-02-29 16:13:55 +01:00
8bf10a4fc6 Updating sources using niv to track versions
It is nice tool for the job I have not yet known about
2020-02-22 10:25:01 +01:00
b387be3425 Fixing doom-snippets and rotate-text features
Dependencies were missing for these (enabled by default) doom features.

Fixes #2
2020-02-15 10:58:27 +01:00
d2f5dbb393 straightBuild: simplify extra package definition 2020-01-25 21:30:44 +01:00
8e95b5f888 nix-doom-emacs: org-mode fork to support newer doom versions
commit 964291bb3662ffb19ddc9150c2f4eb0ec05b3af1
    Author: Henrik Lissner <henrik@lissner.net>
    Date:   Wed Jan 22 18:36:37 2020 -0500

        Fix #2409: switch to org mirror
2020-01-25 21:30:44 +01:00
5944884462 evil-org: doom-emacs depends on hlissner's fork 2020-01-07 14:04:46 +01:00
bd13c99287 Make it work as home-manager program.emacs.package 2019-12-13 17:54:23 -05:00
a041d16de8 Make work on runCommand-based emacsWithPackages 2019-12-12 20:07:33 -05:00
a9de74107f updating dependencies
* evil-quick-fix is a new dependency of doom
2019-12-01 15:53:51 +01:00
56089c8774 ~/.doom.d no longer needs to be installed
`extraConfig` is merged into doom user's `config.el` file
2019-11-23 22:19:19 +01:00
1f8cc61365 dependencies: adding so-long, evil-markdown and php-extras 2019-11-23 16:08:50 +01:00
e10413c837 New option to specify additional configuration
This enables emacs configuration to refer nix store paths.
2019-11-23 10:40:42 +01:00
80d96690d3 New option to install additional packages 2019-11-23 10:08:19 +01:00