nix-direnv/test-runner.nix

17 lines
319 B
Nix
Raw Normal View History

2023-05-23 18:21:25 +03:00
{ writeShellScriptBin
2023-05-23 16:47:34 +03:00
, direnv
, python3
, lib
, coreutils
, gnugrep
2023-05-23 18:21:25 +03:00
, nixVersions
, nixVersion
2023-05-23 16:47:34 +03:00
}:
2023-05-23 18:21:25 +03:00
writeShellScriptBin "test-runner-${nixVersion}" ''
2023-05-23 16:47:34 +03:00
set -e
2023-05-23 18:21:25 +03:00
export PATH=${lib.makeBinPath [ direnv nixVersions.${nixVersion} coreutils gnugrep ]}
2023-05-23 16:47:34 +03:00
echo run unittest
${lib.getExe' python3.pkgs.pytest "pytest"} .
2023-05-23 16:47:34 +03:00
''