PKG-KEYWORDS(5)

πŸ“¦ version 2.7.5, in nixos 26.05, nixpkgs unstable

πŸ’– NAME πŸ’–

Okay bestie, welcome to pkg-keywords(5) from the File Formats Manual β€” the page all about keywords, aka files that extend the number of keywords available for a plist. Literally the little glow-up pack for your plist keyword situation. πŸŽ€

✨ DESCRIPTION ✨

So pkg-create(8) and pkg-register(8) can parse a plist file, and that plist describes the content of a package that’s gonna be created/registered. The plist format itself is documented in the pkg-create(8) manpage, iykyk. πŸ¦‹

Keywords are files that extend the number of keywords available to a plist. Those files are in UCL format, no cap.

The format is the following:

🌈 Format fields 🌈

  • actions β€” array of actions that defines how to treat the argument(s) of the keywords. Valid actions are:
    • dir β€” consider the keyword’s argument as a directory and register it as such in the package.
    • file β€” consider the keyword’s argument as a regular file and register it as such in the package.
  • arguments β€” Boolean that tells pkg(8) whether it should parse the keyword’s argument or not. If true, then pkg(8) will split it using spaces as tokens and make the argument available to:
    • actions β€” any action will now accept a number that will represent the argument passed to the action via parenthesis.
    • shell and lua scripts β€” new variables will be available to scripts: %<number>.
  • attributes β€” attributes that can be set to a file or a directory depending on whether actions has been set. It takes precedence over the attributes that may have been set when calling the keyword. Attributes can be:
    • owner string β€” name of the owner of the file or directory.
    • group string β€” name of the group of the file or directory.
    • mode string β€” mode of the file or directory; this mode can be in octal or string form.
  • deprecated β€” Boolean to mark a keyword as deprecated. πŸ’€
  • deprecation_message β€” message to be shown if the keyword is used and marked as deprecated.
  • preformat_arguments β€” Boolean to activate preformatting the arguments of the keywords, respecting the escape sequences described below.
  • prepackaging β€” lua script that is executed at the packaging time. Useful for adding some input validation. 🧚
  • pre-install β€” shell script to be run during the pre-install phase. It will be merged with any existing pre-install scripts. The script will be formatted respecting the escape sequences described below.
  • post-install β€” shell script to be run during the post-install phase. It will be merged with any existing post-install scripts. The script will be formatted respecting the escape sequences described below.
  • pre-deinstall β€” shell script to be run during the pre-deinstall phase. It will be merged with any existing pre-deinstall scripts. The script will be formatted respecting the escape sequences described below.
  • post-deinstall β€” shell script to be run during the post-deinstall phase. It will be merged with any existing post-deinstall scripts. The script will be formatted respecting the escape sequences described below.
  • pre-install-lua β€” Lua script to be run during the pre-install phase. It will be appended with any existing array of lua pre-install scripts. The script will be formatted respecting the escape sequences described below.
  • post-install-lua β€” Lua script to be run during the post-install phase. It will be appended with any existing array of lua post-install scripts. The script will be formatted respecting the escape sequences described below.
  • pre-deinstall-lua β€” Lua script to be run during the pre-deinstall phase. It will be appended with any existing array of lua pre-deinstall scripts. The script will be formatted respecting the escape sequences described below.
  • post-deinstall-lua β€” Lua script to be run during the post-deinstall phase. It will be appended with any existing array of lua post-deinstall scripts. The script will be formatted respecting the escape sequences described below.
  • messages β€” array of test messages that can be passed to the users. Valid information by entry in the array is:
    • message string β€” actual message to be shown to the users.
    • type [upgrade | remove | install] β€” defines in which context the message should be shown to the users. If not set, the message will always be printed.

πŸŽ€ ESCAPE SEQUENCE πŸŽ€

If a line contains any of the following sequences somewhere in it, they will be expanded inline. For the following examples, assume that @cwd is set to /usr/local and the last extracted file was bin/emacs. 🌸

  • %F β€” expands to the last filename extracted (as specified), in the example case bin/emacs.
  • %D β€” expands to the current directory prefix, as set with @cwd, in the example case /usr/local.
  • %B β€” expands to the β€œbasename” of the fully qualified filename, that is the current directory prefix, plus the last filespec, minus the trailing filename. In the example case, that would be /usr/local/bin.
  • %f β€” expands to the filename part of the fully qualified name, or the converse of %B, being in the example case emacs.

πŸ¦‹ SEE ALSO πŸ¦‹

Go check these cuties out, bestie:

pkg_create(3), pkg_printf(3), pkg_repo_create(3), pkg_repos(3),
pkg-lua-script(5), pkg-repository(5), pkg-script(5), pkg-triggers(5),
pkg.conf(5), pkg(8), pkg-add(8), pkg-alias(8), pkg-annotate(8),
pkg-audit(8), pkg-autoremove(8), pkg-check(8), pkg-clean(8),
pkg-config(8), pkg-create(8), pkg-delete(8), pkg-fetch(8), pkg-help(8),
pkg-info(8), pkg-install(8), pkg-key(8), pkg-lock(8), pkg-plugins(8),
pkg-query(8), pkg-register(8), pkg-repo(8), pkg-repositories(8),
pkg-rquery(8), pkg-search(8), pkg-set(8), pkg-shell(8), pkg-shlib(8),
pkg-ssh(8), pkg-stats(8), pkg-triggers(8), pkg-unregister(8),
pkg-update(8), pkg-updating(8), pkg-upgrade(8), pkg-version(8),
pkg-which(8)

This page is from Debian, dated December 12, 2025 β€” love u, bye! πŸ’…πŸ«Ά

πŸ“¦ where this page comes from