代码拉取完成,页面将自动刷新
{
inputs = {
mach-nix.url = "github:DavHau/mach-nix";
pypi.url = "github:DavHau/pypi-deps-db";
pypi.flake = false;
mach-nix.inputs.pypi-deps-db.follows = "pypi";
};
outputs = {self, nixpkgs, ...}@inputs:
let
target-system = "x86_64-linux";
pkgs = import nixpkgs {system = target-system;};
# this will find all dependencies in setup.py
mkPackage = system: inputs.mach-nix.lib."${system}".buildPythonPackage {src=./.;
python = "python38";
requirementsExtra = "setuptools";
};
mkPython = system: inputs.mach-nix.lib."${system}".mkPython {
python = "python38";
# extra packages needed for development
requirements = ''python-lsp-server
rich-click
black'';
# hack because black requires tomli (currently broken in mach-nix, issue #484)
_.black.propagatedBuildInputs.mod = pySelf: self: oldVal: oldVal ++ [ pySelf.tomli ];
packagesExtra = [ (mkPackage system) ];
};
in
{
packages.${target-system}.default = mkPackage target-system;
devShells.${target-system}.default = pkgs.mkShell{
buildInputs=[(mkPython target-system) pkgs.nodePackages.prettier pkgs.nodePackages.markdownlint-cli];
};
};
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。