mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-01 13:14:42 +00:00
c++20 removed several members of std::allocator, causing sparsehash to fail to build. a long-open (2021…) pr switches these to alternatives, so we fetch that pr and include it. this is relevant for gcc 16, which switches to c++20 as the default standard version. fedora has done the same thing: https://src.fedoraproject.org/rpms/sparsehash/blob/rawhide/f/165.patch
31 lines
847 B
Nix
31 lines
847 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "sparsehash";
|
|
version = "2.0.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sparsehash";
|
|
repo = "sparsehash";
|
|
rev = "sparsehash-${finalAttrs.version}";
|
|
sha256 = "1pf1cjvcjdmb9cd6gcazz64x0cd2ndpwh6ql2hqpypjv725xwxy7";
|
|
};
|
|
|
|
# C++20 (default with GCC 16) removed many members of std::allocator. This
|
|
# replaces use of these deprecated methods with alternatives where necessary.
|
|
# https://github.com/sparsehash/sparsehash/pull/165
|
|
patches = [ ./c++-20-std-allocator.patch ];
|
|
|
|
meta = {
|
|
homepage = "https://github.com/sparsehash/sparsehash";
|
|
description = "Extremely memory-efficient hash_map implementation";
|
|
platforms = lib.platforms.all;
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ pSub ];
|
|
};
|
|
})
|