view .chezmoiscripts/run_onchange_after_17-install-mercurial.sh.tmpl @ 1092:6fb43864241b draft tip

feat: install mercurial using pipx
author Zeger Van de Vannet <zeger@vandevan.net>
date Thu, 08 May 2025 21:56:41 +0200
parents f27c3aa3233c
children
line wrap: on
line source

{{ $version := "7.0.2" -}}
{{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu")) -}}
#!/usr/bin/env -S ${HOME}/bin/mise exec [email protected] [email protected] -- bash
{{ else }}
#!/usr/bin/env bash
{{ end }}

set -xe

{{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu")) -}}
sudo apt install --yes clang rustc cargo python3-dev
{{ end }}

pipx install "mercurial=={{ $version }}" --pip-args '--no-cache-dir --config-settings --global-option=--rust --no-binary=mercurial'
pipx inject mercurial hg-evolve~=11.1.8 hg-git~=1.1.2 mercurial_keyring~=1.4.4