mirror of
https://github.com/tsirysndr/music-player.git
synced 2026-01-08 20:58:07 -05:00
chore: use devcontainer
This commit is contained in:
35
.devcontainer/devcontainer.json
Normal file
35
.devcontainer/devcontainer.json
Normal file
@@ -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"
|
||||
}
|
||||
25
README.md
25
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1 +1 @@
|
||||
v16.13.0
|
||||
v18.16.0
|
||||
|
||||
@@ -1 +1 @@
|
||||
v16.13.0
|
||||
v18.16.0
|
||||
|
||||
Reference in New Issue
Block a user