1{ 2 interpreter, 3 writeText, 4 runCommand, 5}: 6 7let 8 9 python = 10 let 11 packageOverrides = self: super: { 12 typeddep = self.callPackage ./typeddep { }; 13 }; 14 in 15 interpreter.override { 16 inherit packageOverrides; 17 self = python; 18 }; 19 20 pythonEnv = python.withPackages (ps: [ 21 ps.typeddep 22 ps.mypy 23 ]); 24 25 pythonScript = writeText "myscript.py" '' 26 from typeddep import util 27 s: str = util.echo("hello") 28 print(s) 29 ''; 30 31in 32runCommand "${interpreter.name}-site-prefix-mypy-test" { } '' 33 ${pythonEnv}/bin/mypy ${pythonScript} 34 touch $out 35''