Add shadps4 package
This commit is contained in:
@@ -113,6 +113,7 @@
|
||||
enable = true;
|
||||
lutris.enable = true;
|
||||
minecraft.enable = true;
|
||||
ps4.enable = true;
|
||||
};
|
||||
|
||||
common.nil.enable = true;
|
||||
@@ -228,7 +229,7 @@
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = with overlays; [ printrun citrix ];
|
||||
overlays = with overlays; [ printrun citrix shadps4 ];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
@@ -241,6 +242,7 @@
|
||||
kickoff-dot-desktop = pkgs.callPackage ./pkgs/kickoff-dot-desktop.nix {};
|
||||
jhelioviewer = pkgs.callPackage ./pkgs/jhelioviewer.nix {};
|
||||
llama-cpp = llama-cpp.packages.${system}.rocm;
|
||||
shadps4 = pkgs.callPackage ./pkgs/shadps4.nix {};
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -9,11 +9,12 @@ with lib; let
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; with localPackages.x86_64-linux; []
|
||||
environment.systemPackages = with pkgs; []
|
||||
++ optional cfg.protonup.enable protonup-qt
|
||||
++ optional cfg.gamescope.enable gamescope
|
||||
++ optional cfg.discord.enable vesktop
|
||||
++ optional cfg.minecraft.enable prismlauncher
|
||||
++ optional cfg.ps4.enable localPackages.x86_64-linux.shadps4
|
||||
++ optionals cfg.lutris.enable [ lutris wine ];
|
||||
|
||||
programs.steam = mkIf cfg.steam.enable {
|
||||
|
||||
@@ -40,6 +40,12 @@ in
|
||||
default = false;
|
||||
};
|
||||
|
||||
ps4.enable = mkOption {
|
||||
description = "Whether to install ps4 emulator";
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
gamescope.enable = mkOption {
|
||||
description = "Whether to install gamescope";
|
||||
type = types.bool;
|
||||
|
||||
@@ -4,4 +4,5 @@
|
||||
llama-cpp = import ./llama-cpp.nix { inherit inputs; };
|
||||
printrun = import ./printrun.nix { inherit inputs; };
|
||||
citrix = import ./citrix.nix;
|
||||
shadps4 = import ./shadps4.nix;
|
||||
}
|
||||
|
||||
15
overlays/shadps4.nix
Normal file
15
overlays/shadps4.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
final: prev: {
|
||||
shadps4 = prev.shadps4.overrideAttrs (old: {
|
||||
version = "0.6.0";
|
||||
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "shadps4-emu";
|
||||
repo = "shadps4";
|
||||
rev = "15d10e47ea272b1b4c8bf97f2b3bbb406d34b213";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-ksIKmijWcRMhCDEi/dodZHiEoIO3CB0BkGn698J7jxI=";
|
||||
};
|
||||
|
||||
patches = [];
|
||||
});
|
||||
}
|
||||
109
pkgs/shadps4.nix
Normal file
109
pkgs/shadps4.nix
Normal file
@@ -0,0 +1,109 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, llvmPackages_18
|
||||
, cmake
|
||||
, pkg-config
|
||||
, git
|
||||
, qt6
|
||||
, alsa-lib
|
||||
, libpulseaudio
|
||||
, openal
|
||||
, openssl
|
||||
, zlib
|
||||
, libedit
|
||||
, udev
|
||||
, libevdev
|
||||
, SDL2
|
||||
, jack2
|
||||
, sndio
|
||||
, vulkan-headers
|
||||
, vulkan-utility-libraries
|
||||
, vulkan-tools
|
||||
, ffmpeg
|
||||
, fmt
|
||||
, glslang
|
||||
, libxkbcommon
|
||||
, wayland
|
||||
, xorg
|
||||
, sdl3
|
||||
, stb
|
||||
, wayland-protocols
|
||||
, libpng
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "shadps4";
|
||||
version = "0.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shadps4-emu";
|
||||
repo = "shadPS4";
|
||||
rev = "9061028ce588037fa6f467cd2c0740d10ed725ed";
|
||||
hash = "sha256-XhfJx1sDFz+RwhwcBA8W6WV6y1rDDvpyQe3v3NaSu2I=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
llvmPackages_18.clang
|
||||
cmake
|
||||
pkg-config
|
||||
git
|
||||
qt6.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
libpulseaudio
|
||||
openal
|
||||
openssl
|
||||
zlib
|
||||
libedit
|
||||
udev
|
||||
libevdev
|
||||
SDL2
|
||||
jack2
|
||||
sndio
|
||||
qt6.qtbase
|
||||
qt6.qttools
|
||||
qt6.qtmultimedia
|
||||
|
||||
vulkan-headers
|
||||
vulkan-utility-libraries
|
||||
vulkan-tools
|
||||
|
||||
ffmpeg
|
||||
fmt
|
||||
glslang
|
||||
libxkbcommon
|
||||
wayland
|
||||
xorg.libxcb
|
||||
xorg.xcbutil
|
||||
xorg.xcbutilkeysyms
|
||||
xorg.xcbutilwm
|
||||
sdl3
|
||||
stb
|
||||
qt6.qtwayland
|
||||
wayland-protocols
|
||||
libpng
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "ENABLE_QT_GUI" true)
|
||||
(lib.cmakeBool "ENABLE_UPDATER" false)
|
||||
];
|
||||
|
||||
cmakeBuildType = "RelWithDebugInfo";
|
||||
dontStrip = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D -t $out/bin shadps4
|
||||
install -Dm644 $src/.github/shadps4.png $out/share/icons/hicolor/512x512/apps/net.shadps4.shadPS4.png
|
||||
install -Dm644 -t $out/share/applications $src/dist/net.shadps4.shadPS4.desktop
|
||||
install -Dm644 -t $out/share/metainfo $src/dist/net.shadps4.shadPS4.metainfo.xml
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user