ive been using guix for a while i want to build a package from scratch called emacs-all-the-icons-ivy-rich, how can i do that?
All packages are created by initializing a package record. You can read more about how to define a package in general on the Defining Packages documentation page for guix.
For emacs packages specifically, you should probably use the emacs-build-system defined in (gnu build-system emacs) as your build-system for your package (see above documentation for explanation on the build-system field for a package). You can see lots of examples of emacs packages defined in the (gnu packages emacs-xyz) module in the official guix repository.
thank you
because of you i manage to make my first own custom package
(define-module (config packages emacs-all-the-icons-ivy-rich)
#:use-module (guix packages)
#:use-module (guix git-download) ;; Necessário para git-reference e git-fetch
#:use-module (guix build-system emacs)
#:use-module (gnu packages)
#:use-module (gnu packages emacs)
#:use-module (gnu packages emacs-xyz) ;; Muitas deps de emacs estĂŁo aqui
#:use-module (guix licenses))
(define-public emacs-all-the-icons-ivy-rich
(package
(name “emacs-all-the-icons-ivy-rich”)
(version “v1.9.0”)
(source
(origin
(method git-fetch)
(uri (git-reference
(url “https://github.com/seagle0128/all-the-icons-ivy-rich.git”)
(commit version)))
;; file-name deve estar FORA do git-reference, mas DENTRO do origin
(file-name (git-file-name name version))
(sha256
(base32 “0xf6ra63ja2mz2aaf9qpn3fxbvk1s8k258amk1imc6y0ps6nhc2x”)))) ;; Usei um hash placeholder, você precisará atualizar se o anterior estava errado.
(build-system emacs-build-system)
(propagated-inputs
(list
emacs-all-the-icons
emacs-ivy-rich))
(native-inputs
(list emacs-minimal)) ;; Geralmente usa-se emacs-minimal para build
(home-page "https://github.com/seagle0128/all-the-icons-ivy-rich")
(synopsis "Display icons for ivy buffers in Emacs")
(description
"This package shows icons (when emacs-all-the-icons is installed)
and richer columns for ivy candidates by extending ivy-rich.")
(license gpl3+)))
emacs-all-the-icons-ivy-rich