diff --git a/pkgs/by-name/li/libbladeRF/gcc-14-calloc-fixes.diff b/pkgs/by-name/li/libbladeRF/gcc-14-calloc-fixes.diff new file mode 100644 index 000000000000..ae11b26073b6 --- /dev/null +++ b/pkgs/by-name/li/libbladeRF/gcc-14-calloc-fixes.diff @@ -0,0 +1,26 @@ +diff --git a/host/utilities/bladeRF-fsk/c/src/fir_filter.c b/host/utilities/bladeRF-fsk/c/src/fir_filter.c +index 59f34f0..7def697 100644 +--- a/host/utilities/bladeRF-fsk/c/src/fir_filter.c ++++ b/host/utilities/bladeRF-fsk/c/src/fir_filter.c +@@ -213,18 +213,18 @@ int main(int argc, char *argv[]) + return EXIT_FAILURE; + } + +- inbuf = calloc(2*sizeof(int16_t), chunk_size); ++ inbuf = calloc(chunk_size, 2*sizeof(int16_t)); + if (!inbuf) { + perror("calloc"); + goto out; + } +- tempbuf = calloc(2*sizeof(int16_t), chunk_size); ++ tempbuf = calloc(chunk_size, 2*sizeof(int16_t)); + if (!tempbuf) { + perror("calloc"); + goto out; + } + +- outbuf = calloc(sizeof(struct complex_sample), chunk_size); ++ outbuf = calloc(chunk_size, sizeof(struct complex_sample)); + if (!outbuf) { + perror("calloc"); + goto out; diff --git a/pkgs/by-name/li/libbladeRF/package.nix b/pkgs/by-name/li/libbladeRF/package.nix index 77e72d22db6c..4c05f76d1351 100644 --- a/pkgs/by-name/li/libbladeRF/package.nix +++ b/pkgs/by-name/li/libbladeRF/package.nix @@ -13,6 +13,11 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; + patches = [ + # https://github.com/Nuand/bladeRF/issues/994 + ./gcc-14-calloc-fixes.diff + ]; + nativeBuildInputs = [ cmake pkg-config git doxygen help2man ]; # ncurses used due to https://github.com/Nuand/bladeRF/blob/ab4fc672c8bab4f8be34e8917d3f241b1d52d0b8/host/utilities/bladeRF-cli/CMakeLists.txt#L208 buildInputs = [ tecla libusb1 ] diff --git a/pkgs/by-name/ru/ruff/package.nix b/pkgs/by-name/ru/ruff/package.nix index 6fd163a518cd..df10f15fff71 100644 --- a/pkgs/by-name/ru/ruff/package.nix +++ b/pkgs/by-name/ru/ruff/package.nix @@ -16,7 +16,7 @@ python3Packages.buildPythonPackage rec { pname = "ruff"; - version = "0.8.1"; + version = "0.8.2"; pyproject = true; outputs = [ @@ -27,8 +27,8 @@ python3Packages.buildPythonPackage rec { src = fetchFromGitHub { owner = "astral-sh"; repo = "ruff"; - rev = "refs/tags/${version}"; - hash = "sha256-N3TplR+vPu2r56VP/vnOfkxN3Lh2o92kE2hFZKLXO04="; + tag = version; + hash = "sha256-rAIedDjJ1OajxrHS9cgP9sdcTbT7JFbA16jeVsaoEEY="; }; # Do not rely on path lookup at runtime to find the ruff binary @@ -41,7 +41,7 @@ python3Packages.buildPythonPackage rec { cargoDeps = rustPlatform.fetchCargoVendor { inherit pname version src; - hash = "sha256-iddUzip2LmBMOB+MfpI4k3OitdPbwAZkc4szDPB6duM="; + hash = "sha256-aT1qF7RYytUTLVIM0QDgPesiJPCLwKoARWcIBgwN7C8="; }; nativeBuildInputs = diff --git a/pkgs/by-name/uv/uv/package.nix b/pkgs/by-name/uv/uv/package.nix index 3abe878f2afd..74a9f1298ff8 100644 --- a/pkgs/by-name/uv/uv/package.nix +++ b/pkgs/by-name/uv/uv/package.nix @@ -13,17 +13,17 @@ rustPlatform.buildRustPackage rec { pname = "uv"; - version = "0.5.5"; + version = "0.5.6"; src = fetchFromGitHub { owner = "astral-sh"; repo = "uv"; - rev = "refs/tags/${version}"; - hash = "sha256-E0U6K+lvtIM9htpMpFN36JHA772LgTHaTCVGiTTlvQk="; + tag = version; + hash = "sha256-iiIbSya+SUM7Xk+lV7h7Zyb1WMvc1IAHxCAylWmKaKU="; }; useFetchCargoVendor = true; - cargoHash = "sha256-WbA0/HojU/E2ccAvV2sv9EAXLqcb+99LFHxddcYFZFw="; + cargoHash = "sha256-xrUjHJ8VDGNwN4xfOqqaRRUTEhRh2Jnckj7ynILigpc="; nativeBuildInputs = [ cmake @@ -63,7 +63,7 @@ rustPlatform.buildRustPackage rec { meta = { description = "Extremely fast Python package installer and resolver, written in Rust"; homepage = "https://github.com/astral-sh/uv"; - changelog = "https://github.com/astral-sh/uv/blob/${src.rev}/CHANGELOG.md"; + changelog = "https://github.com/astral-sh/uv/blob/${version}/CHANGELOG.md"; license = with lib.licenses; [ asl20 mit diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 0e999407c9d0..508942a97c7a 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -227,6 +227,11 @@ in stdenv.mkDerivation (finalAttrs: { # Useful debugging parameter # export VERBOSE=1 + '' + lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.targetPlatform.isDarwin) '' + # Replace hardcoded path to strip with llvm-strip + # https://github.com/NixOS/nixpkgs/issues/299606 + substituteInPlace compiler/rustc_codegen_ssa/src/back/link.rs \ + --replace-fail "/usr/bin/strip" "${lib.getExe' llvmShared "llvm-strip"}" '' + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' # See https://github.com/jemalloc/jemalloc/issues/1997 # Using a value of 48 should work on both emulated and native x86_64-darwin. diff --git a/pkgs/development/libraries/abseil-cpp/202301.nix b/pkgs/development/libraries/abseil-cpp/202301.nix index 0280a183e869..897bd3854ac2 100644 --- a/pkgs/development/libraries/abseil-cpp/202301.nix +++ b/pkgs/development/libraries/abseil-cpp/202301.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , cmake , gtest , static ? stdenv.hostPlatform.isStatic @@ -18,7 +19,15 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-7C/QIXYRyUyNVVE0tqmv8b5g/uWc58iBI5jzdtddQ+U="; }; - patches = lib.optionals stdenv.hostPlatform.isDarwin [ + patches = [ + # Fixes: clang++: error: unsupported option '-msse4.1' for target 'aarch64-apple-darwin' + # https://github.com/abseil/abseil-cpp/pull/1707 + (fetchpatch { + name = "fix-compile-breakage-on-darwin"; + url = "https://github.com/abseil/abseil-cpp/commit/6dee153242d7becebe026a9bed52f4114441719d.patch"; + hash = "sha256-r6QnHPnwPwOE/hv4kLNA3FqNq2vU/QGmwAc5q0/q1cs="; + }) + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages # that require a different SDK other than the default one. ./cmake-core-foundation.patch diff --git a/pkgs/development/libraries/abseil-cpp/202401.nix b/pkgs/development/libraries/abseil-cpp/202401.nix index ad5417d6eb62..7a9d1eb836e3 100644 --- a/pkgs/development/libraries/abseil-cpp/202401.nix +++ b/pkgs/development/libraries/abseil-cpp/202401.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , cmake , gtest , static ? stdenv.hostPlatform.isStatic @@ -18,6 +19,16 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-eA2/dZpNOlex1O5PNa3XSZhpMB3AmaIoHzVDI9TD/cg="; }; + patches = [ + # Fixes: clang++: error: unsupported option '-msse4.1' for target 'aarch64-apple-darwin' + # https://github.com/abseil/abseil-cpp/pull/1707 + (fetchpatch { + name = "fix-compile-breakage-on-darwin"; + url = "https://github.com/abseil/abseil-cpp/commit/6dee153242d7becebe026a9bed52f4114441719d.patch"; + hash = "sha256-r6QnHPnwPwOE/hv4kLNA3FqNq2vU/QGmwAc5q0/q1cs="; + }) + ]; + cmakeFlags = [ "-DABSL_BUILD_TEST_HELPERS=ON" "-DABSL_USE_EXTERNAL_GOOGLETEST=ON" diff --git a/pkgs/development/libraries/protobuf/generic.nix b/pkgs/development/libraries/protobuf/generic.nix index 447202dff539..f8cfa4daff03 100644 --- a/pkgs/development/libraries/protobuf/generic.nix +++ b/pkgs/development/libraries/protobuf/generic.nix @@ -13,6 +13,7 @@ zlib, version, hash, + versionCheckHook, # downstream dependencies python3, @@ -31,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchFromGitHub { owner = "protocolbuffers"; repo = "protobuf"; - rev = "refs/tags/v${version}"; + tag = "v${version}"; inherit hash; }; @@ -84,15 +85,18 @@ stdenv.mkDerivation (finalAttrs: { ]; doCheck = - # FIXME: investigate. 24.x and 23.x have different errors. - # At least some of it is not reproduced on some other machine; example: - # https://hydra.nixos.org/build/235677717/nixlog/4/tail - !(stdenv.hostPlatform.isDarwin && lib.versionAtLeast version "23") # Tests fail to build on 32-bit platforms; fixed in 22.x # https://github.com/protocolbuffers/protobuf/issues/10418 # Also AnyTest.TestPackFromSerializationExceedsSizeLimit fails on 32-bit platforms # https://github.com/protocolbuffers/protobuf/issues/8460 - && !stdenv.hostPlatform.is32bit; + !stdenv.hostPlatform.is32bit; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + versionCheckProgram = [ "${placeholder "out"}/bin/protoc" ]; + versionCheckProgramArg = [ "--version" ]; + doInstallCheck = true; passthru = { tests = {