mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
82 lines
1.6 KiB
Nix
82 lines
1.6 KiB
Nix
{ stdenvNoCC, stdenv
|
|
, lib
|
|
, dpkg, autoPatchelfHook, makeWrapper
|
|
, fetchurl
|
|
, alsa-lib, openssl, udev
|
|
, libglvnd
|
|
, libX11, libXcursor, libXi, libXrandr
|
|
, libpulseaudio
|
|
, libva
|
|
, ffmpeg
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
pname = "parsec-bin";
|
|
version = "150_28";
|
|
|
|
src = fetchurl {
|
|
url = "https://web.archive.org/web/20220622215230id_/https://builds.parsecgaming.com/package/parsec-linux.deb";
|
|
sha256 = "1hfdzjd8qiksv336m4s4ban004vhv00cv2j461gc6zrp37s0fwhc";
|
|
};
|
|
|
|
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
|
|
libX11
|
|
libXcursor
|
|
libXi
|
|
libXrandr
|
|
];
|
|
|
|
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"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://parsecgaming.com/";
|
|
description = "Remote streaming service client";
|
|
license = licenses.unfree;
|
|
maintainers = with maintainers; [ arcnmx ];
|
|
platforms = platforms.linux;
|
|
mainProgram = "parsecd";
|
|
};
|
|
}
|