Experimentes with EAF

This commit is contained in:
Andrea Ciceri 2024-05-30 20:26:39 +02:00
parent 08d4bdc74f
commit 9263b2b334
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
2 changed files with 46 additions and 10 deletions

View file

@ -20,12 +20,15 @@ let
# TODO: Package nodejs environment
pythonEnv = ((python3.withPackages(ps: [
ps.pyqtwebengine
ps.pyqt5
# ps.pyqtwebengine
ps.pyqt6
ps.pyqt6-webengine
ps.qrcode
ps.qtconsole
ps.retry
ps.pymupdf
ps.sexpdata
ps.epc
# Wrap native dependencies in python env $PATH
pkgs.aria2
])).override { ignoreCollisions = true; });
@ -35,6 +38,27 @@ let
pname = "eaf";
version = "20210309.0";
eaf-terminal = fetchFromGitHub {
owner = "emacs-eaf";
repo = "eaf-terminal";
rev = "b7ddb82baf9604cb52a83d6e0631e6a5edc415b1";
hash = "sha256-4TRIAcReJs9a91DMKD+puApmSstxYLgLHV300GFDufQ=";
};
eaf-browser = fetchFromGitHub {
owner = "emacs-eaf";
repo = "eaf-browser";
rev = "9761f7bd22aa69f144a0a032643b0834dde6cb60";
hash = "sha256-jcCn16lXqcq1UcekekJiTfRBjjgaY0Hkz69ycElSzuA=";
};
eaf-pdf-viewer = fetchFromGitHub {
owner = "emacs-eaf";
repo = "eaf-pdf-viewer";
rev = "0b79e9000551200b6a0d2206de14b87d9ed3c9c9";
hash = "sha256-Co5RWWI0OC1w5JrCVpbwafuEEluh48JDzkMQp5QdIbE=";
};
in melpaBuild {
inherit pname version;
@ -42,15 +66,25 @@ in melpaBuild {
src = fetchFromGitHub {
owner = "emacs-eaf";
repo = "emacs-application-framework";
rev = "d55fef029d9a8fa529d2290f2da178dc8ff3d6f7";
sha256 = "sha256-0UGeo4I4JB95A8W870x4IS6Syh6roMomjTTNQNGbS3E";
rev = "9bf8caba36e27fafcef5d8e68969a1a8eb5432ed";
sha256 = "sha256-4CPhEO4d66GzD3vOcNyRl6DmRDYiiIeRhX/9RUPZ+PM=";
};
dontConfigure = true;
dontBuild = true;
postPatch = ''
substituteInPlace eaf.el \
--replace '"xdotool' '"${xdotool}/bin/xdotool' \
--replace '"wmctrl' '"${wmctrl}'
sed -i s#'defcustom eaf-python-command .*'#'defcustom eaf-python-command "${pythonEnv.interpreter}"'# eaf.el
mkdir app
cp -r ${eaf-terminal} app/terminal
cp -r ${eaf-pdf-viewer} app/pdf-viewer
cp -r ${eaf-browser} app/browser
substituteInPlace app/terminal/buffer.py --replace-warn \
'"node"' \
'"${node}"'
'';
installPhase = ''
@ -60,7 +94,7 @@ in melpaBuild {
recipe = writeText "recipe" ''
(eaf
:repo "manateelazycat/emacs-application-framework"
:repo "emacs-eaf/emacs-application-framework"
:fetcher github
:files ("*")
'';

View file

@ -107,7 +107,9 @@ in
mainPackages
++ (builtins.attrValues extraPackages)
# Playing with EAF
++ [(pkgs.callPackage ./eaf.nix {
inherit (epkgs) melpaBuild;
inherit (melpaPackages) ctable deferred epc s;
})]
++ [
(pkgs.callPackage ./eaf.nix {
inherit (epkgs) melpaBuild;
inherit (melpaPackages) ctable deferred epc s;
})
]