nixpkgs/pkgs/applications/misc/parsec/bin.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

124 lines
2.3 KiB
Nix

{
stdenvNoCC,
stdenv,
lib,
dpkg,
autoPatchelfHook,
makeWrapper,
fetchurl,
alsa-lib,
openssl,
udev,
libglvnd,
libX11,
libXcursor,
libXi,
libXrandr,
libXfixes,
libpulseaudio,
libva,
ffmpeg_6,
libpng,
libjpeg8,
curl,
vulkan-loader,
zenity,
}:
stdenvNoCC.mkDerivation {
pname = "parsec-bin";
version = "150_95";
src = fetchurl {
url = "https://web.archive.org/web/20240725203323/https://builds.parsec.app/package/parsec-linux.deb";
sha256 = "sha256-9F56u+jYj2CClhbnGlLi65FxS1Vq00coxwu7mjVTY1w=";
};
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_6
libpng
libjpeg8
curl
libX11
libXcursor
libXi
libXrandr
libXfixes
vulkan-loader
];
binPath = lib.makeBinPath [
zenity
];
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 PATH : "$binPath" \
--prefix LD_LIBRARY_PATH : "$runtimeDependenciesPath" \
--run "$prepareParsec"
substituteInPlace $out/share/applications/parsecd.desktop \
--replace "/usr/bin/parsecd" "parsecd" \
--replace "/usr/share/icons" "${placeholder "out"}/share/icons"
runHook postInstall
'';
# Only the main binary needs to be patched, the wrapper script handles
# everything else. The libraries in `share/parsec/skel` would otherwise
# contain dangling references when copied out of the nix store.
dontAutoPatchelf = true;
fixupPhase = ''
runHook preFixup
autoPatchelf $out/bin
runHook postFixup
'';
meta = with lib; {
homepage = "https://parsec.app/";
changelog = "https://parsec.app/changelog";
description = "Remote streaming service client";
license = licenses.unfree;
maintainers = with maintainers; [
arcnmx
pabloaul
];
platforms = platforms.linux;
mainProgram = "parsecd";
};
}