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 buildPythonPackage, 5 fetchFromGitHub, 6 fetchpatch, 7 scikit-build-core, 8 pybind11, 9 cmake, 10 laszip, 11 ninja, 12}: 13 14buildPythonPackage rec { 15 pname = "laszip-python"; 16 version = "0.2.3"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "tmontaigu"; 21 repo = "laszip-python"; 22 rev = version; 23 hash = "sha256-MiPzL9TDCf1xnCv7apwdfcpkFnBRi4PO/atTQxqL8cw="; 24 }; 25 26 patches = [ 27 # Removes depending on the cmake and ninja PyPI packages, since we can pass 28 # in the tools directly, and scikit-build-core can use them. 29 # https://github.com/tmontaigu/laszip-python/pull/9 30 (fetchpatch { 31 name = "remove-cmake-ninja-pypi-dependencies.patch"; 32 url = "https://github.com/tmontaigu/laszip-python/commit/17e648d04945fa2d095d6d74d58c790a4fcde84a.patch"; 33 hash = "sha256-k58sS1RqVzT1WPh2OVt/D4Y045ODtj6U3bUjegd44VY="; 34 }) 35 ]; 36 37 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c++17"; 38 39 nativeBuildInputs = [ 40 cmake 41 ninja 42 pybind11 43 scikit-build-core 44 ]; 45 46 dontUseCmakeConfigure = true; 47 48 buildInputs = [ laszip ]; 49 50 # There are no tests 51 doCheck = false; 52 53 pythonImportsCheck = [ "laszip" ]; 54 55 meta = { 56 description = "Unofficial bindings between Python and LASzip made using pybind11"; 57 homepage = "https://github.com/tmontaigu/laszip-python"; 58 changelog = "https://github.com/tmontaigu/laszip-python/blob/${src.rev}/Changelog.md"; 59 license = lib.licenses.mit; 60 maintainers = with lib.maintainers; [ matthewcroughan ]; 61 }; 62}