about summary refs log tree commit diff
path: root/pkgs/applications/science/misc/bada-bib
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2021-12-28 12:25:50 +0100
committerRasmus Thomsen <oss@cogitri.dev>2021-12-28 12:40:39 +0100
commit83e5da923814a54eda6a27a6854f7d9cda7f76a4 (patch)
treed19f1e8de21414114312b3ddb807faf131aed242 /pkgs/applications/science/misc/bada-bib
parent2a38d239754bd801f182046413fd636fbc2a9ee9 (diff)
bada-bib: init at 0.3.0
Diffstat (limited to 'pkgs/applications/science/misc/bada-bib')
-rw-r--r--pkgs/applications/science/misc/bada-bib/default.nix78
1 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/applications/science/misc/bada-bib/default.nix b/pkgs/applications/science/misc/bada-bib/default.nix
new file mode 100644
index 0000000000000..e57a01fb17e89
--- /dev/null
+++ b/pkgs/applications/science/misc/bada-bib/default.nix
@@ -0,0 +1,78 @@
+{ lib
+, meson
+, ninja
+, fetchFromGitHub
+, appstream-glib
+, desktop-file-utils
+, gdk-pixbuf
+, gettext
+, glib
+, gnome
+, gobject-introspection
+, gtk3
+, libxml2
+, pkg-config
+, python3Packages
+, wrapGAppsHook }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "bada-bib";
+  version = "0.3.0";
+  format = "other";
+  strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943
+
+  src = fetchFromGitHub {
+    owner = "RogerCrocker";
+    repo = "BadaBib";
+    rev = "v${version}";
+    sha256 = "0rclkkf5kd9ab049lizliiqawx5c5y2qmq40lkxnx09sa0283vg8";
+  };
+
+  nativeBuildInputs = [
+    gettext
+    gobject-introspection
+    libxml2
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gdk-pixbuf
+    glib
+    gtk3
+  ];
+
+  checkInputs = [
+    appstream-glib
+    desktop-file-utils
+  ];
+
+  pythonPath = with python3Packages; [
+    bibtexparser
+    pygobject3
+    watchgod
+  ];
+
+  postPatch = ''
+    patchShebangs build-aux/meson/postinstall.py
+  '';
+
+  dontWrapGApps = true; # Needs python wrapper
+
+  preFixup = ''
+    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
+  '';
+
+  postFixup = ''
+    wrapPythonProgramsIn "$out/libexec" "$out $pythonPath"
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/RogerCrocker/BadaBib";
+    description = "A simple BibTeX Viewer and Editor";
+    maintainers = [ maintainers.Cogitri ];
+    license = licenses.gpl3Plus;
+  };
+}