-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
/
Copy pathpackage.nix
95 lines (85 loc) · 1.86 KB
/
package.nix
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
pkg-config,
cmake,
copyDesktopItems,
makeDesktopItem,
makeWrapper,
expat,
fontconfig,
freetype,
libGL,
udev,
libxkbcommon,
wayland,
vulkan-loader,
xorg,
}:
let
runtimeLibs = [
expat
fontconfig
freetype
freetype.dev
libGL
pkg-config
udev
wayland
libxkbcommon
vulkan-loader
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
];
in
rustPlatform.buildRustPackage rec {
pname = "liana";
version = "9.0"; # keep in sync with lianad
src = fetchFromGitHub {
owner = "wizardsardine";
repo = "liana";
tag = "v${version}";
hash = "sha256-RFlICvoePwSglpheqMb+820My//LElnSeMDPFmXyHz0=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-nj7L4glbjevVd1ef6RUGPm4hpzeNdnsCLC01BOJj6kI=";
nativeBuildInputs = [
pkg-config
cmake
copyDesktopItems
makeWrapper
];
buildInputs = [
fontconfig
udev
];
buildAndTestSubdir = "liana-gui";
postInstall = ''
install -Dm0644 ./liana-ui/static/logos/liana-app-icon.svg $out/share/icons/hicolor/scalable/apps/liana.svg
wrapProgram $out/bin/liana-gui --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeLibs}"
'';
desktopItems = [
(makeDesktopItem {
name = "Liana";
exec = "liana-gui";
icon = "liana";
desktopName = "Liana";
comment = meta.description;
})
];
doCheck = true;
meta = with lib; {
mainProgram = "liana-gui";
description = "A Bitcoin wallet leveraging on-chain timelocks for safety and recovery";
homepage = "https://wizardsardine.com/liana";
changelog = "https://github.com/wizardsardine/liana/releases/tag/${src.rev}";
license = licenses.bsd3;
maintainers = with maintainers; [ dunxen ];
platforms = platforms.linux;
broken = stdenv.hostPlatform.isAarch64;
};
}