forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ buildPythonPackage, fetchPypi, lib, stdenv, sip, qtbase, pyqt5, poppler, pkgconfig, fetchpatch
|
|
, substituteAll
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "python-poppler-qt5";
|
|
version = "0.24.2";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r";
|
|
};
|
|
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./poppler-include-dir.patch;
|
|
poppler_include_dir = "${poppler.dev}/include/poppler";
|
|
})
|
|
(fetchpatch {
|
|
url = "https://github.com/wbsoft/python-poppler-qt5/commit/faf4d1308f89560b0d849671226e3080dfc72e79.patch";
|
|
sha256 = "18krhh6wzsnpxzlzv02nginb1vralla8ai24zqk10nc4mj6fkj86";
|
|
})
|
|
];
|
|
|
|
setupPyBuildFlags = [
|
|
"--pyqt-sip-dir ${pyqt5}/share/sip/PyQt5"
|
|
"--qt-include-dir ${qtbase.dev}/include"
|
|
];
|
|
|
|
buildInputs = [ qtbase.dev poppler ];
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
propagatedBuildInputs = [ sip pyqt5.dev ];
|
|
|
|
# no tests, just bindings for `poppler_qt5`
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/wbsoft/python-poppler-qt5";
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|