diff --git a/pkgs/development/libraries/LASzip/default.nix b/pkgs/development/libraries/LASzip/default.nix index f170ea44c0ee..ee6e74aa7bc2 100644 --- a/pkgs/development/libraries/LASzip/default.nix +++ b/pkgs/development/libraries/LASzip/default.nix @@ -1,25 +1,33 @@ -{ lib, stdenv, fetchFromGitHub, cmake }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, fixDarwinDylibNames +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { version = "3.4.3"; pname = "LASzip"; src = fetchFromGitHub { owner = "LASzip"; repo = "LASzip"; - rev = version; - sha256 = "09lcsgxwv0jq50fhsgfhx0npbf1zcwn3hbnq6q78fshqksbxmz7m"; + rev = finalAttrs.version; + hash = "sha256-9fzal54YaocONtguOCxnP7h1LejQPQ0dKFiCzfvTjCY="; }; nativeBuildInputs = [ cmake + ] ++ lib.optionals stdenv.isDarwin [ + fixDarwinDylibNames ]; meta = { description = "Turn quickly bulky LAS files into compact LAZ files without information loss"; homepage = "https://laszip.org"; + changelog = "https://github.com/LASzip/LASzip/releases/tag/${finalAttrs.src.rev}"; license = lib.licenses.lgpl2; maintainers = [ lib.maintainers.michelk ]; platforms = lib.platforms.unix; }; -} +}) diff --git a/pkgs/development/python-modules/laspy/default.nix b/pkgs/development/python-modules/laspy/default.nix index 43366105532a..69b4af29f01b 100644 --- a/pkgs/development/python-modules/laspy/default.nix +++ b/pkgs/development/python-modules/laspy/default.nix @@ -3,28 +3,33 @@ , fetchPypi , numpy , laszip +, setuptools , pytestCheckHook , pythonOlder }: buildPythonPackage rec { pname = "laspy"; - version = "2.4.1"; - format = "setuptools"; + version = "2.5.1"; + format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-E8rsxzJcsiQsslOUmE0hs7X3lsiLy0S8LtLTzxuXKsQ="; + hash = "sha256-uqPJxswVVjbxYRSREfnPwkPb0U9synKclLNWsxxmjy4="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ numpy laszip ]; - checkInputs = [ + nativeCheckInputs = [ pytestCheckHook ]; @@ -36,7 +41,7 @@ buildPythonPackage rec { meta = with lib; { description = "Interface for reading/modifying/creating .LAS LIDAR files"; homepage = "https://github.com/laspy/laspy"; - changelog = "https://github.com/laspy/laspy/blob/2.4.1/CHANGELOG.md"; + changelog = "https://github.com/laspy/laspy/blob/${version}/CHANGELOG.md"; license = licenses.bsd2; maintainers = with maintainers; [ matthewcroughan ]; }; diff --git a/pkgs/development/python-modules/laszip/default.nix b/pkgs/development/python-modules/laszip/default.nix index cefd2d5f6e1a..2c6f4196595f 100644 --- a/pkgs/development/python-modules/laszip/default.nix +++ b/pkgs/development/python-modules/laszip/default.nix @@ -1,48 +1,44 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , scikit-build-core -, distlib -, pytestCheckHook -, pyproject-metadata -, pathspec , pybind11 , cmake , LASzip +, pythonOlder }: buildPythonPackage rec { pname = "laszip-python"; - version = "0.2.1"; + version = "0.2.3"; format = "pyproject"; + disabled = pythonOlder "3.7"; + src = fetchFromGitHub { owner = "tmontaigu"; repo = pname; rev = version; - sha256 = "sha256-ujKoUm2Btu25T7ZrSGqjRc3NR1qqsQU8OwHQDSx8grY="; + hash = "sha256-MiPzL9TDCf1xnCv7apwdfcpkFnBRi4PO/atTQxqL8cw="; }; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c++17"; + nativeBuildInputs = [ + cmake + pybind11 scikit-build-core scikit-build-core.optional-dependencies.pyproject - cmake ]; + dontUseCmakeConfigure = true; + buildInputs = [ - pybind11 LASzip ]; - checkInputs = [ - pytestCheckHook - ]; - - preBuild = '' - cd .. - ''; - # There are no tests doCheck = false; @@ -51,6 +47,7 @@ buildPythonPackage rec { meta = with lib; { description = "Unofficial bindings between Python and LASzip made using pybind11"; homepage = "https://github.com/tmontaigu/laszip-python"; + changelog = "https://github.com/tmontaigu/laszip-python/blob/${src.rev}/Changelog.md"; license = licenses.mit; maintainers = with maintainers; [ matthewcroughan ]; };