summaryrefslogtreecommitdiff
path: root/pkgs/development/interpreters/python/tests/test_tkinter/default.nix
blob: 21dc379d26ca4ef5feb9c46166cc951ef613c390 (plain)
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
''