- Updated `flake.nix` to define a new Python application `lidarr-mb-gap` for identifying missing albums on MusicBrainz. - Improved development shell environment by including a Python environment with necessary packages. - Added new source files: `__init__.py`, `html_report.py`, and `main.py` to implement core functionality and HTML report generation. - Introduced `pyproject.toml` for better package management and project metadata. - Enhanced user instructions in the shell hook for running the application.
58 lines
1.5 KiB
Nix
58 lines
1.5 KiB
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; };
|
|
lib = pkgs.lib;
|
|
lidarr-mb-gap = pkgs.python3Packages.buildPythonApplication {
|
|
pname = "lidarr-mb-gap";
|
|
version = "1.0.0";
|
|
src = lib.cleanSource ./src;
|
|
format = "pyproject";
|
|
nativeBuildInputs = with pkgs.python3Packages; [
|
|
setuptools
|
|
];
|
|
propagatedBuildInputs = with pkgs.python3Packages; [
|
|
requests
|
|
python-dotenv
|
|
];
|
|
};
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = [
|
|
(pkgs.python3.withPackages (ps: with ps; [
|
|
requests
|
|
python-dotenv
|
|
]))
|
|
pkgs.black
|
|
];
|
|
shellHook = ''
|
|
echo "Python environment ready!"
|
|
echo "Run: python src/main.py"
|
|
echo "Format code with: black src/"
|
|
'';
|
|
};
|
|
|
|
packages.default = lidarr-mb-gap;
|
|
packages.lidarr-mb-gap = lidarr-mb-gap;
|
|
apps.default = {
|
|
type = "app";
|
|
program = "${lidarr-mb-gap}/bin/lidarr-mb-gap";
|
|
};
|
|
apps.lidarr-mb-gap = {
|
|
type = "app";
|
|
program = "${lidarr-mb-gap}/bin/lidarr-mb-gap";
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|