Silvan Mosberger 84d4f874c2 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 78e9caf153f5a339bf1d4c000ff6f0a503a369c8
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:23:58 +01:00

96 lines
2.1 KiB
Nix

{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
squashfsTools,
makeBinaryWrapper,
alsa-lib,
atk,
at-spi2-atk,
cups,
gtk3,
libdrm,
libsecret,
libxkbcommon,
libgbm,
pango,
sqlite,
systemd,
wayland,
xorg,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tradingview";
version = "2.9.3";
revision = "60";
src = fetchurl {
url = "https://api.snapcraft.io/api/v1/snaps/download/nJdITJ6ZJxdvfu8Ch7n5kH5P99ClzBYV_${finalAttrs.revision}.snap";
hash = "sha256-Oa3YfmXDiqKxEMJloTu6ihJ6LKoz2XwQ0su1KrlSaYo=";
};
nativeBuildInputs = [
autoPatchelfHook
makeBinaryWrapper
squashfsTools
];
buildInputs = [
(lib.getLib stdenv.cc.cc)
alsa-lib
atk
at-spi2-atk
cups
gtk3
libdrm
libsecret
libxkbcommon
libgbm
pango
sqlite
systemd
wayland
xorg.libxcb
xorg.libX11
xorg.libXext
];
unpackPhase = ''
runHook preUnpack
unsquashfs $src
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r squashfs-root $out/share/tradingview
rm -rf $out/share/tradingview/meta
install -Dm444 squashfs-root/meta/gui/tradingview.desktop -t $out/share/applications
substituteInPlace $out/share/applications/tradingview.desktop --replace \$\{SNAP}/meta/gui/icon.png tradingview
mkdir $out/share/icons
cp squashfs-root/meta/gui/icon.png $out/share/icons/tradingview.png
mkdir $out/bin
makeBinaryWrapper $out/share/tradingview/tradingview $out/bin/tradingview --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs}
runHook postInstall
'';
meta = with lib; {
description = "Charting platform for traders and investors";
homepage = "https://www.tradingview.com/desktop/";
changelog = "https://www.tradingview.com/support/solutions/43000673888/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ prominentretail ];
platforms = [ "x86_64-linux" ];
mainProgram = "tradingview";
};
})