18 lines
315 B
Nix
18 lines
315 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
|
|
''
|