Skip to content

Commit

Permalink
Add poetry2nix override for jsonschema >= 4.6.0
Browse files Browse the repository at this point in the history
The `jsonschema` module switched the packaging system to Hatch since
version 4.6.0 (python-jsonschema/jsonschema#957).  The build process for
`jsonschema` now requires the `hatchling` and `hatch-vcs` modules, which
were made available to poetry2nix by the previous commits; add these
modules to `nativeBuildInput` to fix the build.
  • Loading branch information
sigprof committed Jun 12, 2022
1 parent ec4f2d0 commit 74408f4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions shell.nix
Expand Up @@ -29,6 +29,17 @@ let
pythonEnv = poetry2nix.mkPoetryEnv {
projectDir = ./nix;
overrides = poetry2nix.overrides.withDefaults (self: super: {
jsonschema =
if lib.versionAtLeast super.jsonschema.version "4.6.0"
then
super.jsonschema.overridePythonAttrs
(old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
self.hatchling
self.hatch-vcs
];
})
else super.jsonschema;
pillow = super.pillow.overridePythonAttrs(old: {
# Use preConfigure from nixpkgs to fix library detection issues and
# impurities which can break the build process; this also requires
Expand Down

0 comments on commit 74408f4

Please sign in to comment.