python-tkinter-repro/flake.nix

37 lines
885 B
Nix

{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
flake-utils.lib.eachDefaultSystem (system:
with import nixpkgs { inherit system; };
let
myPython = python3.withPackages (p: with p; [
tkinter
]);
in
rec {
packages.default = myPython;
devShells.works = mkShell {
packages = [
myPython
tcl
tk
];
TK_LIBRARY = "${tk}/lib/${tk.libPrefix}";
shellHook = "python -m tkinter";
};
devShells.broken = mkShell {
packages = [
myPython
tcl
tk
];
shellHook = "python -m tkinter";
};
}
);
}