forked from FG42/FG42
Compare commits
7 Commits
400e275aaf
...
963dd42db4
Author | SHA1 | Date |
---|---|---|
pouya-abbassi | 963dd42db4 | |
Sameer Rahmani | 7b53b776ad | |
Sameer Rahmani | 6bdc0a5154 | |
Sameer Rahmani | ddcfc33717 | |
Sameer Rahmani | ec84355202 | |
Sameer Rahmani | 38986f37da | |
Sameer Rahmani | 7659a028f7 |
17
flake.nix
17
flake.nix
|
@ -42,7 +42,8 @@
|
||||||
noether = inputs.noether.outputs.packages.${system}.default;
|
noether = inputs.noether.outputs.packages.${system}.default;
|
||||||
factory = params: pkgs.callPackage ./nix/factory.nix ({ inherit noether; } // params);
|
factory = params: pkgs.callPackage ./nix/factory.nix ({ inherit noether; } // params);
|
||||||
default = (factory { });
|
default = (factory { });
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
packages = {
|
packages = {
|
||||||
default = default.fg42;
|
default = default.fg42;
|
||||||
} // (pkgs.lib.optionalAttrs (system == "x86_64-linux") {
|
} // (pkgs.lib.optionalAttrs (system == "x86_64-linux") {
|
||||||
|
@ -58,7 +59,21 @@
|
||||||
nativeBuildInputs = [ default.fg42 pkgs.fish test-x default.run-test-wm ];
|
nativeBuildInputs = [ default.fg42 pkgs.fish test-x default.run-test-wm ];
|
||||||
buildInputs = [ default.fg42 ];
|
buildInputs = [ default.fg42 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
apps.wm = {
|
||||||
|
type = "app";
|
||||||
|
program = "${default.run-test-wm}/bin/run-test-wm";
|
||||||
|
};
|
||||||
|
|
||||||
|
apps.x = {
|
||||||
|
type = "app";
|
||||||
|
program = "${test-x}/bin/test-x";
|
||||||
|
};
|
||||||
|
apps.default = {
|
||||||
|
type = "app";
|
||||||
|
program = "${default.fg42}/bin/fg42";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,8 @@
|
||||||
forge
|
forge
|
||||||
svg-tag-mode
|
svg-tag-mode
|
||||||
base16-theme
|
base16-theme
|
||||||
consult)
|
consult
|
||||||
|
nerd-icons-completion)
|
||||||
|
|
||||||
(provide 'fg42/deps)
|
(provide 'fg42/deps)
|
||||||
;;; deps.el ends here
|
;;; deps.el ends here
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
;; Language support
|
;; Language support
|
||||||
(require 'fg42/autocomplete)
|
(require 'fg42/autocomplete)
|
||||||
(require 'fg42/langs/langs)
|
(require 'fg42/langs/langs)
|
||||||
|
(require 'fg42/eglot)
|
||||||
(require 'fg42/langs/cpp)
|
(require 'fg42/langs/cpp)
|
||||||
(require 'fg42/langs/verilog)
|
(require 'fg42/langs/verilog)
|
||||||
(require 'fg42/langs/python)
|
(require 'fg42/langs/python)
|
||||||
|
@ -198,12 +199,6 @@ contextual information."
|
||||||
"Yasnippet's snippets."
|
"Yasnippet's snippets."
|
||||||
:after yasnippet)
|
:after yasnippet)
|
||||||
|
|
||||||
;; Language Servers and friends
|
|
||||||
(use! eglot
|
|
||||||
"Eglot is a minimalistic yet powerful LSP replacement
|
|
||||||
shipped with Emacs."
|
|
||||||
:commands eglot
|
|
||||||
:autoload eglot-ensure)
|
|
||||||
|
|
||||||
(use! flycheck
|
(use! flycheck
|
||||||
"Flycheck is a modern on-the-fly syntax checking extension for GNU Emacs."
|
"Flycheck is a modern on-the-fly syntax checking extension for GNU Emacs."
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*-
|
||||||
|
;;
|
||||||
|
;; Copyright (c) 2010-2024 Sameer Rahmani & Contributors
|
||||||
|
;;
|
||||||
|
;; Author: Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
;; URL: https://devheroes.codes/FG42/FG42
|
||||||
|
;; Version: 4.0.0
|
||||||
|
;;
|
||||||
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
;;
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
;;
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
;;
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
|
(eval-when-compile
|
||||||
|
(require 'fpkg))
|
||||||
|
|
||||||
|
|
||||||
|
;; Language Servers and friends
|
||||||
|
(use! eglot
|
||||||
|
"Eglot is a minimalistic yet powerful LSP replacement
|
||||||
|
shipped with Emacs."
|
||||||
|
:hook
|
||||||
|
(prog-mode . eglot-ensure)
|
||||||
|
(prog-mode . (lambda ()
|
||||||
|
(add-hook 'before-save-hook 'eglot-format nil t))))
|
||||||
|
|
||||||
|
|
||||||
|
(provide 'fg42/eglot)
|
||||||
|
;;; eglot.el ends here
|
|
@ -24,13 +24,26 @@
|
||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(require 'fpkg))
|
(require 'fpkg))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(use! nix-mode
|
(use! nix-mode
|
||||||
"Nix language support for Emacs."
|
"Nix language support for Emacs."
|
||||||
:mode "\\.nix\\'"
|
:mode "\\.nix\\'"
|
||||||
|
|
||||||
:hook
|
:hook
|
||||||
(nix-mode . eglot-ensure)
|
(nix-mode . eglot-ensure)
|
||||||
(nix-mode . company-mode)
|
(nix-mode . company-mode)
|
||||||
(nix-mode . flyspell-prog-mode))
|
(nix-mode . flyspell-prog-mode)
|
||||||
|
|
||||||
|
:init
|
||||||
|
:config
|
||||||
|
(with-eval-after-load 'eglot
|
||||||
|
;; Force nil to use nixpkgs-fmt for formatting
|
||||||
|
(let ((nil-lsp '(nix-mode . ("nil"
|
||||||
|
:initializationOptions
|
||||||
|
(:formatting (:command ["nixpkgs-fmt"]))))))
|
||||||
|
(add-to-list 'eglot-server-programs nil-lsp))))
|
||||||
|
|
||||||
|
|
||||||
(provide 'fg42/langs/nix)
|
(provide 'fg42/langs/nix)
|
||||||
;;; nix.el ends here
|
;;; nix.el ends here
|
||||||
|
|
|
@ -196,5 +196,14 @@ match all of the components in any order."
|
||||||
:bind (("M-g e" . consult-compile-error)))
|
:bind (("M-g e" . consult-compile-error)))
|
||||||
|
|
||||||
|
|
||||||
|
(use! nerd-icons-completion
|
||||||
|
"Nerd icons in marginalia"
|
||||||
|
:after marginalia
|
||||||
|
:config
|
||||||
|
(nerd-icons-completion-mode)
|
||||||
|
(add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(provide 'fg42/minibuffer)
|
(provide 'fg42/minibuffer)
|
||||||
;;; minibuffer.el ends here
|
;;; minibuffer.el ends here
|
||||||
|
|
|
@ -58,6 +58,7 @@ to Emacs modeline."
|
||||||
:commands noether-global-mode
|
:commands noether-global-mode
|
||||||
:config
|
:config
|
||||||
(require 'noether-views)
|
(require 'noether-views)
|
||||||
|
(require 'fg42/modeline/views)
|
||||||
|
|
||||||
(let ((active-border (get-base16-color-or :base0A "#bd93f9"))
|
(let ((active-border (get-base16-color-or :base0A "#bd93f9"))
|
||||||
(inactive-border (get-base16-color-or :base03 "#44475a")))
|
(inactive-border (get-base16-color-or :base03 "#44475a")))
|
||||||
|
@ -73,14 +74,11 @@ to Emacs modeline."
|
||||||
(if fg42/modeline-inactive-face fg42/modeline-inactive-face 'fg42/-disabled-modeline-dective-border)
|
(if fg42/modeline-inactive-face fg42/modeline-inactive-face 'fg42/-disabled-modeline-dective-border)
|
||||||
(default-value 'face-remapping-alist) face-remaps))
|
(default-value 'face-remapping-alist) face-remaps))
|
||||||
|
|
||||||
|
;; Setup modelines
|
||||||
(when-not-wm
|
(when-not-wm
|
||||||
(require 'fg42/modeline/views)
|
(setq-default noether-views (list fg42/modeline)))
|
||||||
|
|
||||||
(when-not-wm
|
|
||||||
(setq-default noether-views (list fg42/modeline))))
|
|
||||||
|
|
||||||
(when-wm
|
(when-wm
|
||||||
(setq-default noether-views (list fg42/minimal-exwm))))
|
(setq-default noether-views nil)))
|
||||||
|
|
||||||
(provide 'fg42/modeline)
|
(provide 'fg42/modeline)
|
||||||
;;; modeline.el ends here
|
;;; modeline.el ends here
|
||||||
|
|
|
@ -64,9 +64,12 @@
|
||||||
"Set the EXWM input mode for the current buffer."
|
"Set the EXWM input mode for the current buffer."
|
||||||
(setq fg42/-exwm-input-mode (format "%s" exwm--input-mode)))
|
(setq fg42/-exwm-input-mode (format "%s" exwm--input-mode)))
|
||||||
|
|
||||||
|
|
||||||
(defun fg42/-format-exwm-input-mode (_ v _ _)
|
(defun fg42/-format-exwm-input-mode (_ v _ _)
|
||||||
"Just return the input mode name V."
|
"Just return the input mode name V."
|
||||||
v)
|
(if (=string v "line")
|
||||||
|
(propertize "L" 'font-lock-face `(:foreground ,(get-base16-color-or :base07 "eeeeec")))
|
||||||
|
(propertize "C" 'font-lock-face `(:foreground ,(get-base16-color-or :base0A "eeeeec")))))
|
||||||
|
|
||||||
|
|
||||||
(noether-defunit fg42/exwm-input-mode-unit
|
(noether-defunit fg42/exwm-input-mode-unit
|
||||||
|
|
|
@ -31,6 +31,10 @@
|
||||||
"Keep the modeline at bottom right by using the data from INFO."
|
"Keep the modeline at bottom right by using the data from INFO."
|
||||||
(cons -1 -1))
|
(cons -1 -1))
|
||||||
|
|
||||||
|
(defun fg42/--bottom-right-padded (info)
|
||||||
|
"Keep the modeline at bottom right by using the data from INFO."
|
||||||
|
(cons -70 -1))
|
||||||
|
|
||||||
|
|
||||||
(defun fg42/adjust-modeline (view)
|
(defun fg42/adjust-modeline (view)
|
||||||
"Adjust the VIEW after parent frame resize."
|
"Adjust the VIEW after parent frame resize."
|
||||||
|
@ -58,7 +62,6 @@
|
||||||
(buffer-name-unit
|
(buffer-name-unit
|
||||||
:label (format "%s " (nerd-icons-codicon "nf-cod-layers"))
|
:label (format "%s " (nerd-icons-codicon "nf-cod-layers"))
|
||||||
:len 20)
|
:len 20)
|
||||||
;; (mode-name-unit :label " " :len 4)
|
|
||||||
(projectile-project-unit
|
(projectile-project-unit
|
||||||
:label (format "%s " (nerd-icons-octicon "nf-oct-project"))
|
:label (format "%s " (nerd-icons-octicon "nf-oct-project"))
|
||||||
:len 20)
|
:len 20)
|
||||||
|
@ -66,31 +69,33 @@
|
||||||
:label (format "%s " (nerd-icons-devicon "nf-dev-git_branch"))
|
:label (format "%s " (nerd-icons-devicon "nf-dev-git_branch"))
|
||||||
:len 20)
|
:len 20)
|
||||||
(fg42/mode-icon)
|
(fg42/mode-icon)
|
||||||
(line-unit :label (format "%s " (nerd-icons-codicon "nf-cod-location")))))
|
(line-unit :label (format "%s " (nerd-icons-codicon "nf-cod-location")))
|
||||||
|
(time-unit :label (format " %s " (nerd-icons-mdicon "nf-md-clock_time_three")))))
|
||||||
|
|
||||||
|
|
||||||
(when-wm
|
|
||||||
(noether-defview fg42/minimal-exwm
|
(noether-defview fg42/minimal-exwm
|
||||||
"A super simple bar containing the line number and column number that
|
"A super simple bar containing the line number and column number that
|
||||||
Appears on the center of the current window."
|
Appears on the center of the current window."
|
||||||
:managed? t
|
:managed? t
|
||||||
:buffer "*exwm-status*"
|
:buffer "*exwm-status*"
|
||||||
:binding (kbd "C-c 3")
|
:binding (kbd "C-c 1")
|
||||||
:separator " | "
|
:separator " | "
|
||||||
|
|
||||||
|
:timeout 10
|
||||||
:frame
|
:frame
|
||||||
(list
|
(list
|
||||||
;; Such a big numbers for X and Y will cause the frame to appear on the
|
:poshandler #'fg42/--bottom-right-padded
|
||||||
;; bottom right corner and covering the minibuffer
|
|
||||||
:position '(-30 . -1)
|
|
||||||
:border-width 0
|
:border-width 0
|
||||||
:timeout 5
|
|
||||||
:border-color "#bd93f9")
|
:border-color "#bd93f9")
|
||||||
|
|
||||||
:units
|
:units
|
||||||
(list
|
(list
|
||||||
(fg42/exwm-input-mode-unit :label "")
|
(fg42/exwm-input-mode-unit :label (format "%s " (nerd-icons-faicon "nf-fa-linux")))
|
||||||
(buffer-name-unit :label "")
|
(buffer-name-unit
|
||||||
(time-unit :label ""))))
|
:label (format "%s " (nerd-icons-codicon "nf-cod-layers"))
|
||||||
|
:len 30)
|
||||||
|
|
||||||
|
(time-unit :label (format "%s " (nerd-icons-mdicon "nf-md-clock_time_three")))))
|
||||||
|
|
||||||
|
|
||||||
(provide 'fg42/modeline/views)
|
(provide 'fg42/modeline/views)
|
||||||
|
|
|
@ -13,14 +13,15 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
{ pkgs, lib, elispDepsFile }:
|
{ pkgs, lib, elispDepsFile }:
|
||||||
with builtins;
|
with builtins;
|
||||||
let
|
let
|
||||||
reader = import ./elisp_reader.nix { inherit lib; };
|
reader = import ./elisp_reader.nix { inherit lib; };
|
||||||
elispAst = reader.fromElisp (builtins.readFile elispDepsFile);
|
elispAst = reader.fromElisp (builtins.readFile elispDepsFile);
|
||||||
dependsOnForm = filter (x: head x == "depends-on") elispAst;
|
dependsOnForm = filter (x: head x == "depends-on") elispAst;
|
||||||
elispPkgs = if length dependsOnForm == 0
|
elispPkgs =
|
||||||
|
if length dependsOnForm == 0
|
||||||
then throw "Can't find the form 'depends-on' on 'deps.el'"
|
then throw "Can't find the form 'depends-on' on 'deps.el'"
|
||||||
else tail (head dependsOnForm);
|
else tail (head dependsOnForm);
|
||||||
in elispPkgs
|
in
|
||||||
|
elispPkgs
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Fg42 - Emacs Editor for advance users
|
|
||||||
#
|
|
||||||
# Copyright (c) 2010-2024 Sameer Rahmani <lxsameer@gnu.org>
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, version 2.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
{ pkgs, fg42, version }:
|
|
||||||
{
|
|
||||||
desktop = pkgs.writeText "FG42.desktop" ''
|
|
||||||
[Desktop Entry]
|
|
||||||
Encoding=UTF-8
|
|
||||||
Name=FG42
|
|
||||||
GenericName=FG42
|
|
||||||
Comment=Emacs Editor for advance users
|
|
||||||
MimeType=text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-java;application/x-shellscript;text/x-c;text/x-c++;text/x-ruby;text/x-python;text/x-clojure;text/css;text/html;text/x-javascript;
|
|
||||||
Type=Application
|
|
||||||
Terminal=false
|
|
||||||
Categories=Development;TextEditor;
|
|
||||||
StartupWMClass=FG42
|
|
||||||
Exec=${fg42} %F
|
|
||||||
Icon=fg42
|
|
||||||
Version=${version}
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -73,7 +73,8 @@ let
|
||||||
matchSymbol =
|
matchSymbol =
|
||||||
let
|
let
|
||||||
symbolChar = ''([^${notInSymbol}]|\\.)'';
|
symbolChar = ''([^${notInSymbol}]|\\.)'';
|
||||||
in mkMatcher ''(${symbolChar}+)([${notInSymbol}]|$).*'' symbolMaxLength;
|
in
|
||||||
|
mkMatcher ''(${symbolChar}+)([${notInSymbol}]|$).*'' symbolMaxLength;
|
||||||
|
|
||||||
maxTokenLength = foldl' max 0 [
|
maxTokenLength = foldl' max 0 [
|
||||||
commentMaxLength
|
commentMaxLength
|
||||||
|
@ -291,7 +292,8 @@ let
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw "Unrecognized token on line ${toString state.line}: ${rest}";
|
throw "Unrecognized token on line ${toString state.line}: ${rest}";
|
||||||
in (builtins.foldl' readToken { acc = []; pos = 0; skip = 0; line = startLineNumber; mod = 0; } (stringToCharacters elisp)).acc;
|
in
|
||||||
|
(builtins.foldl' readToken { acc = [ ]; pos = 0; skip = 0; line = startLineNumber; mod = 0; } (stringToCharacters elisp)).acc;
|
||||||
|
|
||||||
tokenizeElisp = elisp:
|
tokenizeElisp = elisp:
|
||||||
tokenizeElisp' { inherit elisp; };
|
tokenizeElisp' { inherit elisp; };
|
||||||
|
@ -302,7 +304,8 @@ let
|
||||||
# Convert literal value tokens in a flat list to their
|
# Convert literal value tokens in a flat list to their
|
||||||
# corresponding nix representation.
|
# corresponding nix representation.
|
||||||
parseValues = tokens:
|
parseValues = tokens:
|
||||||
map (token:
|
map
|
||||||
|
(token:
|
||||||
if token.type == "string" then
|
if token.type == "string" then
|
||||||
token // {
|
token // {
|
||||||
value = substring 1 (stringLength token.value - 2) token.value;
|
value = substring 1 (stringLength token.value - 2) token.value;
|
||||||
|
@ -336,7 +339,8 @@ let
|
||||||
token
|
token
|
||||||
else
|
else
|
||||||
token
|
token
|
||||||
) tokens;
|
)
|
||||||
|
tokens;
|
||||||
|
|
||||||
# Convert pairs of opening and closing tokens to their
|
# Convert pairs of opening and closing tokens to their
|
||||||
# respective collection types, i.e. lists and vectors. Also,
|
# respective collection types, i.e. lists and vectors. Also,
|
||||||
|
@ -434,12 +438,14 @@ let
|
||||||
throw ''"Dotted pair notation"-dot outside list on line ${toString token.line}''
|
throw ''"Dotted pair notation"-dot outside list on line ${toString token.line}''
|
||||||
else if isList token.value then
|
else if isList token.value then
|
||||||
let
|
let
|
||||||
collectionContents = foldl' parseToken {
|
collectionContents = foldl' parseToken
|
||||||
|
{
|
||||||
acc = [ ];
|
acc = [ ];
|
||||||
dotted = false;
|
dotted = false;
|
||||||
inList = token.type == "list";
|
inList = token.type == "list";
|
||||||
inherit (state) depthReduction;
|
inherit (state) depthReduction;
|
||||||
} token.value;
|
}
|
||||||
|
token.value;
|
||||||
in
|
in
|
||||||
state // {
|
state // {
|
||||||
acc = state.acc ++ (
|
acc = state.acc ++ (
|
||||||
|
@ -630,7 +636,8 @@ let
|
||||||
flags =
|
flags =
|
||||||
(foldl'
|
(foldl'
|
||||||
parseFlag
|
parseFlag
|
||||||
{ acc = state.block.flags;
|
{
|
||||||
|
acc = state.block.flags;
|
||||||
flag = null;
|
flag = null;
|
||||||
inherit (state) line;
|
inherit (state) line;
|
||||||
}
|
}
|
||||||
|
@ -683,7 +690,8 @@ let
|
||||||
in
|
in
|
||||||
(foldl'
|
(foldl'
|
||||||
parseToken
|
parseToken
|
||||||
{ acc = [];
|
{
|
||||||
|
acc = [ ];
|
||||||
mod = 0;
|
mod = 0;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
skip = 0;
|
skip = 0;
|
||||||
|
|
|
@ -13,9 +13,14 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
{ lib, stdenv, emacs29, callPackage, writeShellApplication, noether
|
{ lib
|
||||||
, emacsParams ? {},
|
, stdenv
|
||||||
fg42Params ? {}
|
, emacs29
|
||||||
|
, callPackage
|
||||||
|
, writeShellApplication
|
||||||
|
, noether
|
||||||
|
, emacsParams ? { }
|
||||||
|
, fg42Params ? { }
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
lemacs = emacs29.override ({
|
lemacs = emacs29.override ({
|
||||||
|
@ -47,4 +52,5 @@ let
|
||||||
DISPLAY=:1 ${fg42}/bin/fg42-wm
|
DISPLAY=:1 ${fg42}/bin/fg42-wm
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in { inherit fg42 run-test-wm; }
|
in
|
||||||
|
{ inherit fg42 run-test-wm; }
|
||||||
|
|
66
nix/fg42.nix
66
nix/fg42.nix
|
@ -13,22 +13,49 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
{ lib, stdenv, elispPkgs, srcDir, emacsPackagesFor, ourPackages, direnv
|
{ lib
|
||||||
, makeFontsConf, nix
|
, stdenv
|
||||||
|
, elispPkgs
|
||||||
, nil, # nix lsp server
|
, srcDir
|
||||||
|
, emacsPackagesFor
|
||||||
|
, ourPackages
|
||||||
|
, direnv
|
||||||
|
, makeFontsConf
|
||||||
|
, nix
|
||||||
|
, nixpkgs-fmt
|
||||||
|
, nil
|
||||||
|
, # nix lsp server
|
||||||
|
|
||||||
# python deps
|
# python deps
|
||||||
python311, python3Packages,
|
python311
|
||||||
# This is a set of system tools required for FG42
|
, python3Packages
|
||||||
|
, # This is a set of system tools required for FG42
|
||||||
# to work.
|
# to work.
|
||||||
pyright, emacs, ripgrep, git, texinfo, vazir-fonts, fira-code, nerdfonts
|
pyright
|
||||||
, fira-mono, noto-fonts, gcc, ltex-ls, bash, tree-sitter, fd
|
, emacs
|
||||||
, aspellWithDicts,
|
, ripgrep
|
||||||
|
, git
|
||||||
supportWM ? true, xorg, slock,
|
, texinfo
|
||||||
|
, vazir-fonts
|
||||||
supportPython ? true, supportVerilog ? true, svls, verilator, }:
|
, fira-code
|
||||||
|
, nerdfonts
|
||||||
|
, fira-mono
|
||||||
|
, noto-fonts
|
||||||
|
, gcc
|
||||||
|
, ltex-ls
|
||||||
|
, bash
|
||||||
|
, tree-sitter
|
||||||
|
, fd
|
||||||
|
, aspellWithDicts
|
||||||
|
, supportWM ? true
|
||||||
|
, xorg
|
||||||
|
, slock
|
||||||
|
, supportPython ? true
|
||||||
|
, supportVerilog ? true
|
||||||
|
, svls
|
||||||
|
, verilator
|
||||||
|
,
|
||||||
|
}:
|
||||||
with builtins;
|
with builtins;
|
||||||
let
|
let
|
||||||
version = "4.0.0";
|
version = "4.0.0";
|
||||||
|
@ -44,7 +71,15 @@ let
|
||||||
dicts = aspellWithDicts (dicts: with dicts; [ en en-computers en-science ]);
|
dicts = aspellWithDicts (dicts: with dicts; [ en en-computers en-science ]);
|
||||||
|
|
||||||
runtimeBins = [
|
runtimeBins = [
|
||||||
ripgrep git tree-sitter direnv nix nil dicts fd
|
ripgrep
|
||||||
|
git
|
||||||
|
tree-sitter
|
||||||
|
direnv
|
||||||
|
nix
|
||||||
|
nil
|
||||||
|
dicts
|
||||||
|
fd
|
||||||
|
nixpkgs-fmt
|
||||||
]
|
]
|
||||||
++ (lib.optional (!stdenv.buildPlatform.isRiscV) [
|
++ (lib.optional (!stdenv.buildPlatform.isRiscV) [
|
||||||
# Not supported on Risc-V
|
# Not supported on Risc-V
|
||||||
|
@ -84,7 +119,8 @@ let
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
in stdenv.mkDerivation (final: rec {
|
in
|
||||||
|
stdenv.mkDerivation (final: rec {
|
||||||
inherit version;
|
inherit version;
|
||||||
pname = "fg42";
|
pname = "fg42";
|
||||||
src = srcDir;
|
src = srcDir;
|
||||||
|
|
|
@ -22,8 +22,8 @@ let
|
||||||
(x: builtins.typeOf x == "string")
|
(x: builtins.typeOf x == "string")
|
||||||
(builtins.split _sep _s);
|
(builtins.split _sep _s);
|
||||||
|
|
||||||
in {
|
in
|
||||||
elispStr
|
{ elispStr
|
||||||
, alwaysEnsure ? false
|
, alwaysEnsure ? false
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -94,4 +94,5 @@ in {
|
||||||
map recurse item
|
map recurse item
|
||||||
else
|
else
|
||||||
[ ];
|
[ ];
|
||||||
in lib.flatten (map recurse (readFunction elispStr))
|
in
|
||||||
|
lib.flatten (map recurse (readFunction elispStr))
|
||||||
|
|
Loading…
Reference in New Issue