From 333c12d72d84beb0b90564930f80bd6192088ef9 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 8 Feb 2022 11:57:52 +0300 Subject: fix(tazjin/emacs): Correctly pass through additional attributes We really need target list diffing, would have caught this earlier. Change-Id: Ifc064400b3115c6e2242d0b503cde4216b2ee787 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5257 Reviewed-by: tazjin Autosubmit: tazjin Tested-by: BuildkiteCI --- users/tazjin/emacs/default.nix | 59 +++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 27 deletions(-) (limited to 'users/tazjin') diff --git a/users/tazjin/emacs/default.nix b/users/tazjin/emacs/default.nix index f7fc77be70f5..ae1879ba850f 100644 --- a/users/tazjin/emacs/default.nix +++ b/users/tazjin/emacs/default.nix @@ -128,7 +128,7 @@ pkgs.makeOverridable ''; in lib.fix - (self: l: f: pkgs.writeShellScriptBin "tazjins-emacs" '' + (self: l: f: (pkgs.writeShellScriptBin "tazjins-emacs" '' export PATH="${emacsBinPath}:$PATH" exec ${tazjinsEmacs f}/bin/emacs \ --debug-init \ @@ -137,35 +137,40 @@ pkgs.makeOverridable --no-init-file \ --directory ${./config} ${if l != null then "--directory ${l}" else ""} \ --eval "(require 'init)" $@ - '' // { - # Call overrideEmacs with a function (pkgs -> pkgs) to modify the - # packages that should be included in this Emacs distribution. - overrideEmacs = f': self l f'; + '').overrideAttrs + (_: { + passthru = { + # Call overrideEmacs with a function (pkgs -> pkgs) to modify the + # packages that should be included in this Emacs distribution. + overrideEmacs = f': self l f'; - # Call withLocalConfig with the path to a *folder* containing a - # `local.el` which provides local system configuration. - withLocalConfig = confDir: self confDir f; + # Call withLocalConfig with the path to a *folder* containing a + # `local.el` which provides local system configuration. + withLocalConfig = confDir: self confDir f; - # Build a derivation that uses the specified local Emacs (i.e. - # built outside of Nix) instead - withLocalEmacs = emacsBin: pkgs.writeShellScriptBin "tazjins-emacs" '' - export PATH="${emacsBinPath}:$PATH" - export EMACSLOADPATH="${(tazjinsEmacs f).deps}/share/emacs/site-lisp:" - exec ${emacsBin} \ - --debug-init \ - --no-site-file \ - --no-site-lisp \ - --no-init-file \ - --directory ${./config} \ - ${if l != null then "--directory ${l}" else ""} \ - --eval "(require 'init)" $@ - ''; + # Build a derivation that uses the specified local Emacs (i.e. + # built outside of Nix) instead + withLocalEmacs = emacsBin: pkgs.writeShellScriptBin "tazjins-emacs" '' + export PATH="${emacsBinPath}:$PATH" + export EMACSLOADPATH="${(tazjinsEmacs f).deps}/share/emacs/site-lisp:" + exec ${emacsBin} \ + --debug-init \ + --no-site-file \ + --no-site-lisp \ + --no-init-file \ + --directory ${./config} \ + ${if l != null then "--directory ${l}" else ""} \ + --eval "(require 'init)" $@ + ''; - # Expose telega/tdlib version check as a target that is built in - # CI. - inherit tdlibCheck; - meta.ci.targets = [ "tdlibCheck" ]; - }) + # Expose telega/tdlib version check as a target that is built in + # CI. + # + # TODO(tazjin): uncomment when telega works again + inherit tdlibCheck; + meta.ci.targets = [ "tdlibCheck" ]; + }; + })) null identity ) -- cgit 1.4.1