Skip to content

Commit 4380f66

Browse files
authored
Merge pull request #171 from tsirysndr/chore/devcontainer
chore: use devcontainer
2 parents 3f516fe + ae1a4ac commit 4380f66

File tree

5 files changed

+61
-5
lines changed

5 files changed

+61
-5
lines changed

.devcontainer/devcontainer.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
3+
{
4+
"name": "Rust",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye",
7+
"features": {
8+
"ghcr.io/devcontainers/features/github-cli:1": {},
9+
"ghcr.io/devcontainers/features/nix:1": {}
10+
},
11+
12+
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
13+
// "mounts": [
14+
// {
15+
// "source": "devcontainer-cargo-cache-${devcontainerId}",
16+
// "target": "/usr/local/cargo",
17+
// "type": "volume"
18+
// }
19+
// ]
20+
21+
// Features to add to the dev container. More info: https://containers.dev/features.
22+
// "features": {},
23+
24+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
25+
// "forwardPorts": [],
26+
27+
// Use 'postCreateCommand' to run commands after the container is created.
28+
"postCreateCommand": "nix develop --experimental-features \"nix-command flakes\""
29+
30+
// Configure tool-specific properties.
31+
// "customizations": {},
32+
33+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
34+
// "remoteUser": "root"
35+
}

README.md

+22-3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Like [mpd](https://github.com/MusicPlayerDaemon/MPD) or [Mopidy](https://github.
5656

5757
## Installation
5858

59+
Compiling from source, without Nix:
60+
5961
```bash
6062
# Install dependencies
6163
brew install protobuf # macOS
@@ -65,20 +67,37 @@ choco install protoc # Windows using Chocolatey Package Manager
6567
git clone https://github.com/tsirysndr/music-player.git
6668
cd music-player/webui/musicplayer
6769
nvm install # install node version specified in .nvmrc (optional on windows)
68-
npm install -g yarn
69-
yarn install && yarn build # build webui
70+
bun install && bun run build # build webui
7071
cd ../..
7172
cargo install --path .
7273
```
7374

74-
Note: Don't forget to add `~/.cargo/bin` to your `PATH` environment variable.
75+
With Nix:
76+
77+
```bash
78+
git clone https://github.com/tsirysndr/music-player.git
79+
cd music-player
80+
nix develop --experimental-features "nix-command flakes"
81+
cd webui/musicplayer
82+
bun install && bun run build # build webui
83+
cd ../..
84+
cargo install --path .
85+
```
7586

7687
### macOS/Linux
7788

89+
Using [Homebrew](https://brew.sh/):
90+
7891
```bash
7992
brew install tsirysndr/tap/musicplayer
8093
```
8194

95+
Using [Nix](https://nixos.org/):
96+
97+
```bash
98+
nix profile install --experimental-features "nix-command flakes" github:tsirysndr/music-player
99+
```
100+
82101
Or download the latest release for your platform [here](https://github.com/tsirysndr/music-player/releases).
83102

84103
## 📦 Downloads

flake.nix

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
pkgs.gnumake
5555
pkgs.protobuf
5656
pkgs.zstd
57+
pkgs.bun
58+
pkgs.nodejs_18
5759
] ++ lib.optionals pkgs.stdenv.isDarwin [
5860
# Additional darwin specific inputs can be set here
5961
pkgs.libiconv

webui/chromecast/.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.13.0
1+
v18.16.0

webui/musicplayer/.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.13.0
1+
v18.16.0

0 commit comments

Comments
 (0)