diff options
author | QMK Bot <hello@qmk.fm> | 2021-04-03 15:29:28 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2021-04-03 15:29:28 +0000 |
commit | dd7f18f65fabe1ca2a09e973b0cb5e5df567d092 (patch) | |
tree | a9e7f8a6d09f4e350cf70328732f433313db02b3 /shell.nix | |
parent | e90ec6a474713aef6b7a5a8e34b19afbd62671c4 (diff) | |
parent | 41f649c9a95985603d1063f2ec5e2864a7e32a0b (diff) |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 35 |
1 files changed, 11 insertions, 24 deletions
@@ -1,29 +1,16 @@ { avr ? true, arm ? true, teensy ? true }: - let - nixpkgs = builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/1f77a4c8c74bbe896053994836790aa9bf6dc5ba.tar.gz"; - sha256 = "1j62nmzz3w33dplzf1xz1pg1pfkxii7lwdqmsxmc71cs9cm3s7n1"; - }; + # We specify sources via Niv: use "niv update nixpkgs" to update nixpkgs, for example. + sources = import ./nix/sources.nix {}; + pkgs = import sources.nixpkgs {}; - pkgs = import nixpkgs { }; - - pythonEnv = pkgs.python3.withPackages (p: with p; [ - # requirements.txt - appdirs - argcomplete - colorama - dotty-dict - hjson - jsonschema - milc - pygments - # requirements-dev.txt - nose2 - flake8 - pep8-naming - yapf - ]); + # 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 { + projectDir = ./nix; + }; in with pkgs; @@ -43,7 +30,7 @@ in mkShell { name = "qmk-firmware"; - buildInputs = [ clang-tools dfu-programmer dfu-util diffutils git pythonEnv ] + buildInputs = [ clang-tools dfu-programmer dfu-util diffutils git pythonEnv poetry niv ] ++ lib.optional avr [ pkgsCross.avr.buildPackages.binutils pkgsCross.avr.buildPackages.gcc8 |