2020-03-14 09:16:20 -07:00
|
|
|
{ interpreter, writeText, runCommandNoCC }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
python = let
|
|
|
|
packageOverrides = self: super: {
|
2020-11-22 04:17:19 -08:00
|
|
|
typeddep = self.callPackage ./typeddep {};
|
2020-03-14 09:16:20 -07:00
|
|
|
};
|
|
|
|
in interpreter.override {inherit packageOverrides; self = python;};
|
|
|
|
|
|
|
|
pythonEnv = python.withPackages(ps: [
|
|
|
|
ps.typeddep
|
|
|
|
ps.mypy
|
|
|
|
]);
|
|
|
|
|
|
|
|
pythonScript = writeText "myscript.py" ''
|
|
|
|
from typeddep import util
|
|
|
|
s: str = util.echo("hello")
|
|
|
|
print(s)
|
|
|
|
'';
|
|
|
|
|
|
|
|
in runCommandNoCC "${interpreter.name}-site-prefix-mypy-test" {} ''
|
|
|
|
${pythonEnv}/bin/mypy ${pythonScript}
|
|
|
|
touch $out
|
|
|
|
''
|