nixpkgs/pkgs/development/misc/h3/default.nix

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

54 lines
1.2 KiB
Nix
Raw Normal View History

2021-09-29 19:03:16 +00:00
{ lib
, stdenv
2019-07-17 00:01:33 +00:00
, cmake
, fetchFromGitHub
2023-03-03 04:20:00 +00:00
, static ? stdenv.hostPlatform.isStatic
2019-07-17 00:01:33 +00:00
}:
2023-03-03 04:20:00 +00:00
let
generic = { version, hash }:
stdenv.mkDerivation rec {
inherit version;
pname = "h3";
2019-07-17 00:01:33 +00:00
2023-03-03 04:20:00 +00:00
src = fetchFromGitHub {
owner = "uber";
repo = "h3";
rev = "v${version}";
inherit hash;
};
nativeBuildInputs = [ cmake ];
2019-07-17 00:01:33 +00:00
2023-03-03 04:20:00 +00:00
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
"-DBUILD_BENCHMARKS=OFF"
"-DBUILD_FUZZERS=OFF"
"-DBUILD_GENERATORS=OFF"
"-DENABLE_COVERAGE=OFF"
"-DENABLE_FORMAT=OFF"
"-DENABLE_LINTING=OFF"
];
2019-07-17 00:01:33 +00:00
2023-03-03 04:20:00 +00:00
meta = with lib; {
homepage = "https://h3geo.org/";
description = "Hexagonal hierarchical geospatial indexing system";
license = licenses.asl20;
changelog = "https://github.com/uber/h3/raw/v${version}/CHANGELOG.md";
platforms = platforms.all;
2023-03-03 04:20:00 +00:00
maintainers = with maintainers; [ kalbasit marsam ];
2023-03-03 04:20:00 +00:00
};
};
in
{
h3_3 = generic {
version = "3.7.2";
hash = "sha256-MvWqQraTnab6EuDx4V0v8EvrFWHT95f2EHTL2p2kei8=";
};
2019-07-17 00:01:33 +00:00
2023-03-03 04:20:00 +00:00
h3_4 = generic {
version = "4.1.0";
hash = "sha256-7qyN73T8XDwZLgMZld7wwShUwoLEi/2gN2oiZX8n5nQ=";
2019-07-17 00:01:33 +00:00
};
}