diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-12-06 19:57:55 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-02-08 13:48:30 +0000 |
commit | bf3aadfdd39aa197e18bade671fab6726349ffa4 (patch) | |
tree | 698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/libraries/libjxl | |
parent | f4afc5a01d9539ce09e47494e679c51f80723d07 (diff) | |
parent | 99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff) | |
download | nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2 nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip |
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libjxl')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libjxl/default.nix | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libjxl/default.nix b/nixpkgs/pkgs/development/libraries/libjxl/default.nix index 081ddaf4988a..be0a4fb91549 100644 --- a/nixpkgs/pkgs/development/libraries/libjxl/default.nix +++ b/nixpkgs/pkgs/development/libraries/libjxl/default.nix @@ -1,10 +1,7 @@ { stdenv, lib, fetchFromGitHub , fetchpatch -, asciidoc , brotli , cmake -, graphviz -, doxygen , giflib , gperftools , gtest @@ -14,8 +11,12 @@ , libwebp , openexr , pkg-config -, python3 , zlib +, buildDocs ? true +, asciidoc +, graphviz +, doxygen +, python3 }: stdenv.mkDerivation rec { @@ -47,16 +48,28 @@ stdenv.mkDerivation rec { url = "https://github.com/libjxl/libjxl/commit/204f87a5e4d684544b13900109abf040dc0b402b.patch"; sha256 = "sha256-DoAaYWLmQ+R9GZbHMTYGe0gBL9ZesgtB+2WhmbARna8="; }) + + # fix build with asciidoc wrapped in shell script + (fetchpatch { + url = "https://github.com/libjxl/libjxl/commit/b8ec58c58c6281987f42ebec892f513824c0cc0e.patch"; + hash = "sha256-g8U+YVhLfgSHJ+PWJgvVOI66+FElJSC8IgSRodNnsMw="; + }) + (fetchpatch { + url = "https://github.com/libjxl/libjxl/commit/ca8e276aacf63a752346a6a44ba673b0af993237.patch"; + excludes = [ "AUTHORS" ]; + hash = "sha256-9VXy1LdJ0JhYbCGPNMySpnGLBxUrr8BYzE+oU3LnUGw="; + }) ]; nativeBuildInputs = [ - asciidoc # for docs cmake - graphviz # for docs via doxygen component `dot` - doxygen # for docs gtest pkg-config - python3 # for docs + ] ++ lib.optionals buildDocs [ + asciidoc + graphviz + doxygen + python3 ]; # Functionality not currently provided by this package @@ -76,10 +89,8 @@ stdenv.mkDerivation rec { # conclusively in its README or otherwise; they can best be determined # by checking the CMake output for "Could NOT find". buildInputs = [ - brotli giflib gperftools # provides `libtcmalloc` - libhwy libjpeg libpng libwebp @@ -87,6 +98,11 @@ stdenv.mkDerivation rec { zlib ]; + propagatedBuildInputs = [ + brotli + libhwy + ]; + cmakeFlags = [ # For C dependencies like brotli, which are dynamically linked, # we want to use the system libraries, so that we don't have to care about @@ -111,17 +127,7 @@ stdenv.mkDerivation rec { LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic"; - doCheck = true; - - # The test driver runs a test `LibraryCLinkageTest` which without - # LD_LIBRARY_PATH setting errors with: - # /build/source/build/tools/tests/libjxl_test: error while loading shared libraries: libjxl.so.0 - # The required file is in the build directory (`$PWD`). - preCheck = if stdenv.isDarwin then '' - export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD - '' else '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD - ''; + doCheck = !stdenv.hostPlatform.isi686; meta = with lib; { homepage = "https://github.com/libjxl/libjxl"; |