diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..bdf41a91 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,35 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/rust +{ + "name": "Rust", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye", + "features": { + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/devcontainers/features/nix:1": {} + }, + + // Use 'mounts' to make the cargo cache persistent in a Docker Volume. + // "mounts": [ + // { + // "source": "devcontainer-cargo-cache-${devcontainerId}", + // "target": "/usr/local/cargo", + // "type": "volume" + // } + // ] + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "nix develop --experimental-features \"nix-command flakes\"" + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/README.md b/README.md index a9d66216..46231e1d 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,8 @@ Like [mpd](https://github.com/MusicPlayerDaemon/MPD) or [Mopidy](https://github. ## Installation +Compiling from source, without Nix: + ```bash # Install dependencies brew install protobuf # macOS @@ -65,20 +67,37 @@ choco install protoc # Windows using Chocolatey Package Manager git clone https://github.com/tsirysndr/music-player.git cd music-player/webui/musicplayer nvm install # install node version specified in .nvmrc (optional on windows) -npm install -g yarn -yarn install && yarn build # build webui +bun install && bun run build # build webui cd ../.. cargo install --path . ``` -Note: Don't forget to add `~/.cargo/bin` to your `PATH` environment variable. +With Nix: + +```bash +git clone https://github.com/tsirysndr/music-player.git +cd music-player +nix develop --experimental-features "nix-command flakes" +cd webui/musicplayer +bun install && bun run build # build webui +cd ../.. +cargo install --path . +``` ### macOS/Linux +Using [Homebrew](https://brew.sh/): + ```bash brew install tsirysndr/tap/musicplayer ``` +Using [Nix](https://nixos.org/): + +```bash +nix profile install --experimental-features "nix-command flakes" github:tsirysndr/music-player +``` + Or download the latest release for your platform [here](https://github.com/tsirysndr/music-player/releases). ## 📦 Downloads diff --git a/flake.nix b/flake.nix index a4f07993..672b314a 100644 --- a/flake.nix +++ b/flake.nix @@ -54,6 +54,8 @@ pkgs.gnumake pkgs.protobuf pkgs.zstd + pkgs.bun + pkgs.nodejs_18 ] ++ lib.optionals pkgs.stdenv.isDarwin [ # Additional darwin specific inputs can be set here pkgs.libiconv diff --git a/webui/chromecast/.nvmrc b/webui/chromecast/.nvmrc index ff650592..8ddbc0c6 100644 --- a/webui/chromecast/.nvmrc +++ b/webui/chromecast/.nvmrc @@ -1 +1 @@ -v16.13.0 +v18.16.0 diff --git a/webui/musicplayer/.nvmrc b/webui/musicplayer/.nvmrc index ff650592..8ddbc0c6 100644 --- a/webui/musicplayer/.nvmrc +++ b/webui/musicplayer/.nvmrc @@ -1 +1 @@ -v16.13.0 +v18.16.0