From 771e8cf391f3650aceb09889bedb84f305548551 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 22 Jun 2024 10:33:22 +0100 Subject: [PATCH 1/2] libimobiledevice: enable build parallelism --- pkgs/development/libraries/libimobiledevice/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/libimobiledevice/default.nix b/pkgs/development/libraries/libimobiledevice/default.nix index f995ac883611..fe6c13eb5201 100644 --- a/pkgs/development/libraries/libimobiledevice/default.nix +++ b/pkgs/development/libraries/libimobiledevice/default.nix @@ -52,6 +52,8 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; + enableParallelBuilding = true; + passthru.updateScript = unstableGitUpdater { }; meta = with lib; { From 0fc457d161ef51966733fb8fd8fabee6e90298f4 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 22 Jun 2024 10:35:30 +0100 Subject: [PATCH 2/2] libimobiledevice: pull `gcc-14` fix pending upstream inclusion Without the change both `gcc-14` and `clag` `stdenv`s fil the build as: $ nix build --impure --expr 'with import ./. {}; libimobiledevice.override {stdenv = gcc14Stdenv; }' -L ... libimobiledevice> afcclient.c: In function 'print_file_info': libimobiledevice> afcclient.c:488:17: error: implicit declaration of function 'strftime' [8;;https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaration8;;] libimobiledevice> 488 | strftime(timebuf, 64, "%d %h %Y %H:%M:%S", localtime(&t)); libimobiledevice> | ^~~~~~~~ libimobiledevice> afcclient.c:75:1: note: include '' or provide a declaration of 'strftime' libimobiledevice> 74 | #include libimobiledevice> +++ |+#include libimobiledevice> 75 | --- .../development/libraries/libimobiledevice/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/libraries/libimobiledevice/default.nix b/pkgs/development/libraries/libimobiledevice/default.nix index fe6c13eb5201..0e81f32bebf8 100644 --- a/pkgs/development/libraries/libimobiledevice/default.nix +++ b/pkgs/development/libraries/libimobiledevice/default.nix @@ -26,6 +26,16 @@ stdenv.mkDerivation rec { hash = "sha256-pNvtDGUlifp10V59Kah4q87TvLrcptrCJURHo+Y+hs4="; }; + patches = [ + # Fix gcc-14 and clang-16 build: + # https://github.com/libimobiledevice/libimobiledevice/pull/1569 + (fetchpatch { + name = "fime.h.patch"; + url = "https://github.com/libimobiledevice/libimobiledevice/commit/92256c2ae2422dac45d8648a63517598bdd89883.patch"; + hash = "sha256-sB+wEFuXFoQnuf7ntWfvYuCgWfYbmlPL7EjW0L0F74o="; + }) + ]; + preAutoreconf = '' export RELEASE_VERSION=${version} '';