11 # steamos-devkit requires a build of the unreleased pyimgui 2.0 branch, move to pythonPackages when 2.0 is released.
12 pyimgui = python3.pkgs.buildPythonPackage {
16 src = fetchFromGitHub {
20 fetchSubmodules = true;
21 sha256 = "sha256-sw/bLTdrnPhBhrnk5yyXCbEK4kMo+PdEvoMJ9aaZbsE=";
24 nativeBuildInputs = with python3.pkgs; [
30 propagatedBuildInputs = with python3.pkgs; [
36 # Requires OpenGL acceleration
38 pythonImportsCheck = [ "imgui" ];
40 steamos-devkit-script = ''
41 #!${python3.interpreter}
44 # Change the cwd to avoid imgui using cwd which often is ~ to store the state, use the same location as the settings
45 path = os.path.expanduser(os.path.join("~", ".devkit-client-gui"))
46 os.makedirs(path, exist_ok=True)
49 # Workaround to get pysdl to work on wayland, remove when https://gitlab.steamos.cloud/devkit/steamos-devkit/-/issues/1 is solved.
50 if os.environ.get("XDG_SESSION_TYPE") == "wayland":
51 os.environ["SDL_VIDEODRIVER"] = "wayland"
53 import devkit_client.gui2
54 devkit_client.gui2.main()
57 python3.pkgs.buildPythonPackage rec {
58 pname = "steamos-devkit";
59 version = "0.20240216.0";
61 src = fetchFromGitLab {
62 domain = "gitlab.steamos.cloud";
64 repo = "steamos-devkit";
66 sha256 = "sha256-eOtESkGMIjcijAFITOcYKPsXH6xH/Xcj9D+OItMqebM=";
69 propagatedBuildInputs = with python3.pkgs; [
92 # Find the absolute source root to link correctly to the previous root
93 prevRoot=$(realpath $sourceRoot)
95 # Update the source root to the devkit_client package
96 sourceRoot="$sourceRoot/client"
98 # Link the setup script into the new source root
99 ln -s $prevRoot/setup/shiv-linux-setup.py $sourceRoot/setup.py
105 # These are various assets like scripts that steamos-devkit will copy to the remote device
106 cp -R ./devkit-utils $out/${python3.sitePackages}/devkit-utils
108 # writeScript + symlink will be ignored by wrapPythonPrograms
109 # Copying it is undesirable too, just write it directly to a script instead
110 cat << EOF > $out/bin/steamos-devkit
111 ${steamos-devkit-script}
113 chmod +x $out/bin/steamos-devkit
116 # There are no checks for steamos-devkit
118 pythonImportsCheck = [ "devkit_client" ];
122 name = "SteamOS-Devkit";
123 exec = "steamos-devkit";
124 desktopName = "SteamOS Devkit Client";
129 description = "SteamOS Devkit Client";
130 mainProgram = "steamos-devkit";
131 homepage = "https://gitlab.steamos.cloud/devkit/steamos-devkit";
132 license = licenses.mit;
133 maintainers = with maintainers; [ myaats ];