added dev dependencies and aseprite to dev container
This commit is contained in:
@@ -27,7 +27,16 @@ function dev
|
|||||||
tldr \
|
tldr \
|
||||||
cheat \
|
cheat \
|
||||||
pv \
|
pv \
|
||||||
age
|
age \
|
||||||
|
libcxx-devel \
|
||||||
|
ninja-build \
|
||||||
|
unzip \
|
||||||
|
libX11-devel \
|
||||||
|
libXcursor-devel \
|
||||||
|
libXi-devel \
|
||||||
|
libXrandr-devel \
|
||||||
|
mesa-libGL-devel \
|
||||||
|
fontconfig-devel
|
||||||
|
|
||||||
if distrobox list --no-color | string match -q "*| $name *"
|
if distrobox list --no-color | string match -q "*| $name *"
|
||||||
distrobox enter $name
|
distrobox enter $name
|
||||||
|
|||||||
@@ -4,12 +4,15 @@ set -euo pipefail
|
|||||||
|
|
||||||
echo "Initializing development environment..."
|
echo "Initializing development environment..."
|
||||||
|
|
||||||
|
export DEV_HOME="$HOME"
|
||||||
|
export DEV_USER="$(basename "$DEV_HOME")"
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Rust directories
|
# Software directories
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
mkdir -p /opt/rustup /opt/cargo
|
mkdir -p /opt/rustup /opt/cargo /opt/aseprite
|
||||||
chown "$(id -u):$(id -g)" /opt/rustup /opt/cargo
|
chown "$DEV_USER:$DEV_USER" /opt/rustup /opt/cargo /opt/aseprite
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Fish configuration
|
# Fish configuration
|
||||||
@@ -40,32 +43,47 @@ curl \
|
|||||||
https://sh.rustup.rs \
|
https://sh.rustup.rs \
|
||||||
| sh -s -- -y --no-modify-path
|
| sh -s -- -y --no-modify-path
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Rust toolchain
|
# Rust toolchain
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
echo "Installing stable Rust toolchain..."
|
echo "Installing stable Rust toolchain..."
|
||||||
|
|
||||||
/opt/cargo/bin/rustup default stable
|
/opt/cargo/bin/rustup default stable
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Fish completions
|
# Fish completions
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
echo "Installing rustup Fish completion..."
|
echo "Installing rustup Fish completion..."
|
||||||
|
|
||||||
/opt/cargo/bin/rustup completions fish \
|
/opt/cargo/bin/rustup completions fish \
|
||||||
| tee /etc/fish/completions/rustup.fish >/dev/null
|
| tee /etc/fish/completions/rustup.fish >/dev/null
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Export Rust development tools to the host
|
# Aseprite
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
echo "Building Aseprite..."
|
||||||
|
git clone --recursive https://github.com/aseprite/aseprite.git /opt/aseprite
|
||||||
|
cd /opt/aseprite
|
||||||
|
./build.sh --auto --norun
|
||||||
|
|
||||||
|
echo "Creating Aseprite desktop entry..."
|
||||||
|
cat > /opt/aseprite/aseprite.desktop <<'EOF'
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Aseprite
|
||||||
|
Comment=Animated sprite editor
|
||||||
|
Exec=/opt/aseprite/build/bin/aseprite %F
|
||||||
|
Icon=/opt/aseprite/build/bin/data/icons/ase.ico
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Graphics;2DGraphics;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Exporting Aseprite desktop entry..."
|
||||||
|
sudo -u "$DEV_USER" env HOME="$DEV_HOME" distrobox-export --app /opt/aseprite/aseprite.desktop
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Export development tools to the host
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
export PATH="/opt/cargo/bin:$PATH"
|
export PATH="/opt/cargo/bin:$PATH"
|
||||||
echo "Exporting development tools..."
|
echo "Exporting development tools..."
|
||||||
|
|
||||||
DEV_HOME="$HOME"
|
|
||||||
DEV_USER="$(basename "$DEV_HOME")"
|
|
||||||
|
|
||||||
export_bin() {
|
export_bin() {
|
||||||
local binary="$1"
|
local binary="$1"
|
||||||
|
|
||||||
@@ -105,6 +123,7 @@ done
|
|||||||
export_bin clang
|
export_bin clang
|
||||||
export_bin clang++
|
export_bin clang++
|
||||||
export_bin cmake
|
export_bin cmake
|
||||||
|
export_bin ninja
|
||||||
export_bin lld
|
export_bin lld
|
||||||
export_bin ld.lld
|
export_bin ld.lld
|
||||||
export_bin gdb
|
export_bin gdb
|
||||||
|
|||||||
Reference in New Issue
Block a user