feat: update the package a bit, conform to pep8
This commit is contained in:
parent
867786099a
commit
fcf24cd5cd
6 changed files with 80 additions and 106 deletions
31
shell.nix
31
shell.nix
|
|
@ -1,17 +1,24 @@
|
|||
{ pkgs ? import <nixpkgs> { }, pre-commit-hooks }:
|
||||
let
|
||||
{
|
||||
pkgs ? import <nixpkgs> {},
|
||||
pre-commit-hooks,
|
||||
}: let
|
||||
pre-commit-check = pre-commit-hooks.lib.${pkgs.system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
gofmt.enable = true;
|
||||
isort.enable = true;
|
||||
black.enable = true;
|
||||
ruff.enable = true;
|
||||
pylint = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
in pkgs.mkShell {
|
||||
inherit (pre-commit-check) shellHook;
|
||||
name = "hb-downloader";
|
||||
buildInputs =
|
||||
[ (pkgs.python3.withPackages (pyPkgs: with pyPkgs; [ requests mypy ])) ];
|
||||
nativeBuildInputs = [ pkgs.aria2 ];
|
||||
}
|
||||
myPython = pkgs.python3.withPackages (pyPkgs: with pyPkgs; [requests pylint setuptools]);
|
||||
in
|
||||
pkgs.mkShell {
|
||||
name = "hb-downloader";
|
||||
buildInputs = [myPython pre-commit-check.enabledPackages];
|
||||
nativeBuildInputs = [pkgs.aria2 pkgs.ruff pkgs.basedpyright];
|
||||
shellHook = ''
|
||||
PYTHONPATH=${myPython}/${myPython.sitePackages}
|
||||
${pre-commit-check.shellHook}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue