poetry2nix/tests/subdirectory/default.nix
Anders Kaseorg 65ab8f0aab Respect subdirectory from poetry.lock when fetching sources
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-10-26 16:08:53 +13:00

14 lines
355 B
Nix

{ lib, poetry2nix, postgresql_14, runCommandCC, stdenv }:
let env = poetry2nix.mkPoetryEnv { projectDir = ./.; };
in if stdenv.isDarwin then
env
else
runCommandCC "subdirectory-test"
{
PSYCOPG_IMPL = "python";
LD_LIBRARY_PATH = lib.makeLibraryPath [ postgresql_14 ];
} ''
'${env}/bin/python' -c 'import psycopg'
touch "$out"
''