phx.new pipeline doesn't work under NixOS for reasons of tailwindcss cannot be downloaded and run
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- elixir, nixos, nodejs, tailwindcss
- Área
- build-system, cli, tooling
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
'';
};
}
);
}
- Lenguaje dominante
- Elixir
- Estrellas
- 23.2k
- Forks
- 3.2k
- Merge medio
- 16 h 35 min
- PR fusionados (30 d)
- 18
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de phoenixframework/phoenix
-
Binary pushes don't work over the LongPoll transportPosiblemente ocupada @mandar1045 la tomó hace 1 día. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
phoenixframework/phoenix#6906 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
phoenixframework/phoenix#6898 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
~p treats routes as static when they only start with a static directory namePosiblemente ocupada @mandar1045 la tomó hace 12 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
phoenixframework/phoenix#6895 ·
Los mantenedores suelen responder en 1 día
-
Connection: close header not sent before closing HTTP 1.1 connection when a controller raises an exceptionPosiblemente ocupada @javiergarea la tomó hace 41 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
phoenixframework/phoenix#6859 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
phoenixframework/phoenix#6853 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de phoenixframework/phoenix
Issues similares
-
Bug: Table layout and date column are cut off on mobile screens on the Tournaments -> History pageAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
hexlet-codebattle/codebattle#2375 ·
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
wintermeyer/vutuv#2388 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Broadcast API docs say to prepend realtime: to the topic, which breaks deliveryPosiblemente ocupada @mandar1045 la tomó hace 1 día. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
phoenixframework/phoenix_live_view#4509 ·
Los mantenedores suelen responder en 1 día