chore: use devcontainer

This commit is contained in:
Tsiry Sandratraina
2023-07-06 13:06:01 +00:00
parent a8e3f0cb65
commit ae1a4acf2c
5 changed files with 61 additions and 5 deletions

View 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"
}

View File

@@ -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

View File

@@ -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

View File

@@ -1 +1 @@
v16.13.0
v18.16.0

View File

@@ -1 +1 @@
v16.13.0
v18.16.0