1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
{ depot, pkgs, python3Lib }: let testLib = python3Lib { name = "test_lib"; } '' def test(): return "test" ''; pythonWithLib = pkgs.writers.writePython3 "python-with-lib" { libraries = [ testLib ]; } '' import test_lib assert(test_lib.test() == "test") ''; in { inherit pythonWithLib; }