AtlatestRepositorycore-channel
core-channel / tree / src / core / packageseditors.sgl
1
;;; Terminal editors.2
;;;3
;;; This is where the dependency model shows itself. A dependency is now a4
;;; SIBLING PACKAGE VALUE -- `dependencies: (list ncurses)` -- imported from5
;;; another channel module like any other binding. The sealed object records a6
;;; (name, package-identity) pair, and the engine turns that identity into a7
;;; realized output hash when, and only when, it constructs the build.8
;;;9
;;; What that replaced: `dependencies:` used to be a bare SHA-256 of an10
;;; already-realized output tree. It could not be computed without building,11
;;; nothing checked it was the output of the package it was named after, and it12
;;; differed on every machine and in every store root -- so publishing a13
;;; dependency tree meant a human transcribing hashes between topological14
;;; levels. The `(core outputs)` module that named those hashes is gone.15
(define-library (core packages editors)16
(import (sigil core)17
(core build-environments)18
(core packages compression)19
(core packages terminal)20
(core packages xml)21
(core packages databases)22
(core packages parsing)23
(sigil env package)24
(sigil build external))25
(export vim emacs)26
(begin27
(define vim28
(package29
name: "vim"30
version: "9.1.1164"31
source: (external-source32
location: "https://github.com/vim/vim/archive/refs/tags/v9.1.1164.tar.gz"33
sha256: "101526fa580d015edc5b5fb059d8b396cd8b05c29b0ec9ceb2a8763083293979")34
buildenv: core-buildenv35
;; ncurses' own `search-paths:` puts include/ncursesw on the compile36
;; path. vim does not have to know that layout, and neither does the37
;; builder any more.38
dependencies: (list ncurses)39
phases: (list40
(external-phase41
kind: 'configure42
args: (list "--prefix=${out}"43
"--with-features=normal"44
"--with-tlib=ncursesw"45
"--enable-multibyte"46
"--disable-gui"47
"--without-x"48
"--disable-gtk2-check"49
"--disable-gnome-check"50
"--disable-motif-check"51
"--disable-athena-check"52
"--disable-fontset"53
"--disable-acl"54
"--disable-gpm"55
"--disable-canberra"56
"--disable-libsodium"57
"--disable-selinux"58
"--disable-nls"59
"--disable-netbeans"60
"--with-compiledby=Sigil"))61
(external-phase62
kind: 'make63
args: (list "VIMRCLOC=${out}/share/vim"64
"VIMRUNTIMEDIR=${out}/share/vim/vim91"))65
(external-phase kind: 'install))))67
;; A terminal Emacs that is actually worth using, as opposed to the68
;; `emacs-nox` recipe in recipes/, which disabled essentially everything.69
;;70
;; Enabled here: ncurses, zlib decompression, libxml2 (shr/eww), sqlite371
;; (org-roam and friends), tree-sitter (*-ts-mode), and dynamic modules.72
;; JSON needs no dependency at all -- Emacs 30 has it in-tree at src/json.c,73
;; so jansson, which Guix still lists for emacs-no-x, is not a dependency of74
;; this version.75
;;76
;; Dependencies are DIRECT only; the engine computes the closure. Every77
;; package listed here happens to be a leaf today, so this list is both.78
;; When gnutls lands, its own module names nettle/gmp/libtasn1/libunistring/79
;; p11-kit and this list gains ONE entry, not six.80
;;81
;; Deliberately absent, decided rather than forgotten:82
;; * native compilation (libgccjit) -- means building GCC itself, which83
;; needs a multi-stage bootstrap and a per-package toolchain. The84
;; format can express both now; whether GCC bootstraps under `zig cc`85
;; is unmeasured, so it stays out until someone measures it.86
;; * gnutls and gpm -- not yet ported; these flags flip to --with-gnutls87
;; and --with-gpm once they land. NOTE that gnutls is also found via88
;; PKG_CHECK_MODULES, so any .pc in its Requires chain is exposed to the89
;; same seed pkgconf bug that libxml2 needed a patch for.90
(define emacs91
(package92
name: "emacs"93
version: "30.2"94
source: (external-source95
location: "https://ftp.gnu.org/gnu/emacs/emacs-30.2.tar.xz"96
sha256: "b3f36f18a6dd2715713370166257de2fae01f9d38cfe878ced9b1e6ded5befd9")97
buildenv: core-buildenv98
dependencies: (list ncurses zlib libxml2 sqlite tree-sitter)99
;; A portable dump is a memory image written once the build root is100
;; known. external-normalize-build-root! pads build-root strings inside101
;; outputs, but it cannot make a dump bit-identical across two runs, so102
;; the bounded allowance the original recipe carried still earns its103
;; place. It is a budget, not a blanket: anything outside *.pdmp, or104
;; more than 64 bytes inside it, is still a hard determinism failure.105
divergences: (list (external-divergence106
file-glob: "libexec/emacs/*/*.pdmp"107
max-differing-bytes: 64))108
phases: (list109
(external-phase110
kind: 'configure111
args: (list "--prefix=${out}"112
;; omit host name and build date from the113
;; binary; this channel cares about114
;; reproducibility more than about `M-x115
;; emacs-version` naming a machine116
"--disable-build-details"117
;; features we are deliberately turning ON118
"--with-tree-sitter"119
"--with-modules"120
;; This was --without-xml2 in the port, blocked121
;; by the seed's pkgconf aborting on libxml2's122
;; empty `Requires:` field. The channel patch123
;; in (core packages xml) deletes that field at124
;; its source, so detection runs for real again.125
"--with-xml2"126
;; no window system127
"--without-x"128
"--with-x-toolkit=no"129
"--without-xft"130
"--without-harfbuzz"131
"--without-libotf"132
"--without-m17n-flt"133
"--without-cairo"134
"--without-lcms2"135
"--without-gif"136
"--without-jpeg"137
"--without-png"138
"--without-rsvg"139
"--without-tiff"140
"--without-webp"141
"--without-xpm"142
;; no system integration we cannot pin143
"--without-dbus"144
"--without-gsettings"145
"--without-libsystemd"146
"--without-selinux"147
"--without-sound"148
;; not yet ported149
"--without-gnutls"150
"--without-gpm"151
;; movemail: no Kerberos/Hesiod/mailutils here152
"--without-pop"153
"--without-mailutils"))154
(external-phase kind: 'make)155
(external-phase kind: 'install))))))