phx.new pipeline doesn't work under NixOS for reasons of tailwindcss cannot be downloaded and run
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- elixir, nixos, nodejs, tailwindcss
- 領域
- build-system, cli, tooling
調査の方向性
Start by tracing the mix phx.new --install path that downloads and runs Tailwind CSS, then compare it with the NixOS setup and system packages described in the issue. Determine whether a project option can select system-provided tailwindcss and watchman; done means a standard NixOS environment can create and run a Phoenix project without the dynamic-linker failure.
索引モデルが issue の本文から書いたものです。
説明
A standard NixOS installation development environment for elixir (using beamMinimal28Packages.elixir_1_19, but also tested with older versions) , does not allow tailwindcss to run when downloaded by mix phx.new --install :
mix phx.new tailwindfail --no-ecto --install
...
$ mix phx.server
Compiling 14 files (.ex)
Generated tailwindfail app
Could not start dynamically linked executable: /home/tbrowne/scratch/teste/tailwindfail/_build/tailwind-linux-x64
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
The fix is quite involved but does work:
https://discourse.nixos.org/t/cannot-run-tailwind-css-with-elixir-phoenix-1-8-project/69651/4
Can this be made smoother somehow? For example a mix option that would automatically configure the project to use system-provided nix packages tailwindcss and watchman?
For completeness, here's my nix develop flake that works with the above fix.
{
description = "A flake for building development environment of Phoenix project.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/master";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
with pkgs; {
devShells.default = mkShell {
buildInputs = [
beamMinimal28Packages.elixir_1_19
nodejs
tailwindcss_4
watchman
]
++ lib.optionals stdenv.isLinux [
# For ExUnit Notifier on Linux.
libnotify
# For file_system on Linux.
inotify-tools
]
++ lib.optionals stdenv.isDarwin ([
# For ExUnit Notifier on macOS.
terminal-notifier
# For file_system on macOS.
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.CoreServices
]);
shellHook = ''
# allows mix to work on the local directory
mkdir -p .nix-mix
mkdir -p .nix-hex
export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-hex
export ERL_LIBS=$HEX_HOME/lib/erlang/lib
# concats PATH
export PATH=$MIX_HOME/bin:$PATH
export PATH=$MIX_HOME/escripts:$PATH
export PATH=$HEX_HOME/bin:$PATH
# enables history for IEx
export ERL_AFLAGS="-kernel shell_history enabled -kernel shell_history_path '\"$PWD/.erlang-history\"'"
# Phoenix add phx.new if not already there
pattern=".nix-mix/archives/phx_new*"
files=$(compgen -G "$pattern")
if [ -z "$files" ]; then
mix archive.install hex phx_new
fi
'';
};
}
);
}
- 主要言語
- Elixir
- スター
- 23.2k
- フォーク
- 3.2k
- 平均マージ
- 16時間 35分
- マージ済み PR(30日)
- 18
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
phoenixframework/phoenix のほかの issue
-
Binary pushes don't work over the LongPoll transport対応中かも @mandar1045 が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
phoenixframework/phoenix#6906 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
phoenixframework/phoenix#6898 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
~p treats routes as static when they only start with a static directory name対応中かも @mandar1045 が 12 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
phoenixframework/phoenix#6895 ·
メンテナーはふだん 1 日以内に返信
-
Connection: close header not sent before closing HTTP 1.1 connection when a controller raises an exception対応中かも @javiergarea が 41 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
phoenixframework/phoenix#6859 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
phoenixframework/phoenix#6853 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
phoenixframework/phoenix の issue をすべて見る
似ている issue
-
Bug: Table layout and date column are cut off on mobile screens on the Tournaments -> History pageオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
hexlet-codebattle/codebattle#2375 ·
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
wintermeyer/vutuv#2388 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
Broadcast API docs say to prepend realtime: to the topic, which breaks delivery対応中かも @mandar1045 が 1 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
phoenixframework/phoenix_live_view#4509 ·
メンテナーはふだん 1 日以内に返信