s2geometry: 0.9.0 -> 0.11.1
Diff: https://github.com/google/s2geometry/compare/v0.9.0...v0.11.1 Changelog: https://github.com/google/s2geometry/releases/tag/v0.10.0 https://github.com/google/s2geometry/releases/tag/v0.11.0 https://github.com/google/s2geometry/releases/tag/v0.11.1
This commit is contained in:
parent
c4009cf979
commit
43fd10564f
@ -1,38 +1,52 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config, openssl, gtest }:
|
{
|
||||||
|
abseil-cpp,
|
||||||
|
cmake,
|
||||||
|
fetchFromGitHub,
|
||||||
|
stdenv,
|
||||||
|
lib,
|
||||||
|
pkg-config,
|
||||||
|
openssl,
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
|
cxxStandard = "17";
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "s2geometry";
|
pname = "s2geometry";
|
||||||
version = "0.9.0";
|
version = "0.11.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "google";
|
owner = "google";
|
||||||
repo = "s2geometry";
|
repo = "s2geometry";
|
||||||
rev = "v${version}";
|
rev = "refs/tags/v${finalAttrs.version}";
|
||||||
sha256 = "1mx61bnn2f6bd281qlhn667q6yfg1pxzd2js88l5wpkqlfzzhfaz";
|
sha256 = "sha256-VjgGcGgQlKmjUq+JU0JpyhOZ9pqwPcBUFEPGV9XoHc0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
nativeBuildInputs = [
|
||||||
# Fix build https://github.com/google/s2geometry/issues/165
|
cmake
|
||||||
(fetchpatch {
|
pkg-config
|
||||||
url = "https://github.com/google/s2geometry/commit/a4dddf40647c68cd0104eafc31e9c8fb247a6308.patch";
|
|
||||||
sha256 = "0fp3w4bg7pgf5vv4vacp9g06rbqzhxc2fg6i5appp93q6phiinvi";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
cmakeFlags = [
|
||||||
buildInputs = [ openssl gtest ];
|
(lib.cmakeFeature "CMAKE_CXX_STANDARD" cxxStandard)
|
||||||
|
# incompatible with our version of gtest
|
||||||
|
(lib.cmakeBool "BUILD_TESTS" false)
|
||||||
|
];
|
||||||
|
|
||||||
# Default of C++11 is too low for gtest.
|
buildInputs = [
|
||||||
# In newer versions of s2geometry this can be done with cmakeFlags.
|
openssl
|
||||||
postPatch = ''
|
];
|
||||||
substituteInPlace CMakeLists.txt --replace "CMAKE_CXX_STANDARD 11" "CMAKE_CXX_STANDARD 14"
|
|
||||||
'';
|
propagatedBuildInputs = [
|
||||||
|
(abseil-cpp.override { inherit cxxStandard; })
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
changelog = "https://github.com/google/s2geometry/releases/tag/${lib.removePrefix "refs/tags/" finalAttrs.src.rev}";
|
||||||
description = "Computational geometry and spatial indexing on the sphere";
|
description = "Computational geometry and spatial indexing on the sphere";
|
||||||
homepage = "http://s2geometry.io/";
|
homepage = "http://s2geometry.io/";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = [ maintainers.Thra11 ];
|
maintainers = [ maintainers.Thra11 ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user