Skip to content

Commit

Permalink
Merge pull request #424 from Jovian-Experiments/fix-for-by-name
Browse files Browse the repository at this point in the history
treewide: adjust for NixOS/nixpkgs#349109
  • Loading branch information
K900 authored Oct 16, 2024
2 parents 25d64ad + fa1d015 commit e5c6aed
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 27 deletions.
24 changes: 10 additions & 14 deletions overlay.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
final: super:
final: prev:

let
inherit (final)
Expand All @@ -8,7 +8,7 @@ let
in
rec {
linux-firmware-jupiter = final.callPackage ./pkgs/linux-firmware {
linux-firmware = super.linux-firmware;
linux-firmware = prev.linux-firmware;
};
linuxPackages_jovian = linuxPackagesFor final.linux_jovian;
linux_jovian = final.callPackage ./pkgs/linux-jovian {
Expand All @@ -22,7 +22,7 @@ rec {
galileo-mura = final.callPackage ./pkgs/galileo-mura { };

gamescope = import ./pkgs/gamescope {
gamescope' = super.gamescope;
gamescope' = prev.gamescope;
inherit (final) fetchFromGitHub;
};
gamescope-wsi = gamescope.override {
Expand Down Expand Up @@ -77,17 +77,13 @@ rec {

jovian-hardware-survey = final.callPackage ./pkgs/jovian-hardware-survey { };

steamPackages = super.steamPackages.overrideScope (_: scopeSuper: {
steam = final.callPackage ./pkgs/steam-jupiter/unwrapped.nix {
steam-original = scopeSuper.steam;
};
steam-fhsenv = final.callPackage ./pkgs/steam-jupiter/fhsenv.nix {
steam-fhsenv = scopeSuper.steam-fhsenv;
};
steam-fhsenv-small = final.callPackage ./pkgs/steam-jupiter/fhsenv.nix {
steam-fhsenv = scopeSuper.steam-fhsenv-small;
};
});
steam-unwrapped = final.callPackage ./pkgs/steam-jupiter/unwrapped.nix {
# FIXME: compatibility with older nixpkgs, remove this fallback in a couple weeks
steam-unwrapped = prev.steam-unwrapped or prev.steamPackages.steam;
};
steam = final.callPackage ./pkgs/steam-jupiter/fhsenv.nix {
steam = prev.steam;
};

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

Expand Down
9 changes: 5 additions & 4 deletions pkgs/gamescope-session/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
fetchFromGitHub,
python3,
steamdeck-hw-theme,
steamPackages,
steam,
steam-unwrapped,
bash,
coreutils,
dbus,
Expand Down Expand Up @@ -46,7 +47,7 @@ let
procps
steam_notif_daemon
"${steamos-polkit-helpers}/bin/steamos-polkit-helpers"
steamPackages.steam-fhsenv
steam
util-linux
xbindkeys
];
Expand All @@ -56,7 +57,7 @@ let
"cannot:${steamos-polkit-helpers}/bin/steamos-polkit-helpers/steamos-poweroff-now"
"cannot:${steamos-polkit-helpers}/bin/steamos-polkit-helpers/steamos-reboot-now"
"cannot:${steamos-polkit-helpers}/bin/steamos-polkit-helpers/steamos-retrigger-automounts"
"cannot:${steamPackages.steam-fhsenv}/bin/steam"
"cannot:${steam}/bin/steam"
"cannot:${util-linux}/bin/flock"
"cannot:${xbindkeys}/bin/xbindkeys"
];
Expand Down Expand Up @@ -124,7 +125,7 @@ in stdenv.mkDerivation(finalAttrs: {
# The powerbuttond stuff should be handled by resholve, but currently isn't
substituteInPlace gamescope-session \
--replace /usr/share ${steamdeck-hw-theme}/share \
--replace /usr/lib/steam ${steamPackages.steam}/lib/steam \
--replace /usr/lib/steam ${steam-unwrapped}/lib/steam \
--replace /usr/lib/hwsupport/powerbuttond ${powerbuttond}/bin/powerbuttond
substituteInPlace gamescope-session.service \
Expand Down
4 changes: 2 additions & 2 deletions pkgs/jovian-steam-protocol-handler/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
writeShellScript,
steamPackages,
steam-run,
}:
# FIXME: this is a hack, replace with a better implementation
# Investigate magic socket?
writeShellScript "jovian-steam-protocol-handler" ''
exec ${steamPackages.steam-fhsenv.run}/bin/steam-run ~/.steam/root/ubuntu12_32/steam "$@"
exec ${steam-run}/bin/steam-run ~/.steam/root/ubuntu12_32/steam "$@"
''
6 changes: 3 additions & 3 deletions pkgs/steam-jupiter/fhsenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{ writeShellScriptBin
, dmidecode
, jovian-stubs
, steam-fhsenv
, steam
# , steamos-polkit-helpers
, ...
} @ args:
Expand All @@ -16,7 +16,7 @@ let
"writeShellScriptBin"
"dmidecode"
"jovian-stubs"
"steam-fhsenv"
"steam"
"steamos-polkit-helpers"
];

Expand All @@ -43,7 +43,7 @@ let
systemctl stop --user gamescope-session
'';

wrappedSteam = steam-fhsenv.override (extraArgs // {
wrappedSteam = steam.override (extraArgs // {
extraPkgs = pkgs: (if args ? extraPkgs then args.extraPkgs pkgs else []) ++ [
dmidecode
jovian-stubs
Expand Down
6 changes: 3 additions & 3 deletions pkgs/steam-jupiter/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
# This allows the Steam Deck UI to start on a fresh installation
# (i.e., have not launched Steam at all before).

{ steam-original, fetchurl }:
{ steam-unwrapped, fetchurl }:

let
bootstrapVersion = "1.0.0.79-1.3";
bundle = fetchurl {
url = "https://steamdeck-packages.steamos.cloud/archlinux-mirror/sources/jupiter-main/steam-jupiter-stable-${bootstrapVersion}.src.tar.gz";
hash = "sha256-q814Tkdo9yQjv2hpupINd6uZC3LpZz+gP6TfWcTINQ8=";
};
in steam-original.overrideAttrs (old: {
pname = "steam-jupiter-original";
in steam-unwrapped.overrideAttrs (old: {
pname = "steam-jupiter-unwrapped";

postInstall = (old.postInstall or "") + ''
>&2 echo ":: Injecting Steam Deck client bootstrap..."
Expand Down
2 changes: 1 addition & 1 deletion support/manifest/mappings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ sddm-wayland.ignore = true
# FIXME: package this
steam-im-modules.ignore = true

steam-jupiter-stable.map = "steamPackages.steam"
steam-jupiter-stable.map = "steam"

# we don't use this
steam-jupiter-oobe.ignore = true
Expand Down

0 comments on commit e5c6aed

Please sign in to comment.