diff options
Diffstat (limited to 'shell.nix')
| -rw-r--r-- | shell.nix | 35 |
1 files changed, 11 insertions, 24 deletions
| @@ -1,29 +1,16 @@ | |||
| 1 | { avr ? true, arm ? true, teensy ? true }: | 1 | { avr ? true, arm ? true, teensy ? true }: |
| 2 | |||
| 3 | let | 2 | let |
| 4 | nixpkgs = builtins.fetchTarball { | 3 | # We specify sources via Niv: use "niv update nixpkgs" to update nixpkgs, for example. |
| 5 | url = "https://github.com/NixOS/nixpkgs/archive/1f77a4c8c74bbe896053994836790aa9bf6dc5ba.tar.gz"; | 4 | sources = import ./nix/sources.nix {}; |
| 6 | sha256 = "1j62nmzz3w33dplzf1xz1pg1pfkxii7lwdqmsxmc71cs9cm3s7n1"; | 5 | pkgs = import sources.nixpkgs {}; |
| 7 | }; | ||
| 8 | 6 | ||
| 9 | pkgs = import nixpkgs { }; | 7 | # Builds the python env based on nix/pyproject.toml and |
| 10 | 8 | # nix/poetry.lock Use the "poetry update --lock", "poetry add | |
| 11 | pythonEnv = pkgs.python3.withPackages (p: with p; [ | 9 | # --lock" etc. in the nix folder to adjust the contents of those |
| 12 | # requirements.txt | 10 | # files if the requirements*.txt files change |
| 13 | appdirs | 11 | pythonEnv = pkgs.poetry2nix.mkPoetryEnv { |
| 14 | argcomplete | 12 | projectDir = ./nix; |
| 15 | colorama | 13 | }; |
| 16 | dotty-dict | ||
| 17 | hjson | ||
| 18 | jsonschema | ||
| 19 | milc | ||
| 20 | pygments | ||
| 21 | # requirements-dev.txt | ||
| 22 | nose2 | ||
| 23 | flake8 | ||
| 24 | pep8-naming | ||
| 25 | yapf | ||
| 26 | ]); | ||
| 27 | in | 14 | in |
| 28 | 15 | ||
| 29 | with pkgs; | 16 | with pkgs; |
| @@ -43,7 +30,7 @@ in | |||
| 43 | mkShell { | 30 | mkShell { |
| 44 | name = "qmk-firmware"; | 31 | name = "qmk-firmware"; |
| 45 | 32 | ||
| 46 | buildInputs = [ clang-tools dfu-programmer dfu-util diffutils git pythonEnv ] | 33 | buildInputs = [ clang-tools dfu-programmer dfu-util diffutils git pythonEnv poetry niv ] |
| 47 | ++ lib.optional avr [ | 34 | ++ lib.optional avr [ |
| 48 | pkgsCross.avr.buildPackages.binutils | 35 | pkgsCross.avr.buildPackages.binutils |
| 49 | pkgsCross.avr.buildPackages.gcc8 | 36 | pkgsCross.avr.buildPackages.gcc8 |
