nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 mkDerivation,
4 fetchurl,
5 # build-time
6 extra-cmake-modules,
7 shared-mime-info,
8 # Qt
9 qtxmlpatterns,
10 qtwebengine,
11 qca-qt5,
12 qtnetworkauth,
13 # KDE
14 ki18n,
15 kxmlgui,
16 kio,
17 kiconthemes,
18 kitemviews,
19 kparts,
20 kcoreaddons,
21 kservice,
22 ktexteditor,
23 kdoctools,
24 kwallet,
25 kcrash,
26 # other
27 poppler,
28 bibutils,
29}:
30
31mkDerivation rec {
32 pname = "kbibtex";
33 version = "0.10.0";
34
35 src =
36 let
37 majorMinorPatch = lib.concatStringsSep "." (lib.take 3 (lib.splitVersion version));
38 in
39 fetchurl {
40 url = "mirror://kde/stable/KBibTeX/${majorMinorPatch}/kbibtex-${version}.tar.xz";
41 hash = "sha256-sSeyQKfNd8U4YZ3IgqOZs8bM13oEQopJevkG8U0JuMQ=";
42 };
43
44 patches = [
45 # TODO remove when kbibtex updates past 0.10.0
46 ./cpp-17-for-icu.patch
47 ];
48
49 nativeBuildInputs = [
50 extra-cmake-modules
51 shared-mime-info
52 ];
53
54 buildInputs = [
55 qtxmlpatterns
56 qtwebengine
57 qca-qt5
58 qtnetworkauth
59 # TODO qtoauth
60 ki18n
61 kxmlgui
62 kio
63 kiconthemes
64 kitemviews
65 kparts
66 kcoreaddons
67 kservice
68 ktexteditor
69 kdoctools
70 kwallet
71 kcrash
72 poppler
73 ];
74
75 qtWrapperArgs = [
76 "--prefix"
77 "PATH"
78 ":"
79 "${lib.makeBinPath [ bibutils ]}"
80 ];
81
82 meta = {
83 description = "Bibliography editor for KDE";
84 mainProgram = "kbibtex";
85 homepage = "https://userbase.kde.org/KBibTeX";
86 changelog = "https://invent.kde.org/office/kbibtex/-/raw/v${version}/ChangeLog";
87 license = lib.licenses.gpl2Plus;
88 maintainers = with lib.maintainers; [ dotlambda ];
89 platforms = lib.platforms.linux;
90 };
91}