Skip to content

Commit 7cb7d25

Browse files
surfaceflingeraldoborrero
authored andcommitted
rotki-bin: 1.33.1 -> 1.37.1; add icon and enable wayland
1 parent 65d7d7c commit 7cb7d25

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

pkgs/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
reth = callPackageUnstable ./reth {};
6363
rocketpool = callPackage ./rocketpool {};
6464
rocketpoold = callPackage ./rocketpoold {inherit bls blst;};
65-
rotki-bin = callPackage2311 ./rotki-bin {};
65+
rotki-bin = callPackageUnstable ./rotki-bin {};
6666
sedge = callPackage2311 ./sedge {
6767
bls = callPackage2311 ./bls {};
6868
mcl = callPackage2311 ./mcl {};

pkgs/rotki-bin/default.nix

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,37 @@
11
{
2-
lib,
32
appimageTools,
43
fetchurl,
4+
lib,
5+
makeWrapper,
56
}:
67
appimageTools.wrapType2 rec {
78
pname = "rotki-bin";
8-
version = "1.33.1";
9+
version = "1.37.1";
910

1011
src = fetchurl {
1112
url = "https://github.com/rotki/rotki/releases/download/v${version}/rotki-linux_x86_64-v${version}.AppImage";
12-
sha256 = "sha256-gC9R9DwOOs4f3ML4gLG27Ud0uQd46tIAGZxIdQn8Rd0=";
13+
sha256 = "sha256-8/QDAfsB3BUf1Fc04ARWjCILh39dFVFEy2tVaMSJ/UE=";
1314
};
1415

15-
# Rename installed bin to `rotki` to make it easier to specify in `apps.rotki-bin.bin` declaration.
16-
extraInstallCommands = ''
17-
mv "$out/bin/${pname}-${version}" "$out/bin/rotki"
16+
nativeBuildInputs = [makeWrapper];
17+
18+
extraInstallCommands = let
19+
contents = appimageTools.extract {inherit pname version src;};
20+
in ''
21+
mv $out/bin/{rotki-bin,rotki}
22+
wrapProgram $out/bin/rotki \
23+
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
24+
install -Dm444 ${contents}/rotki.desktop -t $out/share/applications/
25+
install -Dm444 ${contents}/rotki.png -t $out/share/icons/hicolor/1024x1024/apps/
26+
substituteInPlace $out/share/applications/rotki.desktop \
27+
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=rotki' \
1828
'';
1929

2030
meta = with lib; {
2131
description = "An open source portfolio tracking tool that respects your privacy";
2232
homepage = "https://rotki.com/";
2333
license = licenses.agpl3Plus;
2434
maintainers = with maintainers; [mitchmindtree];
25-
platforms = platforms.linux;
35+
platforms = ["x86_64-linux"];
2636
};
2737
}

0 commit comments

Comments
 (0)