diff --git a/pkgs/applications/misc/parsec/bin.nix b/pkgs/applications/misc/parsec/bin.nix new file mode 100644 index 000000000000..502ee9f7f016 --- /dev/null +++ b/pkgs/applications/misc/parsec/bin.nix @@ -0,0 +1,81 @@ +{ 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"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0a06ecf7dac6..482e84951064 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30662,6 +30662,8 @@ with pkgs; enableDbusUi = false; }; + parsec-bin = callPackage ../applications/misc/parsec/bin.nix { }; + pavucontrol = callPackage ../applications/audio/pavucontrol { }; paraview = libsForQt5.callPackage ../applications/graphics/paraview { };