nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 meson,
4 ninja,
5 fetchFromGitHub,
6 appstream-glib,
7 desktop-file-utils,
8 gdk-pixbuf,
9 gettext,
10 glib,
11 gobject-introspection,
12 gtk4,
13 gtksourceview5,
14 libadwaita,
15 libxml2,
16 pkg-config,
17 python3Packages,
18 wrapGAppsHook4,
19}:
20
21python3Packages.buildPythonApplication rec {
22 pname = "bada-bib";
23 version = "0.8.1";
24 pyproject = false;
25
26 src = fetchFromGitHub {
27 owner = "RogerCrocker";
28 repo = "BadaBib";
29 tag = "v${version}";
30 sha256 = "sha256-8lpkmQCVh94+qhFJijAIVyYeJRFz2u/OYR1C5E+gtOE=";
31 };
32
33 nativeBuildInputs = [
34 gettext
35 gobject-introspection
36 libxml2
37 meson
38 ninja
39 pkg-config
40 wrapGAppsHook4
41 ];
42
43 buildInputs = [
44 gdk-pixbuf
45 glib
46 gtk4
47 gtksourceview5
48 libadwaita
49 ];
50
51 nativeCheckInputs = [
52 appstream-glib
53 desktop-file-utils
54 ];
55
56 pythonPath = with python3Packages; [
57 bibtexparser
58 pygobject3
59 ];
60
61 postPatch = ''
62 patchShebangs build-aux/meson/postinstall.py
63 '';
64
65 dontWrapGApps = true; # Needs python wrapper
66
67 preFixup = ''
68 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
69 '';
70
71 postFixup = ''
72 wrapPythonProgramsIn "$out/libexec" "$out ''${pythonPath[*]}"
73 '';
74
75 meta = {
76 homepage = "https://github.com/RogerCrocker/BadaBib";
77 description = "Simple BibTeX Viewer and Editor";
78 mainProgram = "badabib";
79 maintainers = [ lib.maintainers.Cogitri ];
80 license = lib.licenses.gpl3Plus;
81 };
82}