Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): lock file maintenance #414

Merged
merged 4 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 21 additions & 25 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
lib,
stdenv,
trivialBuild,
buildElispPackage,
elispInputs,
emacs-all-the-icons-fonts,
emacsPackages,
iosevka-bin,
Expand All @@ -11,41 +12,36 @@
let
tree-sitter = emacsPackages.treesit-grammars.with-all-grammars;

init = trivialBuild {
pname = "config-init";
version = "1";
init = buildElispPackage {
ename = "config-init";

src = lib.sourceByRegex ./. [ "init.org" ];
files = [ "init.org" ];
lispFiles = [
"early-init.el"
"init.el"
];

inherit elispInputs;
nativeCompileAhead = true;
wantExtraOutputs = false;
errorOnWarn = true;
doTangle = false;

preBuild = ''
export HOME="$NIX_BUILD_TOP/.home"
mkdir -p "$HOME/.config/emacs"

emacs --batch --quick \
--load org \
*.org \
--funcall org-babel-tangle
'';

buildPhase = ''
runHook preBuild

export HOME="$(mktemp -d)"
rm *.org

mkdir -p "$HOME/.emacs.d"
ln -s ${tree-sitter}/lib "$HOME/.emacs.d/tree-sitter"

emacs --batch --quick \
--eval '(setq byte-compile-error-on-warn t)' \
--funcall batch-byte-compile \
*.el

runHook postBuild
ln -s ${tree-sitter}/lib "$HOME/.config/emacs/tree-sitter"
'';

# Temporary hack because the Emacs native load path is not respected.
fixupPhase = ''
if [ -d "$HOME/.emacs.d/eln-cache" ]; then
mv $HOME/.emacs.d/eln-cache/* $out/share/emacs/native-lisp
fi
'';
meta = { };
};
in
stdenv.mkDerivation {
Expand Down
75 changes: 34 additions & 41 deletions dev/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 24 additions & 24 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,14 @@
);

emacs-config = prev.callPackage inputs.self {
trivialBuild = final.emacsPackages.trivialBuild.override {
emacs = final.emacs-env.overrideScope (
_: tprev: { inherit (tprev.emacs) meta withNativeCompilation; }
);
buildElispPackage = (inputs.twist.lib.buildElispPackage final).override {
emacs = emacsPackage;
};

elispInputs = prev.lib.pipe final.emacs-env.elispPackages [
builtins.attrValues
(builtins.filter prev.lib.isDerivation)
];
};
}
)
Expand Down
7 changes: 4 additions & 3 deletions init.org
Original file line number Diff line number Diff line change
Expand Up @@ -1661,8 +1661,8 @@ Descriptive buffer names or project relative paths for buffer names.
(shell-mode-hook . epithet-rename-buffer)
:config
(defun epithet-relative-project-name ()
(when-let ((project (project-current))
(buffer-file-name (buffer-file-name)))
(when-let* ((project (project-current))
(buffer-file-name (buffer-file-name)))
(let* ((project-root (expand-file-name (project-root project)))
(prefix (file-name-directory (directory-file-name project-root)))
(buffer (expand-file-name buffer-file-name)))
Expand Down Expand Up @@ -2926,7 +2926,7 @@ Add faces to =outline-minor-mode= in order to make the headings stand out.
(defun clojure-repl ()
"Open a Clojure REPL."
(interactive)
(if-let ((repl-buffer (cider-current-repl)))
(if-let* ((repl-buffer (cider-current-repl)))
(pop-to-buffer repl-buffer)
(cider-jack-in-clj nil)))

Expand Down Expand Up @@ -3503,6 +3503,7 @@ Pretty check-boxes
(use-package racket-mode
:ensure t
:mode "\\.rkt[dl]?\\'"
:bind
(:map racket-mode-map
("M-g k" . racket-doc)
("C-. t" . racket-test))
Expand Down
Loading