nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 62 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 cmake, 5 fetchFromGitHub, 6 withFilters ? false, 7}: 8 9let 10 generic = 11 { version, hash }: 12 stdenv.mkDerivation { 13 inherit version; 14 pname = "h3"; 15 16 src = fetchFromGitHub { 17 owner = "uber"; 18 repo = "h3"; 19 tag = "v${version}"; 20 inherit hash; 21 }; 22 23 outputs = [ 24 "out" 25 "dev" 26 ]; 27 28 nativeBuildInputs = [ cmake ]; 29 30 cmakeFlags = [ 31 (lib.cmakeBool "BUILD_SHARED_LIBS" true) 32 (lib.cmakeBool "BUILD_BENCHMARKS" false) 33 (lib.cmakeBool "BUILD_FUZZERS" false) 34 (lib.cmakeBool "BUILD_GENERATORS" false) 35 (lib.cmakeBool "ENABLE_COVERAGE" false) 36 (lib.cmakeBool "ENABLE_FORMAT" false) 37 (lib.cmakeBool "ENABLE_LINTING" false) 38 (lib.cmakeBool "BUILD_FILTERS" withFilters) 39 ] 40 ++ (lib.optionals (lib.versionOlder version "4.0.0") [ "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" ]); 41 42 meta = { 43 homepage = "https://h3geo.org/"; 44 description = "Hexagonal hierarchical geospatial indexing system"; 45 license = lib.licenses.asl20; 46 changelog = "https://github.com/uber/h3/raw/v${version}/CHANGELOG.md"; 47 platforms = lib.platforms.all; 48 maintainers = with lib.maintainers; [ kalbasit ]; 49 }; 50 }; 51in 52{ 53 h3_3 = generic { 54 version = "3.7.2"; 55 hash = "sha256-MvWqQraTnab6EuDx4V0v8EvrFWHT95f2EHTL2p2kei8="; 56 }; 57 58 h3_4 = generic { 59 version = "4.3.0"; 60 hash = "sha256-DUILKZ1QvML6qg+WdOxir6zRsgTvk+En6yjeFf6MQBg="; 61 }; 62}