Change:
Project description Desktop application for charting, technical analysis, and trading. It provides traders and investors with a wide range of tools and features to analyze financial markets and make informed trading decisions. TradingView offers real-time and historical market data for various financial instruments such as stocks, cryptocurrencies, forex pairs, commodities, and indices. Users can create interactive charts with a variety of chart types, timeframes, and drawing tools. They can apply technical indicators and overlays to analyze price movements, identify trends, and generate trading signals. Metadata homepage URL: source URL: source URL(2): (Maybe this could help) license: Propietary platforms: linux

Discussion:
<ins> { lib , stdenv , fetchurl , autoPatchelfHook , squashfsTools , makeBinaryWrapper , alsa-lib , atk , at-spi2-atk , cups , gtk3 , libdrm , libsecret , libxkbcommon , mesa , pango , sqlite , systemd , wayland , xorg }: stdenv.mkDerivation rec { pname = "tradingview"; version = "2.6.1"; revision = "44"; src = fetchurl { url = "https://api.snapcraft.io/api/v1/snaps/download/nJdITJ6ZJxdvfu8Ch7n5kH5P99ClzBYV_${revision}.snap"; hash = "sha512-Hd00TWjPskd0QDzpOSwQCuMw20nW4n1xxRkT1rA95pzbXtw7XFxrJdMWkzWDbucuokU2qR2b5tovAHAgw9E0tQ=="; }; nativeBuildInputs = [ autoPatchelfHook makeBinaryWrapper squashfsTools ]; buildInputs = [ stdenv.cc.cc.lib alsa-lib atk at-spi2-atk cups gtk3 libdrm libsecret libxkbcommon mesa pango sqlite systemd wayland xorg.libxcb xorg.libX11 xorg.libXext ]; unpackPhase = '' runHook preUnpack unsquashfs $src runHook postUnpack ''; installPhase = '' runHook preInstall mkdir -p $out cp -r squashfs-root/* $out mkdir -p $out/share/applications mv $out/meta/gui/tradingview.desktop $out/share/applications substituteInPlace $out/share/applications/tradingview.desktop --replace ${SNAP} $out mkdir $out/bin makeBinaryWrapper $out/tradingview $out/bin/tradingview --prefix LD_LIBRARY_PATH : ${ lib.makeLibraryPath 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"; }; } </ins>

<ins> #!/usr/bin/env nix-shell #! nix-shell -i bash -p curl jq git gnused gnugrep # # Get latest version of TradingView from Snapcraft. # snap_info=($( curl -s -H 'X-Ubuntu-Series: 16'  'https://api.snapcraft.io/api/v1/snaps/details/tradingview'  | jq --raw-output  '.revision,.download_sha512,.version,.last_updated' )) # "revision" is the actual version identifier; "version" is for human consumption. revision="${snap_info[0]}" sha512="${snap_info[1]}" sri=$(nix hash to-sri --type "sha512" $sha512) upstream_version="${snap_info[2]}" last_updated="${snap_info[3]}" echo "Latest release is $upstream_version from $last_updated." # # Read the current TradingView version. # nixpkgs="$(git rev-parse --show-toplevel)" tradingview_nix="$nixpkgs/pkgs/applications/finance/tradingview/default.nix" current_nix_version=$( grep 'versions*=' "$tradingview_nix"  | sed -Ene 's/.*"(.*)".*/1/p' ) echo "Current nix version: $current_nix_version" if [[ "$current_nix_version" = "$upstream_version" ]]; then echo "TradingView is already up-to-date" exit 0 fi # # Find and replace. # echo "Updating from ${current_nix_version} to ${upstream_version}, released ${last_updated}" sed --regexp-extended  -e 's/revisions*=s*"[0-9]+"s*;/revision = "'"${revision}"'";/'  -e 's/hashs*=s*"[^"]*"s*;/hash = "'"${sri}"'";/'  -e 's/versions*=s*".*"s*;/version = "'"${upstream_version}"'";/'  -i "$tradingview_nix" # # Attempt a build. # export NIXPKGS_ALLOW_UNFREE=1 if ! nix-build -A tradingview "$nixpkgs"; then echo "The updated TradingView failed to build." exit 1 fi # # Commit changes. # git add "$tradingview_nix" git commit -m "tradingview: ${current_nix_version} -> ${upstream_version}" </ins>