nixpkgs/pkgs/by-name/s2/s2geometry/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.1 KiB
Nix
Raw Normal View History

{
abseil-cpp,
cmake,
fetchFromGitHub,
stdenv,
lib,
pkg-config,
openssl,
}:
2020-12-28 19:53:52 +00:00
let
cxxStandard = "17";
in
stdenv.mkDerivation (finalAttrs: {
2020-12-28 19:53:52 +00:00
pname = "s2geometry";
version = "0.11.1";
2020-12-28 19:53:52 +00:00
src = fetchFromGitHub {
owner = "google";
repo = "s2geometry";
rev = "refs/tags/v${finalAttrs.version}";
sha256 = "sha256-VjgGcGgQlKmjUq+JU0JpyhOZ9pqwPcBUFEPGV9XoHc0=";
2020-12-28 19:53:52 +00:00
};
nativeBuildInputs = [
cmake
pkg-config
2020-12-28 19:53:52 +00:00
];
cmakeFlags = [
(lib.cmakeFeature "CMAKE_CXX_STANDARD" cxxStandard)
# incompatible with our version of gtest
(lib.cmakeBool "BUILD_TESTS" false)
];
buildInputs = [
openssl
];
2020-12-28 19:53:52 +00:00
propagatedBuildInputs = [
(abseil-cpp.override { inherit cxxStandard; })
];
2020-12-28 19:53:52 +00:00
meta = with lib; {
changelog = "https://github.com/google/s2geometry/releases/tag/${lib.removePrefix "refs/tags/" finalAttrs.src.rev}";
2020-12-28 19:53:52 +00:00
description = "Computational geometry and spatial indexing on the sphere";
homepage = "http://s2geometry.io/";
license = licenses.asl20;
maintainers = [ maintainers.Thra11 ];
platforms = platforms.linux;
};
})