Merge pull request #332385 from greg-hellings/browsr-1.21.0

browsr: 1.19.0 -> 1.21.0, mupdf: 1.23.6 -> 1.24.8, python312Packages.pymupdf: 1.23.6 -> 1.24.8, python312Packages.textual-universal-directory: 1.1.0 -> 1.5.0
This commit is contained in:
Thiago Kenji Okada 2024-08-14 17:15:00 +01:00 committed by GitHub
commit e0626c756e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 32 additions and 34 deletions

View File

@ -6,14 +6,14 @@
python3.pkgs.buildPythonApplication rec {
pname = "browsr";
version = "1.19.0";
version = "1.21.0";
pyproject = true;
src = fetchFromGitHub {
owner = "juftin";
repo = "browsr";
rev = "refs/tags/v${version}";
hash = "sha256-V5B+/zfUlpF0TMTHqzyjapW93/DoJKgbJkTMX2NZyIQ=";
hash = "sha256-76OzJOunZRVSGalQiyX+TSukD8rRIFHxA713NqOn3PY=";
};
nativeBuildInputs = with python3.pkgs; [
@ -56,6 +56,7 @@ python3.pkgs.buildPythonApplication rec {
"art"
"pandas"
"pymupdf"
"pyperclip"
"rich-click"
"rich-pixels"
"rich"

View File

@ -1,13 +0,0 @@
Use command -v in favor of which
--- a/Makerules
+++ b/Makerules
@@ -170,7 +170,7 @@
ifneq ($(ARCHFLAGS),)
$(warning "MacOS with ARCHFLAGS set. Assuming we are building for arm64, and setting HAVE_LIBCRYPTO to no.")
HAVE_LIBCRYPTO := no
- else ifeq (, $(shell which pkg-config))
+ else ifeq (, $(shell command -v pkg-config))
$(warning "No pkg-config found, install it for proper integration of libcrypto")
else
HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)

View File

@ -60,18 +60,18 @@ let
in
stdenv.mkDerivation rec {
version = "1.23.6";
version = "1.24.8";
pname = "mupdf";
src = fetchurl {
url = "https://mupdf.com/downloads/archive/${pname}-${version}-source.tar.gz";
sha256 = "sha256-rBHrhZ3UBEiOUVPNyWUbtDQeW6r007Pyfir8gvmq3Ck=";
hash = "sha256-pRjZvpds2yAG1FOC1/+xubjWS8P9PLc8picNdS+n9Eg=";
};
patches = [ ./0001-Use-command-v-in-favor-of-which.patch
./0002-Add-Darwin-deps.patch
./0003-Fix-cpp-build.patch
];
patches = [
./0002-Add-Darwin-deps.patch
./0003-Fix-cpp-build.patch
];
postPatch = ''
substituteInPlace Makerules --replace "(shell pkg-config" "(shell $PKG_CONFIG"
@ -166,20 +166,21 @@ stdenv.mkDerivation rec {
EOF
moveToOutput "bin" "$bin"
cp ./build/shared-release/libmupdf.so* $out/lib
'' + (lib.optionalString (stdenv.isDarwin) ''
for exe in $bin/bin/*; do
install_name_tool -change build/shared-release/libmupdf.dylib $out/lib/libmupdf.dylib "$exe"
done
'') + (lib.optionalString (enableX11 || enableGL) ''
mkdir -p $bin/share/icons/hicolor/48x48/apps
cp docs/logo/mupdf.png $bin/share/icons/hicolor/48x48/apps
cp docs/logo/mupdf-icon-48.png $bin/share/icons/hicolor/48x48/apps
'') + (if enableGL then ''
ln -s "$bin/bin/mupdf-gl" "$bin/bin/mupdf"
'' else lib.optionalString (enableX11) ''
ln -s "$bin/bin/mupdf-x11" "$bin/bin/mupdf"
'') + (lib.optionalString (enableCxx) ''
cp platform/c++/include/mupdf/*.h $out/include/mupdf
cp build/*/libmupdfcpp.so $out/lib
cp build/*/libmupdfcpp.so* $out/lib
'') + (lib.optionalString (enablePython) (''
mkdir -p $out/${python3.sitePackages}/mupdf
cp build/*/_mupdf.so $out/${python3.sitePackages}

View File

@ -40,7 +40,7 @@ let
in
buildPythonPackage rec {
pname = "pymupdf";
version = "1.23.26";
version = "1.24.8";
pyproject = true;
disabled = pythonOlder "3.7";
@ -49,15 +49,14 @@ buildPythonPackage rec {
owner = "pymupdf";
repo = "PyMuPDF";
rev = "refs/tags/${version}";
hash = "sha256-m2zq04+PDnlzFuqeSt27UhdHXTHxpHdMPIg5RQl/5bQ=";
hash = "sha256-NG4ZJYMYTQHiqpnaOz7hxf5UW417UKawe5EqXaBnKJ8=";
};
# swig is not wrapped as Python package
# libclang calls itself just clang in wheel metadata
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"swig",' "" \
--replace-fail "libclang" "clang"
substituteInPlace setup.py \
--replace-fail "ret.append( 'swig')" "pass" \
'';
nativeBuildInputs = [
@ -81,6 +80,8 @@ buildPythonPackage rec {
env = {
# force using system MuPDF (must be defined in environment and empty)
PYMUPDF_SETUP_MUPDF_BUILD = "";
# Setup the name of the package away from the default 'libclang'
PYMUPDF_SETUP_LIBCLANG = "clang";
# provide MuPDF paths
PYMUPDF_MUPDF_LIB = "${lib.getLib mupdf-cxx}/lib";
PYMUPDF_MUPDF_INCLUDE = "${lib.getDev mupdf-cxx}/include";
@ -104,6 +105,9 @@ buildPythonPackage rec {
disabledTests =
[
# Fails in release tarballs without .git
"test_codespell"
"test_pylint"
# fails for indeterminate reasons
"test_2548"
"test_2753"
@ -140,6 +144,8 @@ buildPythonPackage rec {
"test_3140"
"test_3209"
"test_3209"
"test_3301"
"test_3347"
"test_caret"
"test_deletion"
"test_file_info"
@ -153,6 +159,12 @@ buildPythonPackage rec {
"test_htmlbox"
"test_2246"
"test_3140"
"test_3400"
"test_707560"
"test_open"
"test_objectstream1"
"test_objectstream2"
"test_objectstream3"
"test_fit_springer"
"test_write_stabilized_with_links"
"test_textbox"
@ -173,10 +185,7 @@ buildPythonPackage rec {
"tests/test_docs_samples.py"
];
pythonImportsCheck = [
"fitz"
"fitz_old"
];
pythonImportsCheck = [ "fitz" ];
meta = with lib; {
description = "Python bindings for MuPDF's rendering library";

View File

@ -16,7 +16,7 @@
buildPythonPackage rec {
pname = "textual-universal-directorytree";
version = "1.1.0";
version = "1.5.0";
pyproject = true;
disabled = pythonOlder "3.8";
@ -25,7 +25,7 @@ buildPythonPackage rec {
owner = "juftin";
repo = "textual-universal-directorytree";
rev = "refs/tags/v${version}";
hash = "sha256-ncQ3IRaZaCv1rMUWT9dkUKo6OAEC5pziMCM7adIBGWo=";
hash = "sha256-hUig0aJWSS0FsgRIrs74/uVaQgH6tczJWO5rj6TVOvQ=";
};
nativeBuildInputs = [ hatchling ];