Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 35 lines 781 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.4.3"; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "07dlqpr1r4kzb3gci395plpss8gxvvrij40l6w0mylyg7fkab4m2"; 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}