0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WSL2 で mise を使って k1LoW/deck の実行環境を構築

Last updated at Posted at 2025-09-28

はじめに

前回の記事 k1LoW/deck で Google Slides のプレゼン資料を作成では、WSL2 で k1LoW/deck を使って Google Slides のプレゼン資料を作成する際のいくつかのポイントを紹介しました。

今回は、mise を使って k1LoW/deck の実行環境を構築する手順を紹介します。

参考情報

前提条件

  • Windows 11 上の WSL で Ubuntu 23.04 を動かしている

mise のインストール

公式ドキュメントの GETTING STARTED に従って mise をインストールします。

sudo apt update -y && sudo apt install -y gpg sudo wget curl
sudo install -dm 755 /etc/apt/keyrings
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
sudo apt update
sudo apt install -y mise

mise を使うための設定を ~/.zshrc に追加します。

echo 'eval "$(mise activate zsh)"' >> ~/.zshrc

追加後、設定を反映します。

source ~/.zshrc

mise のバージョンを確認します。

 ❯  mise --version
              _                                        __
   ____ ___  (_)_______        ___  ____        ____  / /___ _________
  / __ `__ \/ / ___/ _ \______/ _ \/ __ \______/ __ \/ / __ `/ ___/ _ \
 / / / / / / (__  )  __/_____/  __/ / / /_____/ /_/ / / /_/ / /__/  __/
/_/ /_/ /_/_/____/\___/      \___/_/ /_/     / .___/_/\__,_/\___/\___/
                                            /_/                 by @jdx
2025.9.21 linux-x64 (2025-09-27)

各種ツールのインストール

deck を使うディレクトリに以下の mise.toml を作成し、各種ツールをインストールします。記事執筆当時 Silicon の最新バージョンは 0.5.2 ですが、そのバージョンではインストール時にエラーが発生したため 0.5.1 を指定しています。

mise.toml
[tools]
rust = "latest"
"cargo:silicon" = "0.5.1"
"go:github.com/k1LoW/deck/cmd/deck" = "latest"
"go:github.com/Songmu/laminate/cmd/laminate" = "latest"

以下のコマンドを実行し、mise.toml に指定したツールをインストールします。前回の記事 k1LoW/deck で Google Slides のプレゼン資料を作成で紹介したSiliconの依存パッケージを先にaptでインストールする必要があるかもしれません。

mise install

インストールされたツールの確認

以下のコマンドを実行し、インストールされたツールを確認します。今回インストールしたツールは、~/work/presentation/mise.toml に指定しています。

mise list

このように mise でインストールしたツールが表示されます。

Tool                                        Version           Source                         Requested
aws                                         2.31.3            ~/.config/mise/config.toml     latest
cargo:silicon                               0.5.1             ~/work/presentation/mise.toml  0.5.1
go:github.com/Songmu/laminate/cmd/laminate  0.0.4             ~/work/presentation/mise.toml  latest
go:github.com/k1LoW/deck/cmd/deck           1.21.5            ~/work/presentation/mise.toml  latest
rust                                        1.90.0 (symlink)  ~/work/presentation/mise.toml  latest
uv                                          0.8.22            ~/.config/mise/config.toml     latest

インストールしているツールのうち awsuv は ~/.config/mise/config.toml に指定したグローバル設定で、このように指定しています。

~/.config/mise/config.toml
[settings]
experimental = true
disable_backends = ["asdf", "vfox"]
idiomatic_version_file_enable_tools = ["python"]

[settings.pipx]
uvx = true

[tools]
aws = "latest"
# [Python]
uv = "latest"

インストール後の確認

deck --version
deck version 1.21.5 (rev:HEAD)

その他のパッケージ

前回の記事 k1LoW/deck で Google Slides のプレゼン資料を作成で紹介した、qrencodやImagemagickのインストールは別途必要です。

まとめ

mise を使って k1LoW/deck の実行環境を構築する手順を紹介しました。mise を使うことで、各種ツールをインストールする手順を簡略化できます。また、mise を使うことで、各種ツールのバージョンを管理できます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?