mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-31 07:30:32 +00:00
Merge 6cbdcc300ffa7b36ba7f25ee5a72bb4ad98090c3 into dbd26ba2e71d0a5b79dba873a2beeff59f1cd8dd
This commit is contained in:
commit
e5465c2d08
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1787360063,
|
||||
"narHash": "sha256-dt4WdcvsA8/RCe+VZZwqU0X+XMM3wBbGCWA0/sFWzGo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2c423e03bbafcff28bfadc6781a4a8257f205cb5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
51
flake.nix
Normal file
51
flake.nix
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
description = "Navidrome is an open source web-based music collection server and streamer.";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
}:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
pkgsForEach = system: nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = pkgsForEach system;
|
||||
goModVersion = builtins.head (
|
||||
builtins.match ".*\ngo ([0-9]+\\.[0-9]+).*" (builtins.readFile ./go.mod)
|
||||
);
|
||||
goAttr = "go_${builtins.replaceStrings [ "." ] [ "_" ] goModVersion}";
|
||||
nvmrcVersion = builtins.head (builtins.match ".([0-9]+).*" (builtins.readFile ./.nvmrc));
|
||||
nodeAttr = "nodejs_${nvmrcVersion}";
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
name = "navidrome-shell";
|
||||
packages = with pkgs; [
|
||||
pkgs.${goAttr}
|
||||
gopls
|
||||
pkgs.${nodeAttr}
|
||||
gnumake
|
||||
perl
|
||||
];
|
||||
shellHook = ''
|
||||
export PATH="$HOME/go/bin:$PATH"
|
||||
echo "Navidrome dev shell ready"
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user