Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 40 lines 1.1 kB view raw
1{ lib, stdenv, fetchFromGitHub, cmake }: 2 3stdenv.mkDerivation rec { 4 pname = "croaring"; 5 version = "2.0.3"; 6 7 src = fetchFromGitHub { 8 owner = "RoaringBitmap"; 9 repo = "CRoaring"; 10 rev = "v${version}"; 11 hash = "sha256-WaFyJ/6zstJ05e3vfrwhaZKQsjRAEvVTs688Hw0fr94="; 12 }; 13 14 # roaring.pc.in cannot handle absolute CMAKE_INSTALL_*DIRs, nor 15 # overridden CMAKE_INSTALL_FULL_*DIRs. With Nix, they are guaranteed 16 # to be absolute so the following patch suffices (see #144170). 17 patches = [ ./fix-pkg-config.patch ]; 18 19 nativeBuildInputs = [ cmake ]; 20 21 doCheck = true; 22 23 preConfigure = '' 24 mkdir -p dependencies/.cache 25 ln -s ${fetchFromGitHub { 26 owner = "clibs"; 27 repo = "cmocka"; 28 rev = "f5e2cd7"; 29 hash = "sha256-Oq0nFsZhl8IF7kQN/LgUq8VBy+P7gO98ep/siy5A7Js="; 30 }} dependencies/.cache/cmocka 31 ''; 32 33 meta = with lib; { 34 description = "Compressed bitset library for C and C++"; 35 homepage = "https://roaringbitmap.org/"; 36 license = with licenses; [ asl20 mit ]; 37 maintainers = [ maintainers.orivej ]; 38 platforms = platforms.all; 39 }; 40}