libcbor: 0.10.0 -> unstable-2023-01-29

This commit is contained in:
superherointj 2023-01-28 22:19:36 -03:00
parent 56b467d467
commit 06667ffdc8

View file

@ -13,28 +13,25 @@
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "libcbor"; pname = "libcbor";
version = "0.10.0"; version = "unstable-2023-01-29"; # Musl fix hasn't been released yet.
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "PJK"; owner = "PJK";
repo = finalAttrs.pname; repo = "libcbor";
rev = "v${finalAttrs.version}"; rev = "cb4162f40d94751141b4d43b07c4add83e738a68";
sha256 = "sha256-YJSIZ7o191/0QJf1fH6LUYykS2pvP17knSeRO2WcDeM="; sha256 = "sha256-ZTa+wG1g9KsVoqJG/yqxo2fJ7OhPnaI9QcfOmpOT3pg=";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
cmakeFlags = [ cmakeFlags = lib.optional finalAttrs.doCheck "-DWITH_TESTS=ON"
"-DCMAKE_INSTALL_LIBDIR=lib" ++ lib.optional (!stdenv.hostPlatform.isStatic) "-DBUILD_SHARED_LIBS=ON";
"-DBUILD_SHARED_LIBS=on"
] ++ lib.optional finalAttrs.doCheck "-DWITH_TESTS=ON";
# 2 tests are not 32-bit clean: overflow size_t: # Tests are restricted while pkgsStatic.cmocka is broken. Tracked at:
# https://github.com/PJK/libcbor/issues/263 # https://github.com/NixOS/nixpkgs/issues/213623
doCheck = doCheck = !stdenv.hostPlatform.isStatic
!stdenv.hostPlatform.is32bit
&& (!stdenv.hostPlatform.isStatic)
&& stdenv.hostPlatform == stdenv.buildPlatform; && stdenv.hostPlatform == stdenv.buildPlatform;
nativeCheckInputs = [ cmocka ]; nativeCheckInputs = [ cmocka ];
passthru.tests = { passthru.tests = {