1{ stdenv
2, lib
3, fetchFromGitHub
4, rustPlatform
5, autoPatchelfHook
6, cmake
7, makeWrapper
8, pkg-config
9, python3
10, expat
11, freetype
12, kdialog
13, zenity
14, openssl
15, libglvnd
16, libX11
17, libxcb
18, libXcursor
19, libXi
20, libxkbcommon
21, libXrandr
22, vulkan-loader
23, wayland
24}:
25
26let
27 rpathLibs = [
28 libglvnd
29 libXcursor
30 libXi
31 libxkbcommon
32 libXrandr
33 libX11
34 vulkan-loader
35 wayland
36 ];
37
38in rustPlatform.buildRustPackage rec {
39 pname = "ajour";
40 version = "1.3.2";
41
42 src = fetchFromGitHub {
43 owner = "casperstorm";
44 repo = "ajour";
45 rev = version;
46 sha256 = "sha256-oVaNLclU0EVNtxAASE8plXcC+clkwhBeb9pz1vXufV0=";
47 };
48
49 cargoLock = {
50 lockFile = ./Cargo.lock;
51 outputHashes = {
52 "iced-0.3.0" = "sha256-cPQ0qqcdCMx2agSpAKSvVDBEoF/vUffGg1UkX85KmfY=";
53 };
54 };
55
56 nativeBuildInputs = [
57 autoPatchelfHook
58 cmake
59 makeWrapper
60 pkg-config
61 python3
62 ];
63
64 buildInputs = [
65 expat
66 freetype
67 openssl
68 libxcb
69 libX11
70 libxkbcommon
71 ];
72
73 fixupPhase = ''
74 patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}:$(patchelf --print-rpath $out/bin/ajour)" $out/bin/ajour
75 wrapProgram $out/bin/ajour --prefix PATH ":" ${lib.makeBinPath [ zenity kdialog ]}
76 '';
77
78 meta = with lib; {
79 description = "World of Warcraft addon manager written in Rust";
80 longDescription = ''
81 Ajour is a World of Warcraft addon manager written in Rust with a
82 strong focus on performance and simplicity. The project is
83 completely advertisement free, privacy respecting and open source.
84 '';
85 homepage = "https://github.com/casperstorm/ajour";
86 changelog = "https://github.com/casperstorm/ajour/blob/master/CHANGELOG.md";
87 license = licenses.mit;
88 broken = stdenv.isDarwin;
89 maintainers = with maintainers; [ hexa ];
90 };
91}