nixpkgs/pkgs/by-name/ba/bada-bib/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

82 lines
1.4 KiB
Nix

{ lib
, meson
, ninja
, fetchFromGitHub
, appstream-glib
, desktop-file-utils
, gdk-pixbuf
, gettext
, glib
, gobject-introspection
, gtk4
, gtksourceview5
, libadwaita
, libxml2
, pkg-config
, python3Packages
, wrapGAppsHook4
}:
python3Packages.buildPythonApplication rec {
pname = "bada-bib";
version = "0.8.1";
format = "other";
src = fetchFromGitHub {
owner = "RogerCrocker";
repo = "BadaBib";
rev = "refs/tags/v${version}";
sha256 = "sha256-8lpkmQCVh94+qhFJijAIVyYeJRFz2u/OYR1C5E+gtOE=";
};
nativeBuildInputs = [
gettext
gobject-introspection
libxml2
meson
ninja
pkg-config
wrapGAppsHook4
];
buildInputs = [
gdk-pixbuf
glib
gtk4
gtksourceview5
libadwaita
];
nativeCheckInputs = [
appstream-glib
desktop-file-utils
];
pythonPath = with python3Packages; [
bibtexparser
pygobject3
];
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 = "Simple BibTeX Viewer and Editor";
mainProgram = "badabib";
maintainers = [ maintainers.Cogitri ];
license = licenses.gpl3Plus;
};
}