From 380c21f03569fcea36ab2864b02d60cce8b7470d Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Sun, 6 Apr 2025 17:52:06 -0400 Subject: [PATCH 1/2] libcbor: fix cmake build on case-insensitive FS (on darwin) The tarball already contains a `BUILD` file (not directory), which makes the cmake configure implementation to fail when creating the `build` directory. This is happening because for some file systems (e.g. on darwin), file names that differ only in case are considered duplicate. Signed-off-by: Ihar Hrachyshka --- pkgs/by-name/li/libcbor/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/li/libcbor/package.nix b/pkgs/by-name/li/libcbor/package.nix index a5e1585e8489..6ac40aa1f480 100644 --- a/pkgs/by-name/li/libcbor/package.nix +++ b/pkgs/by-name/li/libcbor/package.nix @@ -35,6 +35,9 @@ stdenv.mkDerivation (finalAttrs: { cmocka # cmake expects cmocka module ]; + # BUILD file already exists in the source + cmakeBuildDir = "build.dir"; + cmakeFlags = lib.optional finalAttrs.finalPackage.doCheck "-DWITH_TESTS=ON" ++ lib.optional (!stdenv.hostPlatform.isStatic) "-DBUILD_SHARED_LIBS=ON"; From bf0caab6202b8095eb1717e360487f1a3305a8b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 7 Apr 2025 14:28:40 +0200 Subject: [PATCH 2/2] libcbor: avoid rebuilding on linux for now CI says > Rebuild: linux 15669, darwin 415 --- pkgs/by-name/li/libcbor/package.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/li/libcbor/package.nix b/pkgs/by-name/li/libcbor/package.nix index 6ac40aa1f480..a38b9cafac55 100644 --- a/pkgs/by-name/li/libcbor/package.nix +++ b/pkgs/by-name/li/libcbor/package.nix @@ -36,7 +36,8 @@ stdenv.mkDerivation (finalAttrs: { ]; # BUILD file already exists in the source - cmakeBuildDir = "build.dir"; + # TODO: make unconditional on staging. + cmakeBuildDir = if stdenv.isDarwin then "build.dir" else null; cmakeFlags = lib.optional finalAttrs.finalPackage.doCheck "-DWITH_TESTS=ON"