mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-06 01:31:39 -05:00
28 lines
559 B
Nix
28 lines
559 B
Nix
![]() |
{ lib, poetry2nix, python3, runCommand, writeText }:
|
||
|
|
||
|
let
|
||
|
env = poetry2nix.mkPoetryEnv {
|
||
|
projectDir = ./.;
|
||
|
groups = [
|
||
|
"dev"
|
||
|
"foo"
|
||
|
];
|
||
|
};
|
||
|
|
||
|
alembicFailImportCheck = writeText "alembic-import-fail.py" ''
|
||
|
try:
|
||
|
import alembic
|
||
|
except ImportError:
|
||
|
pass
|
||
|
else:
|
||
|
raise ValueError("Alembic import expected to fail!")
|
||
|
'';
|
||
|
|
||
|
in
|
||
|
runCommand "dependency-groups" { } ''
|
||
|
${env}/bin/python -c 'import flask'
|
||
|
${env}/bin/python -c 'import requests'
|
||
|
${env}/bin/python ${alembicFailImportCheck}
|
||
|
touch $out
|
||
|
''
|