nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 cmake,
6 ninja,
7 qttools,
8 qtwebengine,
9 wrapQtAppsHook,
10}:
11
12let
13 eb = fetchFromGitHub {
14 owner = "mvf";
15 repo = "eb";
16 rev = "58e1c3bb9847ed5d05863f478f21e7a8ca3d74c8";
17 hash = "sha256-gZP+2P6fFADWht2c0hXmljVJQX8RpCq2mWP+KDi+GzE=";
18 };
19in
20
21stdenv.mkDerivation {
22 pname = "qolibri";
23 version = "2.1.5-unstable-2024-03-17";
24
25 src = fetchFromGitHub {
26 owner = "mvf";
27 repo = "qolibri";
28 rev = "99f0771184fcb2c5f47aad11c16002ebb8469a3f";
29 hash = "sha256-ArupqwejOO2YK9a3Ky0j20dIHs1jIqJksNIb4K2jwgI=";
30 };
31
32 nativeBuildInputs = [
33 cmake
34 ninja
35 qttools
36 wrapQtAppsHook
37 ];
38
39 buildInputs = [
40 qtwebengine
41 ];
42
43 cmakeFlags = [
44 "-DQOLIBRI_EB_SOURCE_DIR=${eb}"
45 ];
46
47 postInstall = ''
48 install -Dm644 $src/qolibri.desktop -t $out/share/applications
49
50 for size in 16 32 48 64 128; do
51 install -Dm644 \
52 $src/images/qolibri-$size.png \
53 $out/share/icons/hicolor/''${size}x''${size}/apps/qolibri.png
54 done
55 '';
56
57 meta = with lib; {
58 description = "EPWING reader for viewing Japanese dictionaries";
59 homepage = "https://github.com/mvf/qolibri";
60 license = licenses.gpl2;
61 maintainers = with maintainers; [ azahi ];
62 platforms = platforms.unix;
63 broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; # Looks like a libcxx version mismatch problem.
64 mainProgram = "qolibri";
65 };
66}