2023-08-12 17:06:01 +00:00
|
|
|
{ stdenvNoCC
|
|
|
|
, stdenv
|
2022-10-05 21:43:12 +00:00
|
|
|
, lib
|
2023-08-12 17:06:01 +00:00
|
|
|
, dpkg
|
|
|
|
, autoPatchelfHook
|
|
|
|
, makeWrapper
|
2022-10-05 21:43:12 +00:00
|
|
|
, fetchurl
|
2023-08-12 17:06:01 +00:00
|
|
|
, alsa-lib
|
|
|
|
, openssl
|
|
|
|
, udev
|
2022-10-05 21:43:12 +00:00
|
|
|
, libglvnd
|
2023-08-12 17:06:01 +00:00
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXi
|
|
|
|
, libXrandr
|
|
|
|
, libXfixes
|
2022-10-05 21:43:12 +00:00
|
|
|
, libpulseaudio
|
|
|
|
, libva
|
|
|
|
, ffmpeg
|
2023-08-12 17:06:01 +00:00
|
|
|
, libpng
|
|
|
|
, libjpeg8
|
|
|
|
, curl
|
2022-10-05 21:43:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
|
|
pname = "parsec-bin";
|
2023-01-24 21:09:06 +00:00
|
|
|
version = "150_86e";
|
2022-10-05 21:43:12 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-08-12 17:06:01 +00:00
|
|
|
url = "https://web.archive.org/web/20230531105208/https://builds.parsec.app/package/parsec-linux.deb";
|
2023-01-24 21:09:06 +00:00
|
|
|
sha256 = "sha256-wwBy86TdrHaH9ia40yh24yd5G84WTXREihR+9I6o6uU=";
|
2022-10-05 21:43:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
runHook preUnpack
|
|
|
|
|
|
|
|
dpkg-deb -x $src .
|
|
|
|
|
|
|
|
runHook postUnpack
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ dpkg autoPatchelfHook makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
stdenv.cc.cc # libstdc++
|
|
|
|
libglvnd
|
|
|
|
libX11
|
|
|
|
];
|
|
|
|
|
|
|
|
runtimeDependenciesPath = lib.makeLibraryPath [
|
|
|
|
stdenv.cc.cc
|
|
|
|
libglvnd
|
|
|
|
openssl
|
|
|
|
udev
|
|
|
|
alsa-lib
|
|
|
|
libpulseaudio
|
|
|
|
libva
|
|
|
|
ffmpeg
|
2023-08-12 17:06:01 +00:00
|
|
|
libpng
|
|
|
|
libjpeg8
|
|
|
|
curl
|
2022-10-05 21:43:12 +00:00
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXi
|
|
|
|
libXrandr
|
2023-08-12 17:06:01 +00:00
|
|
|
libXfixes
|
2022-10-05 21:43:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
prepareParsec = ''
|
|
|
|
if [[ ! -e "$HOME/.parsec/appdata.json" ]]; then
|
|
|
|
mkdir -p "$HOME/.parsec"
|
|
|
|
cp --no-preserve=mode,ownership,timestamps ${placeholder "out"}/share/parsec/skel/* "$HOME/.parsec/"
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir $out
|
|
|
|
mv usr/* $out
|
|
|
|
|
|
|
|
wrapProgram $out/bin/parsecd \
|
|
|
|
--prefix LD_LIBRARY_PATH : "$runtimeDependenciesPath" \
|
|
|
|
--run "$prepareParsec"
|
|
|
|
|
2022-12-29 03:59:06 +00:00
|
|
|
substituteInPlace $out/share/applications/parsecd.desktop \
|
|
|
|
--replace "/usr/bin/parsecd" "parsecd" \
|
|
|
|
--replace "/usr/share/icons" "${placeholder "out"}/share/icons"
|
|
|
|
|
2022-10-05 21:43:12 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://parsecgaming.com/";
|
2023-01-24 21:09:06 +00:00
|
|
|
changelog = "https://parsec.app/changelog";
|
2022-10-05 21:43:12 +00:00
|
|
|
description = "Remote streaming service client";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ arcnmx ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
mainProgram = "parsecd";
|
|
|
|
};
|
|
|
|
}
|