documenting archive, adding zig helper

This commit is contained in:
2026-03-20 17:51:22 -06:00
parent 2d65e01f7b
commit 4a638d9dcc
3 changed files with 50 additions and 2 deletions

View File

@@ -1,4 +1,11 @@
# vim: set filetype=yaml.ansible :
#
## Helpers: archive.yml
## Description: extract and symlink archives
## Variables: dict of key:value pairs
## extract_to: path to extract archive to
## name: filename of the archive
## url: download url of the archive
---
- name: Ensure requirements met
when:

27
tasks/helpers/zig.yml Normal file
View File

@@ -0,0 +1,27 @@
# vim : set filetype=yaml.ansible :
#
## Helper: zig.yml
## Description: build and install zig based packages
## Variables: dict of key:value pairs
## source_path: Destination path when cloning/extracting
## git: passed into helpers/git.yml if present. See that for required dict keys
## archive: passed into helpers/archive.yml to extract if present. See that for required dict keys
## prefix: install prefix
## flags: flags to pass to zig build
---
- name: Clone git repository if it exists
when:
- pkg.git is defined
vars:
path: "{{ pkg.source_path }}"
repo: "{{ pkg.git.repo }}"
depth: "{{ pkg.git.depth | default(omit) }}"
force: "{{ pkg.git.force | default(omit) }}"
recursive: "{{ pkg.git.recursive | default(omit) }}"
version: "{{ pkg.version | default(omit) }}"
ansible.builtin.include_tasks: helpers/git.yml
- name: Download and extract source archive
when:
- pkg.archive is defined
ansible.bulitin.include_tasks: helpers/archive.yml

View File

@@ -93,6 +93,8 @@
methods: "{{ ghostty[distribution].methods | default(_methods['default']) }}"
source_url: "{{ ghostty.base_url }}/{{ ghostty.version }}/ghostty-{{ ghostty.version }}.tar.gz"
pkg_deps: "{{ ghostty[distribution].pkg_deps | default(omit) }}"
build_deps: "{{ ghostty[distribution].build_deps | default(ghostty.default.build_deps) }}"
- name: Configure ghostty
block:
- name: Set ghostty install method
@@ -105,11 +107,23 @@
when:
- ghostty_imethod == 'source'
block:
- name: Append ghostty to pkg_src
- name: Add ghostty package dependencies
when:
- ghostty.pkg_deps is defined
- ghostty.pkg_deps|length > 0
loop: "{{ ghostty.pkg_deps }}"
loop_control:
loop_var: dep
ansible.bulitin.include_tasks: pkgs/{{ dep }}.yml
- name: Add ghostty system dependencies
ansible.builtin.set_fact:
pkg_src: "{{ pkg_src + ghostty.pkg }}"
pkg_sys: "{{ pkg_sys + ghostty.build_deps }}"
- name: Configure ghostty zig install
ansible.builtin.set_fact:
- name: Configure ghostty appimage install
when:
- ghostty_imethod == 'appimage'