Skip to content

Commit

Permalink
decky-loader: 2.12.3 -> 3.0.0-pre2
Browse files Browse the repository at this point in the history
  • Loading branch information
K900 committed Jul 3, 2024
1 parent 8dd0f83 commit 1b879f7
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 168 deletions.
13 changes: 7 additions & 6 deletions modules/decky-loader.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ let
types
;
cfg = config.jovian.decky-loader;

package = cfg.package.overridePythonAttrs(old: {
dependencies = old.dependencies ++ (cfg.extraPythonPackages old.python.pkgs);
});
in
{
options = {
Expand Down Expand Up @@ -87,24 +91,21 @@ in

wantedBy = [ "multi-user.target" ];

environment = let
inherit (cfg.package.passthru) python;
in {
environment = {
UNPRIVILEGED_USER = cfg.user;
UNPRIVILEGED_PATH = cfg.stateDir;
PLUGIN_PATH = "${cfg.stateDir}/plugins";
PYTHONPATH = "${python.withPackages cfg.extraPythonPackages}/${python.sitePackages}";
};

path = with pkgs; [ coreutils gawk ] ++ cfg.extraPackages;
path = cfg.extraPackages;

preStart = ''
mkdir -p "${cfg.stateDir}"
chown -R "${cfg.user}:" "${cfg.stateDir}"
'';

serviceConfig = {
ExecStart = "${cfg.package}/bin/decky-loader";
ExecStart = "${package}/bin/decky-loader";
KillSignal = "SIGINT";
};
};
Expand Down
4 changes: 2 additions & 2 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ rec {

sdgyrodsu = final.callPackage ./pkgs/sdgyrodsu { };

decky-loader = final.callPackage ./pkgs/decky-loader/stable.nix { };
decky-loader-prerelease = final.callPackage ./pkgs/decky-loader/prerelease.nix { };
decky-loader = final.callPackage ./pkgs/decky-loader { };
decky-loader-prerelease = decky-loader;
}
68 changes: 68 additions & 0 deletions pkgs/decky-loader/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{ lib
, fetchFromGitHub
, nodejs
, pnpm
, python3
, coreutils
, psmisc
}:
python3.pkgs.buildPythonPackage rec {
pname = "decky-loader";
version = "3.0.0-pre2";

src = fetchFromGitHub {
owner = "SteamDeckHomebrew";
repo = "decky-loader";
rev = "v${version}";
hash = "sha256-vu3LlE2f51zoPa9JvA7WoE/z4ok1AcbAlarHKYpdjvM=";
};

pyproject = true;

pnpmDeps = pnpm.fetchDeps {
inherit pname version src;
sourceRoot = "${src.name}/frontend";
hash = "sha256-KbMbwwr3Z9FTuUFqTS/c15tE2H6IV1qvWfNw41cjdi0=";
};

pnpmRoot = "frontend";

nativeBuildInputs = [
nodejs
pnpm.configHook
];

preBuild = ''
cd frontend
pnpm build
cd ../backend
'';

build-system = with python3.pkgs; [
poetry-core
poetry-dynamic-versioning
];

dependencies = with python3.pkgs; [
aiohttp
aiohttp-cors
aiohttp-jinja2
certifi
multidict
packaging
watchdog
];

makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ coreutils psmisc ]}"
];

passthru.python = python3;

meta = with lib; {
description = "A plugin loader for the Steam Deck";
homepage = "https://github.com/SteamDeckHomebrew/decky-loader";
platforms = platforms.linux;
license = licenses.gpl2Only;
};
}
112 changes: 0 additions & 112 deletions pkgs/decky-loader/generic.nix

This file was deleted.

38 changes: 0 additions & 38 deletions pkgs/decky-loader/jovian.patch

This file was deleted.

5 changes: 0 additions & 5 deletions pkgs/decky-loader/prerelease.nix

This file was deleted.

5 changes: 0 additions & 5 deletions pkgs/decky-loader/stable.nix

This file was deleted.

0 comments on commit 1b879f7

Please sign in to comment.