From 9df96bd3c5af39fe19adc4dd81c5f10f83cbbaef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= Date: Thu, 28 May 2020 22:51:06 +0200 Subject: [PATCH 1/4] Updating doom-emacs and compatibility shim --- advice.el | 6 +++--- nix/sources.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/advice.el b/advice.el index ece0c4f..6be377b 100644 --- a/advice.el +++ b/advice.el @@ -2,10 +2,10 @@ (advice-add 'nix-straight-get-used-packages :before (lambda (&rest r) (message "[nix-doom-emacs] Advising doom installer to gather packages to install...") - (advice-add 'doom-cli-reload-autoloads + (advice-add 'doom-autoloads-reload :override (lambda (&optional file force-p) (message "[nix-doom-emacs] Skipping generating autoloads..."))) - (advice-add 'doom--format-print + (advice-add 'doom--print :override (lambda (output) (message output))))) @@ -19,5 +19,5 @@ :override (lambda (&rest r))) ;; just use straight provided by nix -(advice-add 'doom-ensure-straight +(advice-add 'doom-initialize-core-packages :override (lambda (&rest r) (require 'straight))) diff --git a/nix/sources.json b/nix/sources.json index 5d83e7f..505f030 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -5,10 +5,10 @@ "homepage": "", "owner": "hlissner", "repo": "doom-emacs", - "rev": "abb9ab7674601c2e90ecf1ca29f575a1effe9a4c", - "sha256": "01445q0sjchymdd9s8iyfczlwnrdjrxfq7h9hz27hd38czb45rll", + "rev": "75b6e11f5656e86f05097cfca8de4d8cae9da1f5", + "sha256": "13dxqnjzhmb7y60aq5da5ihl8dnzg33mnqnx58f8lpa7vd9ixjvf", "type": "tarball", - "url": "https://github.com/hlissner/doom-emacs/archive/abb9ab7674601c2e90ecf1ca29f575a1effe9a4c.tar.gz", + "url": "https://github.com/hlissner/doom-emacs/archive/75b6e11f5656e86f05097cfca8de4d8cae9da1f5.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "doom-snippets": { From 0254193a28f933961b17f549ca424ce440702115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= Date: Thu, 28 May 2020 22:51:30 +0200 Subject: [PATCH 2/4] updating dependencies --- nix/sources.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index 505f030..e3c997c 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -29,10 +29,10 @@ "homepage": "", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "9c64445d5e33e24a1c409cb426a9754c4142a65d", - "sha256": "13hgayxm7vlyfs3zjp0nmblqannygfpw5fib3pwa013i03cvwnrs", + "rev": "18b06b2a74bd74ef19c06baf1f149b5b6838aea5", + "sha256": "1vhx9yqi7ys5bv9y7xf5fhfxlzpqfvxxnvpca5w1i0yx3j4pgc5g", "type": "tarball", - "url": "https://github.com/nix-community/emacs-overlay/archive/9c64445d5e33e24a1c409cb426a9754c4142a65d.tar.gz", + "url": "https://github.com/nix-community/emacs-overlay/archive/18b06b2a74bd74ef19c06baf1f149b5b6838aea5.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "emacs-so-long": { @@ -65,10 +65,10 @@ "homepage": null, "owner": "hlissner", "repo": "evil-org-mode", - "rev": "9cf661af8ff8ea768ef1e55045be14d0468a90f5", - "sha256": "1rafhagc509rzwcknssvcr3palzzvryhgpjjpbhgmh4awqqp9k1b", + "rev": "2e9c4a295ee6aea7c97c5b1f3892b1c6e28a32d9", + "sha256": "1ljsl23sjvf0haqm3yp9dpyfzf5p58l4bp42s8025vwzy6359rck", "type": "tarball", - "url": "https://github.com/hlissner/evil-org-mode/archive/9cf661af8ff8ea768ef1e55045be14d0468a90f5.tar.gz", + "url": "https://github.com/hlissner/evil-org-mode/archive/2e9c4a295ee6aea7c97c5b1f3892b1c6e28a32d9.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "evil-quick-diff": { @@ -113,10 +113,10 @@ "homepage": "https://code.orgmode.org/bzg/org-mode", "owner": "emacs-straight", "repo": "org-mode", - "rev": "3dc582c8d5ac08e10ec3f31c41b6daabeb2d3772", - "sha256": "0x6bg31ss0m236dysjnhsrip18dpjakfsxccbayb135bycyh1ib8", + "rev": "d73fd145c00e8c65da54a9b59224fbf22f9c6822", + "sha256": "0c5bzyih3jdnxn7cwn8sglcyrf4i2azbrj9b3w3q16s122yapf2c", "type": "tarball", - "url": "https://github.com/emacs-straight/org-mode/archive/3dc582c8d5ac08e10ec3f31c41b6daabeb2d3772.tar.gz", + "url": "https://github.com/emacs-straight/org-mode/archive/d73fd145c00e8c65da54a9b59224fbf22f9c6822.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "org-yt": { From 1c1e3ce4c0f6d7018b6e493d7f1761706993c21e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= Date: Tue, 2 Jun 2020 21:12:40 +0200 Subject: [PATCH 3/4] Make it compatible with `ocaml` module Fixes: #12 --- default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/default.nix b/default.nix index b02a709..723fed5 100644 --- a/default.nix +++ b/default.nix @@ -111,6 +111,19 @@ let ob-racket = self.straightBuild { pname = "ob-racket"; }; + + # dune has a nontrivial derivation, which does not buildable from the melpa + # wrapper falling back to the one in nixpkgs + dune = pkgs.dune.overrideAttrs (old: { + # Emacs derivations require an ename attribute + ename = old.pname; + + # Need to adjust paths here match what doom expects + postInstall = '' + mkdir -p $out/share/emacs/site-lisp/editor-integration + ln -snf $out/share/emacs/site-lisp $out/share/emacs/site-lisp/editor-integration/emacs + ''; + }); }; # Stage 1: prepare source for byte-compilation From 4095b104d7469155e2e3bc23293d88d314998082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= Date: Wed, 10 Jun 2020 01:11:37 +0200 Subject: [PATCH 4/4] magit: generate version information during build --- default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/default.nix b/default.nix index 723fed5..e329dbb 100644 --- a/default.nix +++ b/default.nix @@ -80,6 +80,11 @@ let evil-quick-diff = self.straightBuild { pname = "evil-quick-diff"; }; + magit = super.magit.overrideAttrs (esuper: { + preBuild = '' + make VERSION="${esuper.version}" -C lisp magit-version.el + ''; + }); org-mode = self.straightBuild rec { pname = "org-mode"; version = "9.4";