about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/finance/cryptowatch/default.nix
blob: 08c260c8b8678deb1919bc8bf20f949b6b1ac83f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{ stdenv
, lib
, fetchurl
, autoPatchelfHook
, wrapGAppsHook
, dbus
, libGL
, libX11
, libXcursor
, libXi
, libXrandr
, udev
, unzip
, alsa-lib
}:

stdenv.mkDerivation rec {
  pname = "cryptowatch-desktop";
  version = "0.7.1";

  src = fetchurl {
    url = "https://cryptowat.ch/desktop/download/linux/${version}";
    hash = "sha256-ccyHfjp00CgQH+3SiDWx9yE1skOj0RWxnBomHWY/IaU=";
  };

  unpackPhase = "unzip $src";

  nativeBuildInputs = [
    autoPatchelfHook
    wrapGAppsHook
    unzip
  ];

  buildInputs = [
    dbus
    udev
    alsa-lib
  ];

  sourceRoot = ".";

  installPhase = ''
    install -m755 -D cryptowatch_desktop $out/bin/cryptowatch_desktop
  '';

  preFixup = ''
    gappsWrapperArgs+=(
      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL libX11 libXcursor libXrandr libXi ]}"
    )
  '';

  meta = with lib; {
    homepage = "https://cryptowat.ch";
    description = "Application for visualising real-time cryptocurrency market data";
    platforms = platforms.linux;
    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
    license = licenses.unfree;
    maintainers = with maintainers; [ livnev kashw2 ];
  };
}