1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
{ 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 ''