From 562fe949e72f35a5f9eb734cd155827111a91e91 Mon Sep 17 00:00:00 2001 From: aleksana Date: Mon, 8 Jul 2024 02:46:19 +0800 Subject: [PATCH 1/2] blend2d: init at 0.10 (cherry picked from commit 5bbbca9a0c94e84c9d20f5c8598d1d3a481c6f96) --- pkgs/by-name/bl/blend2d/package.nix | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/by-name/bl/blend2d/package.nix diff --git a/pkgs/by-name/bl/blend2d/package.nix b/pkgs/by-name/bl/blend2d/package.nix new file mode 100644 index 0000000000000..dd5867950e9ca --- /dev/null +++ b/pkgs/by-name/bl/blend2d/package.nix @@ -0,0 +1,39 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + asmjit, +}: + +stdenv.mkDerivation { + pname = "blend2d"; + # Note: this is an outdated version for pdf4qt, but vcpkg also uses it + # See 'Commit Hashes' in https://blend2d.com/download.html for newest + # If the newest version is needed, we can rename this package. + version = "0.10"; + + src = fetchFromGitHub { + owner = "blend2d"; + repo = "blend2d"; + rev = "452d549751188b04367b5af46c040cb737f5f76c"; + hash = "sha256-LDhnXsp/V1A3YqVyjBVaL7/V6Nhts/1E9hRhl2P293o="; + }; + + outputs = [ + "out" + "dev" + ]; + + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ (lib.cmakeFeature "ASMJIT_DIR" (toString asmjit.src)) ]; + + meta = { + description = "2D Vector Graphics Engine Powered by a JIT Compiler"; + homepage = "https://blend2d.com"; + license = lib.licenses.zlib; + maintainers = with lib.maintainers; [ aleksana ]; + platforms = lib.platforms.all; + }; +} From 491127d8f80153c1fd0344962c6044625df99721 Mon Sep 17 00:00:00 2001 From: aleksana Date: Mon, 8 Jul 2024 13:23:56 +0800 Subject: [PATCH 2/2] pdf4qt: 1.3.7 -> 1.4.0.0 (cherry picked from commit 0ba61ba45f3ab67c6e422c5d7550e4ff7061ed16) --- pkgs/by-name/pd/pdf4qt/package.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pd/pdf4qt/package.nix b/pkgs/by-name/pd/pdf4qt/package.nix index fd87006b8bd1f..ff9aa46666cf1 100644 --- a/pkgs/by-name/pd/pdf4qt/package.nix +++ b/pkgs/by-name/pd/pdf4qt/package.nix @@ -6,19 +6,21 @@ , cmake , pkg-config , qt6 +, wrapGAppsHook3 , openjpeg , tbb_2021_11 +, blend2d }: stdenv.mkDerivation (finalAttrs: { pname = "pdf4qt"; - version = "1.3.7"; + version = "1.4.0.0"; src = fetchFromGitHub { owner = "JakubMelka"; repo = "PDF4QT"; rev = "v${finalAttrs.version}"; - hash = "sha256-wZJDMLEaHGBPSToQ+ObSfB5tw/fTIX1i5tmNPmIa7Ck="; + hash = "sha256-NlIy/C4uHRG5wwXPuqCShe113qhhsQ5jp50zrOLLA2c="; }; patches = [ @@ -33,6 +35,8 @@ stdenv.mkDerivation (finalAttrs: { pkg-config qt6.qttools qt6.wrapQtAppsHook + # GLib-GIO-ERROR: No GSettings schemas are installed on the system + wrapGAppsHook3 ]; buildInputs = [ @@ -43,12 +47,19 @@ stdenv.mkDerivation (finalAttrs: { lcms openjpeg tbb_2021_11 + blend2d ]; cmakeFlags = [ (lib.cmakeBool "PDF4QT_INSTALL_TO_USR" false) ]; + dontWrapGApps = true; + + preFixup = '' + qtWrapperArgs+=(''${gappsWrapperArgs[@]}) + ''; + meta = { description = "Open source PDF editor"; longDescription = ''