nixpkgs/pkgs/by-name/py/pympress/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

61 lines
1.3 KiB
Nix

{ lib
, stdenv
, python3Packages
, fetchPypi
, wrapGAppsHook3
, gtk3
, gobject-introspection
, libcanberra-gtk3
, poppler_gi
, withGstreamer ? stdenv.hostPlatform.isLinux
, gst_all_1
, withVLC ? stdenv.hostPlatform.isLinux
}:
python3Packages.buildPythonApplication rec {
pname = "pympress";
version = "1.8.5";
src = fetchPypi {
inherit version;
pname = "pympress";
hash = "sha256-Kb05EV0F8lTamTq7pC1UoOkYf04s58NjMksVE2xTC/Y=";
};
nativeBuildInputs = [
wrapGAppsHook3
gobject-introspection
];
buildInputs = [
gtk3
poppler_gi
] ++ lib.optionals withGstreamer [
libcanberra-gtk3
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
(gst_all_1.gst-plugins-good.override {gtkSupport = true;})
gst_all_1.gst-libav
gst_all_1.gst-vaapi
];
propagatedBuildInputs = with python3Packages; [
pycairo
pygobject3
setuptools
watchdog
] ++ lib.optional withVLC python-vlc;
doCheck = false; # there are no tests
meta = with lib; {
description = "Simple yet powerful PDF reader designed for dual-screen presentations";
mainProgram = "pympress";
license = licenses.gpl2Plus;
homepage = "https://cimbali.github.io/pympress/";
maintainers = [ maintainers.tbenst ];
};
}