48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{
|
|
description = "Beat Saber plugin-helper CLI";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs { inherit system; };
|
|
python = pkgs.python313;
|
|
in
|
|
{
|
|
packages.${system}.default = python.pkgs.buildPythonApplication {
|
|
pname = "plugin-helper";
|
|
version = "0.1.0";
|
|
src = ./.;
|
|
pyproject = true;
|
|
|
|
build-system = with python.pkgs; [
|
|
setuptools
|
|
wheel
|
|
];
|
|
|
|
nativeCheckInputs = [ ];
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
python -m unittest discover -s tests
|
|
runHook postCheck
|
|
'';
|
|
};
|
|
|
|
apps.${system}.default = {
|
|
type = "app";
|
|
program = "${self.packages.${system}.default}/bin/plugin-helper";
|
|
};
|
|
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
packages = [
|
|
python
|
|
pkgs.ruff
|
|
];
|
|
shellHook = ''
|
|
export PYTHONPATH="$PWD/src''${PYTHONPATH:+:$PYTHONPATH}"
|
|
'';
|
|
};
|
|
};
|
|
}
|