Update Python dependencies for Nix (#12855)

Co-authored-by: Steve Purcell <steve@sanityinc.com>
This commit is contained in:
Sergey Vlasov 2021-06-20 16:30:16 +03:00 committed by GitHub
parent 50a312b635
commit 7ab4902543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 160 additions and 46 deletions

174
nix/poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
# It is particularly required by the Nix environment (see shell.nix). To update versions,
# normally one would run "poetry update --lock"
[tool.poetry]
name = "qmk"
name = "qmk_firmware"
version = "0.1.0"
description = ""
authors = []
@ -12,18 +12,20 @@ python = "^3.8"
appdirs = "^1.4.4"
argcomplete = "^1.12.2"
colorama = "^0.4.4"
hjson = "^3.0.2"
milc = "^1.1.0"
Pygments = "^2.8.0"
dotty-dict = "^1.3.0"
hjson = "^3.0.2"
jsonschema = "^3.2.0"
milc = "^1.3.0"
Pygments = "^2.8.0"
qmk = "*"
[tool.poetry.dev-dependencies]
nose2 = "^0.10.0"
flake8 = "^3.8.4"
hid = "^1.0.4"
pep8-naming = "^0.11.1"
pyusb = "^1.1.1"
yapf = "^0.30.0"
Wave = "^0.0.2"
[build-system]
requires = ["poetry-core>=1.0.0"]

View File

@ -22,5 +22,17 @@
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/c0e881852006b132236cbf0301bd1939bb50867e.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"poetry2nix": {
"branch": "master",
"description": "Convert poetry projects to nix automagically [maintainer=@adisbladis] ",
"homepage": "",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "2d27d44397242b28c3f0081e0432e4f6c951f3a1",
"sha256": "06syfg150r59m4kksj5547b5kwxjxjaif5hiljcq966kb9hxsvmv",
"type": "tarball",
"url": "https://github.com/nix-community/poetry2nix/archive/2d27d44397242b28c3f0081e0432e4f6c951f3a1.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

View File

@ -1,14 +1,16 @@
{ avr ? true, arm ? true, teensy ? true }:
let
# We specify sources via Niv: use "niv update nixpkgs" to update nixpkgs, for example.
sources = import ./nix/sources.nix {};
pkgs = import sources.nixpkgs {};
sources = import ./nix/sources.nix { };
pkgs = import sources.nixpkgs { };
poetry2nix = pkgs.callPackage (import sources.poetry2nix) { };
# Builds the python env based on nix/pyproject.toml and
# nix/poetry.lock Use the "poetry update --lock", "poetry add
# --lock" etc. in the nix folder to adjust the contents of those
# files if the requirements*.txt files change
pythonEnv = pkgs.poetry2nix.mkPoetryEnv {
pythonEnv = poetry2nix.mkPoetryEnv {
projectDir = ./nix;
};
in