- Created .gitignore to exclude unnecessary files and directories. - Added flake.nix for Nix package management and development environment setup. - Introduced flake.lock to lock dependencies for reproducibility. - Implemented main.py script to identify missing albums on MusicBrainz from Deezer releases for artists monitored in Lidarr, including functionality for generating submission links.
38 lines
933 B
Nix
38 lines
933 B
Nix
{
|
|
description = "Lidarr to MusicBrainz Missing Albums Finder";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
pythonEnv = pkgs.python3.withPackages (ps: with ps; [
|
|
requests
|
|
python-dotenv
|
|
]);
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = [ pythonEnv ];
|
|
shellHook = ''
|
|
echo "Python environment ready!"
|
|
echo "Run: python main.py"
|
|
'';
|
|
};
|
|
|
|
packages.default = pkgs.writeShellApplication {
|
|
name = "lidarr-musicbrainz";
|
|
runtimeInputs = [ pythonEnv ];
|
|
text = ''
|
|
python ${./main.py} "$@"
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|