poetry2nix/tests/source-filter/default.nix
adisbladis bb3c2d57d5
Add a default source filter when projectDir is used
Also use the same source filter for path deps.

The default source filter currently filters:
- Filters gitignore (if it exists, non-recursive)
- Filters pycache/pyc files
- Uses cleanSourceFilter to filter out .git/.hg, .o/.so, editor backup files & nix result symlinks
2020-02-29 12:05:23 +00:00

16 lines
394 B
Nix

{ lib, poetry2nix, python3 }:
poetry2nix.mkPoetryApplication {
python = python3;
projectDir = ./.;
# Assert expected ignored files not in sources
preConfigure = let
assertNotExists = name: "! test -f ${name} || (echo ${name} exists && false)";
in
''
${assertNotExists "ignored.pyc"}
${assertNotExists "__pycache__"}
${assertNotExists "testhest"}
'';
}