1{
2 stdenv,
3 lib,
4 requireFile,
5 unzip,
6 glib,
7 systemd,
8 nss,
9 nspr,
10 gtk3-x11,
11 pango,
12 atk,
13 cairo,
14 gdk-pixbuf,
15 xorg,
16 xorg_sys_opengl,
17 util-linux,
18 alsa-lib,
19 dbus,
20 at-spi2-atk,
21 cups,
22 vivaldi-ffmpeg-codecs,
23 libpulseaudio,
24 at-spi2-core,
25 libxkbcommon,
26 libgbm,
27}:
28
29stdenv.mkDerivation (finalAttrs: {
30 pname = "exodus";
31 version = "25.28.4";
32
33 src = requireFile {
34 name = "exodus-linux-x64-${finalAttrs.version}.zip";
35 url = "https://downloads.exodus.com/releases/exodus-linux-x64-${finalAttrs.version}.zip";
36 hash = "sha256-AGeFsMHSywC32iaIGI9/VY2YC3gR5bHu33rOWJlyFFM=";
37 };
38
39 nativeBuildInputs = [ unzip ];
40
41 installPhase = ''
42 mkdir -p $out/bin $out/share/applications
43 cp -r . $out
44 ln -s $out/Exodus $out/bin/Exodus
45 ln -s $out/bin/Exodus $out/bin/exodus
46 ln -s $out/exodus.desktop $out/share/applications
47 substituteInPlace $out/share/applications/exodus.desktop \
48 --replace-fail 'Exec=bash -c "cd \\`dirname %k\\` && ./Exodus %u"' "Exec=Exodus %u"
49 '';
50
51 dontPatchELF = true;
52 dontBuild = true;
53
54 preFixup =
55 let
56 libPath = lib.makeLibraryPath [
57 glib
58 nss
59 nspr
60 gtk3-x11
61 pango
62 atk
63 cairo
64 gdk-pixbuf
65 xorg.libX11
66 xorg.libxcb
67 xorg.libXcomposite
68 xorg.libXcursor
69 xorg.libXdamage
70 xorg.libXext
71 xorg.libXfixes
72 xorg.libXi
73 xorg.libXrender
74 xorg.libxshmfence
75 xorg.libXtst
76 xorg_sys_opengl
77 util-linux
78 xorg.libXrandr
79 xorg.libXScrnSaver
80 alsa-lib
81 dbus.lib
82 at-spi2-atk
83 at-spi2-core
84 cups.lib
85 libpulseaudio
86 systemd
87 vivaldi-ffmpeg-codecs
88 libxkbcommon
89 libgbm
90 ];
91 in
92 ''
93 patchelf \
94 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
95 --set-rpath "${libPath}" \
96 $out/Exodus
97 '';
98
99 meta = with lib; {
100 homepage = "https://www.exodus.io/";
101 description = "Top-rated cryptocurrency wallet with Trezor integration and built-in Exchange";
102 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
103 license = licenses.unfree;
104 platforms = platforms.linux;
105 maintainers = with maintainers; [
106 mmahut
107 rople380
108 Crafter
109 ];
110 };
111})