diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-02-22 10:43:06 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-03-11 16:17:56 +0000 |
commit | ca1aada113c0ebda1ab8667199f6453f8e01c4fc (patch) | |
tree | 55e402280096f62eb0bc8bcad5ce6050c5a0aec7 /nixpkgs/pkgs/development/libraries/libjxl | |
parent | e4df5a52a6a6531f32626f57205356a773ac2975 (diff) | |
parent | 93883402a445ad467320925a0a5dbe43a949f25b (diff) | |
download | nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.gz nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.bz2 nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.lz nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.xz nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.zst nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.zip |
Merge commit '93883402a445ad467320925a0a5dbe43a949f25b'
Conflicts: nixpkgs/nixos/modules/programs/ssh.nix nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix nixpkgs/pkgs/data/fonts/noto-fonts/default.nix nixpkgs/pkgs/development/go-modules/generic/default.nix nixpkgs/pkgs/development/interpreters/ruby/default.nix nixpkgs/pkgs/development/libraries/mesa/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libjxl')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libjxl/default.nix | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libjxl/default.nix b/nixpkgs/pkgs/development/libraries/libjxl/default.nix index b406654caba1..081ddaf4988a 100644 --- a/nixpkgs/pkgs/development/libraries/libjxl/default.nix +++ b/nixpkgs/pkgs/development/libraries/libjxl/default.nix @@ -1,4 +1,5 @@ { stdenv, lib, fetchFromGitHub +, fetchpatch , asciidoc , brotli , cmake @@ -7,6 +8,7 @@ , giflib , gperftools , gtest +, libhwy , libjpeg , libpng , libwebp @@ -18,23 +20,34 @@ stdenv.mkDerivation rec { pname = "libjxl"; - version = "0.5"; + version = "0.6.1"; src = fetchFromGitHub { owner = "libjxl"; repo = "libjxl"; rev = "v${version}"; - sha256 = "0grljgmy6cfhm8zni9d1mdn01qzc49k1pl75vhr7qcd3sp4r8lxm"; + sha256 = "sha256-fTK5hyU9PZ6nigMsfzVugwviihgAXfEcLF+l+n5h+54="; # There are various submodules in `third_party/`. fetchSubmodules = true; }; - # hydra's darwin machines run into https://github.com/libjxl/libjxl/issues/408 - # unless we disable highway's tests - postPatch = lib.optional stdenv.isDarwin '' - substituteInPlace third_party/highway/CMakeLists.txt \ - --replace 'if(BUILD_TESTING)' 'if(false)' - ''; + patches = [ + # present in master, remove after 0.7? + (fetchpatch { + name = "fix-link-lld-macho.patch"; + url = "https://github.com/libjxl/libjxl/commit/88fe3fff3dc70c72405f57c69feffd9823930034.patch"; + sha256 = "1419fyiq4srpj72cynwyvqy8ldi7vn9asvkp5fsbmiqkyhb15jpk"; + }) + + # "robust statistics" have been removed in upstream mainline as they are + # conidered to cause "interoperability problems". sure enough the tests + # fail with precision issues on aarch64. + (fetchpatch { + name = "remove-robust-and-descriptive-statistics.patch"; + url = "https://github.com/libjxl/libjxl/commit/204f87a5e4d684544b13900109abf040dc0b402b.patch"; + sha256 = "sha256-DoAaYWLmQ+R9GZbHMTYGe0gBL9ZesgtB+2WhmbARna8="; + }) + ]; nativeBuildInputs = [ asciidoc # for docs @@ -66,6 +79,7 @@ stdenv.mkDerivation rec { brotli giflib gperftools # provides `libtcmalloc` + libhwy libjpeg libpng libwebp @@ -81,6 +95,9 @@ stdenv.mkDerivation rec { # using the vendorered ones is easier. "-DJPEGXL_FORCE_SYSTEM_BROTLI=ON" + # Use our version of highway, though it is still statically linked in + "-DJPEGXL_FORCE_SYSTEM_HWY=ON" + # TODO: Update this package to enable this (overridably via an option): # Viewer tools for evaluation. # "-DJPEGXL_ENABLE_VIEWERS=ON" @@ -92,13 +109,17 @@ stdenv.mkDerivation rec { # "-DJPEGXL_ENABLE_PLUGINS=ON" ]; + 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 = '' + 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 ''; @@ -108,6 +129,5 @@ stdenv.mkDerivation rec { license = licenses.bsd3; maintainers = with maintainers; [ nh2 ]; platforms = platforms.all; - broken = stdenv.hostPlatform.isAarch64; # `internal compiler error`, see https://github.com/NixOS/nixpkgs/pull/103160#issuecomment-866388610 }; } |