diff options
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -1,9 +1,29 @@ let # We specify sources via Niv: use "niv update nixpkgs" to update nixpkgs, for example. sources = import ./util/nix/sources.nix { }; + + # `tomlkit` >= 0.8.0 is required to build `jsonschema` >= 4.11.0 (older + # version do not support some valid TOML syntax: sdispater/tomlkit#148). The + # updated `tomlkit` must be used by `makeRemoveSpecialDependenciesHook` + # inside `poetry2nix`, therefore just providing the updated version through + # our `nix/pyproject.toml` does not work, and using an overlay is required. + pythonOverlay = final: prev: { + python3 = prev.python3.override { + packageOverrides = self: super: { + tomlkit = super.tomlkit.overridePythonAttrs(old: rec { + version = "0.11.4"; + src = super.fetchPypi { + inherit (old) pname; + inherit version; + sha256 = "sha256-MjWpAQ+uVDI+cnw6wG+3IHUv5mNbNCbjedrsYPvUSoM="; + }; + }); + }; + }; + }; in # However, if you want to override Niv's inputs, this will let you do that. -{ pkgs ? import sources.nixpkgs { } +{ pkgs ? import sources.nixpkgs { overlays = [ pythonOverlay ]; } , poetry2nix ? pkgs.callPackage (import sources.poetry2nix) { } , avr ? true , arm ? true |