From cedecc54b96a7fd477671727a78de9ad4b538463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sat, 2 Oct 2021 11:06:08 +0200 Subject: [PATCH] Build alacritty on ubuntu --- playbook.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/playbook.yml b/playbook.yml index 4b2e3c2..a9dee3b 100644 --- a/playbook.yml +++ b/playbook.yml @@ -355,6 +355,51 @@ - distro == 'archlinux' - machine.gpu is defined and machine.gpu == 'amd' + - block: + - name: install alacritty build dependencies + package: + state: present + # https://github.com/alacritty/alacritty/blob/master/INSTALL.md#debianubuntu + name: + - cmake + - pkg-config + - libfreetype6-dev + - libfontconfig1-dev + - libxcb-xfixes0-dev + - libxkbcommon-dev + - python3 + become: true + + - name: stat alacritty binary + stat: + path: /usr/local/bin/alacritty + register: alacritty_binary + + - name: create temporary directory for alacritty build + tempfile: + state: directory + register: alacritty_build_tempdir + when: not alacritty_binary.stat.exists + + - name: build alacritty + command: cargo install alacritty --root ./out + args: + chdir: "{{ alacritty_build_tempdir.path }}" + when: not alacritty_binary.stat.exists + + - name: install alacritty + command: mv "{{ alacritty_build_tempdir.path }}/out/bin/alacritty" /usr/local/bin/alacritty + become: true + when: not alacritty_binary.stat.exists + + - name: clean up build directory + file: + path: "{{ alacritty_build_tempdir.path }}" + state: absent + when: not alacritty_binary.stat.exists + + when: distro == 'ubuntu' + tags: [alacritty] - name: create dotfiles group group: