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