23 lines
324 B
Nix
23 lines
324 B
Nix
|
|
{
|
||
|
|
interpreter,
|
||
|
|
writeText,
|
||
|
|
runCommand,
|
||
|
|
}:
|
||
|
|
|
||
|
|
let
|
||
|
|
|
||
|
|
pythonEnv = interpreter.withPackages (ps: [
|
||
|
|
ps.tkinter
|
||
|
|
]);
|
||
|
|
|
||
|
|
pythonScript = writeText "myscript.py" ''
|
||
|
|
import tkinter
|
||
|
|
print(tkinter)
|
||
|
|
'';
|
||
|
|
|
||
|
|
in
|
||
|
|
runCommand "${interpreter.name}-tkinter-test" { } ''
|
||
|
|
${pythonEnv}/bin/python ${pythonScript}
|
||
|
|
touch $out
|
||
|
|
''
|