diff --git a/tests/default.nix b/tests/default.nix index 525f4d4..9ef374a 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -73,7 +73,7 @@ in fastapi-utils = callTest ./fastapi-utils { }; awscli = callTest ./awscli { }; aiopath = callTest ./aiopath { }; - # BROKEN fetched-projectdir = callTest ./fetched-projectdir { }; + fetched-projectdir = callTest ./fetched-projectdir { }; assorted-pkgs = callTest ./assorted-pkgs { }; watchfiles = callTest ./watchfiles { }; sqlalchemy = callTest ./sqlalchemy { }; diff --git a/tests/fetched-projectdir/default.nix b/tests/fetched-projectdir/default.nix index db543e2..a719fe5 100644 --- a/tests/fetched-projectdir/default.nix +++ b/tests/fetched-projectdir/default.nix @@ -1,11 +1,23 @@ -{ poetry2nix, python39, fetchFromGitHub }: +{ pkgs, poetry2nix, python39, fetchFromGitHub }: -poetry2nix.mkPoetryApplication { - projectDir = fetchFromGitHub { +let + rawProjectDir = fetchFromGitHub { owner = "nix-community"; repo = "pynixutil"; rev = "d27d778dc9109227b927ab88fedb2e3c2d6a7265"; sha256 = "sha256-+Ey384Nz6hvDZAA5OYO0EAGkGjY9Kz4134CRIMjEeyg="; }; + # patch the project dir to use poetry-core instead of poetry + projectDir = pkgs.runCommand "pyproject-dir" { } '' + mkdir -p $out + cp -r ${rawProjectDir}/* $out + sed \ + -i $out/pyproject.toml \ + -e 's/poetry>=0\.12/poetry-core/g' \ + -e 's/poetry\.masonry/poetry.core.masonry/g' + ''; +in +poetry2nix.mkPoetryApplication { + inherit projectDir; python = python39; }