fix: install coreutils for sed in NixOS container
The node-pre-gyp and prebuild-install wrapper scripts require sed, which is not in PATH in the NixOS base container. Install coreutils first to provide sed, dirname, basename, and other core utilities needed by native module post-install scripts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c78a9618f8
commit
47bfbb278a
+4
-6
@@ -4,14 +4,12 @@ SHELL ["/bin/sh", "-c"]
|
|||||||
|
|
||||||
ENV NIX_CONFIG="experimental-features = nix-command flakes"
|
ENV NIX_CONFIG="experimental-features = nix-command flakes"
|
||||||
|
|
||||||
# Install packages one at a time to avoid file conflicts in nix profile.
|
# Install the system tools needed for native module post-install scripts.
|
||||||
# When installing multiple packages simultaneously, nix may resolve
|
# Note: NixOS base image does NOT include coreutils (sed, etc.) in PATH.
|
||||||
# different versions of shared dependencies (e.g., cacert 3.123 vs 3.117)
|
# The node-pre-gyp and prebuild-install wrappers require sed.
|
||||||
# which causes "An existing package already provides" errors.
|
|
||||||
# We install the big packages first (which pull their own cacert),
|
|
||||||
# then install standalone cacert last to upgrade, using --allow-import.
|
|
||||||
ARG NIXPKGS_COMMIT=64c08a7ca051951c8eae34e3e3cb1e202fe36786
|
ARG NIXPKGS_COMMIT=64c08a7ca051951c8eae34e3e3cb1e202fe36786
|
||||||
|
|
||||||
|
RUN nix profile add "github:NixOS/nixpkgs/${NIXPKGS_COMMIT}#coreutils"
|
||||||
RUN nix profile add "github:NixOS/nixpkgs/${NIXPKGS_COMMIT}#nodejs_22"
|
RUN nix profile add "github:NixOS/nixpkgs/${NIXPKGS_COMMIT}#nodejs_22"
|
||||||
RUN nix profile add "github:NixOS/nixpkgs/${NIXPKGS_COMMIT}#ffmpeg"
|
RUN nix profile add "github:NixOS/nixpkgs/${NIXPKGS_COMMIT}#ffmpeg"
|
||||||
RUN nix profile add "github:NixOS/nixpkgs/${NIXPKGS_COMMIT}#python3"
|
RUN nix profile add "github:NixOS/nixpkgs/${NIXPKGS_COMMIT}#python3"
|
||||||
|
|||||||
Reference in New Issue
Block a user