diff --git a/flake.nix b/flake.nix index a44aa0d..5772ba1 100644 --- a/flake.nix +++ b/flake.nix @@ -64,15 +64,22 @@ format = "pyproject"; src = "${self}/pythermostat"; + nativeBuildInputs = [ pkgs.qt6.wrapQtAppsHook ]; propagatedBuildInputs = - with pkgs.python3Packages; [ + [ pkgs.qt6.qtbase ] + ++ (with pkgs.python3Packages; [ numpy matplotlib pyqtgraph pyqt6 qasync pglive - ]; + ]); + + dontWrapQtApps = true; + postFixup = '' + wrapQtApp "$out/bin/thermostat_qt" + ''; }; pglive = pkgs.python3Packages.buildPythonPackage rec { @@ -96,6 +103,11 @@ default = thermostat; }; + apps.x86_64-linux.thermostat_gui = { + type = "app"; + program = "${self.packages.x86_64-linux.pythermostat}/bin/thermostat_qt"; + }; + hydraJobs = { inherit thermostat; }; diff --git a/pythermostat/MANIFEST.in b/pythermostat/MANIFEST.in new file mode 100644 index 0000000..26af249 --- /dev/null +++ b/pythermostat/MANIFEST.in @@ -0,0 +1,4 @@ +graft examples +include pythermostat/gui/resources/artiq.ico +include pythermostat/gui/view/param_tree.json +include pythermostat/gui/view/tec_qt.ui diff --git a/pythermostat/pyproject.toml b/pythermostat/pyproject.toml index 5e37137..7dc8576 100644 --- a/pythermostat/pyproject.toml +++ b/pythermostat/pyproject.toml @@ -12,6 +12,7 @@ license = {text = "GPLv3"} [project.gui-scripts] thermostat_plot = "pythermostat.plot:main" +thermostat_qt = "pythermostat.thermostat_qt:main" [project.scripts] thermostat_autotune = "pythermostat.autotune:main"