Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 35 lines 793 B view raw
1{ stdenv 2, buildPythonPackage 3, cmake 4, fetchPypi 5, h3 6, python 7}: 8 9buildPythonPackage rec { 10 pname = "h3"; 11 version = "3.6.4"; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "416e35d736ef6ec9c1f73b9d4a9d5c696cc2a7561811f8bcfa08c8c4912f2289"; 16 }; 17 18 patches = [ 19 ./disable-custom-install.patch 20 ./hardcode-h3-path.patch 21 ]; 22 23 preBuild = '' 24 substituteInPlace h3/h3.py \ 25 --subst-var-by libh3_path ${h3}/lib/libh3${stdenv.hostPlatform.extensions.sharedLibrary} 26 ''; 27 28 meta = with stdenv.lib; { 29 homepage = "https://github.com/uber/h3-py"; 30 description = "This library provides Python bindings for the H3 Core Library."; 31 license = licenses.asl20; 32 platforms = platforms.unix ++ platforms.darwin; 33 maintainers = [ maintainers.kalbasit ]; 34 }; 35}