blob: d7fb0f7479377747cfe5ba5f658aa0f4abd5ae62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
{
interpreter,
writeText,
runCommand,
}:
let
python =
let
packageOverrides = self: super: {
typeddep = self.callPackage ./typeddep { };
};
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
runCommand "${interpreter.name}-site-prefix-mypy-test" { } ''
${pythonEnv}/bin/mypy ${pythonScript}
touch $out
''
|