2024-06-20 14:57:18 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "croaring";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "2.0.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RoaringBitmap";
|
|
|
|
repo = "CRoaring";
|
|
|
|
rev = "v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-WaFyJ/6zstJ05e3vfrwhaZKQsjRAEvVTs688Hw0fr94=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
# roaring.pc.in cannot handle absolute CMAKE_INSTALL_*DIRs, nor
|
|
|
|
# overridden CMAKE_INSTALL_FULL_*DIRs. With Nix, they are guaranteed
|
|
|
|
# to be absolute so the following patch suffices (see #144170).
|
|
|
|
patches = [ ./fix-pkg-config.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
mkdir -p dependencies/.cache
|
|
|
|
ln -s ${fetchFromGitHub {
|
|
|
|
owner = "clibs";
|
|
|
|
repo = "cmocka";
|
|
|
|
rev = "f5e2cd7";
|
|
|
|
hash = "sha256-Oq0nFsZhl8IF7kQN/LgUq8VBy+P7gO98ep/siy5A7Js=";
|
|
|
|
}} dependencies/.cache/cmocka
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Compressed bitset library for C and C++";
|
2024-06-20 14:57:18 +00:00
|
|
|
homepage = "https://roaringbitmap.org/";
|
|
|
|
license = with licenses; [ asl20 mit ];
|
|
|
|
maintainers = [ maintainers.orivej ];
|
2021-03-12 07:09:13 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|