From 8f67c489ba2b8c9523d4645e17c2c6ed0c546932 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 3 Aug 2023 22:35:36 +0900 Subject: [PATCH 1/6] LASzip: fix dylib name for darwin --- pkgs/development/libraries/LASzip/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/LASzip/default.nix b/pkgs/development/libraries/LASzip/default.nix index f170ea44c0ee..a75cd1518fe2 100644 --- a/pkgs/development/libraries/LASzip/default.nix +++ b/pkgs/development/libraries/LASzip/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake }: +{ lib, stdenv, fetchFromGitHub, cmake, fixDarwinDylibNames }: stdenv.mkDerivation rec { version = "3.4.3"; @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake + ] ++ lib.optionals stdenv.isDarwin [ + fixDarwinDylibNames ]; meta = { From 32f3046ef509993b35f11c08e441982d6d434470 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 3 Aug 2023 22:41:48 +0900 Subject: [PATCH 2/6] LASzip: refactor - use finalAttrs - replace hash with SRI hash - add meta.changelog --- pkgs/development/libraries/LASzip/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/LASzip/default.nix b/pkgs/development/libraries/LASzip/default.nix index a75cd1518fe2..ee6e74aa7bc2 100644 --- a/pkgs/development/libraries/LASzip/default.nix +++ b/pkgs/development/libraries/LASzip/default.nix @@ -1,14 +1,19 @@ -{ lib, stdenv, fetchFromGitHub, cmake, fixDarwinDylibNames }: +{ 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 = [ @@ -20,8 +25,9 @@ stdenv.mkDerivation rec { 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; }; -} +}) From cf4c0f090fe55e3018164a15d81dd0a374dfd43c Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 3 Aug 2023 22:46:46 +0900 Subject: [PATCH 3/6] python310Packages.laszip: refactor - remove unused inputs - move pybind11 to nativeBuildInputs - set dontUseCmakeConfigure - add meta.changelog --- .../python-modules/laszip/default.nix | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/laszip/default.nix b/pkgs/development/python-modules/laszip/default.nix index cefd2d5f6e1a..94c1dad59145 100644 --- a/pkgs/development/python-modules/laszip/default.nix +++ b/pkgs/development/python-modules/laszip/default.nix @@ -2,13 +2,10 @@ , buildPythonPackage , fetchFromGitHub , scikit-build-core -, distlib -, pytestCheckHook -, pyproject-metadata -, pathspec , pybind11 , cmake , LASzip +, pythonOlder }: buildPythonPackage rec { @@ -17,32 +14,28 @@ buildPythonPackage rec { format = "pyproject"; + disabled = pythonOlder "3.7"; + src = fetchFromGitHub { owner = "tmontaigu"; repo = pname; rev = version; - sha256 = "sha256-ujKoUm2Btu25T7ZrSGqjRc3NR1qqsQU8OwHQDSx8grY="; + hash = "sha256-ujKoUm2Btu25T7ZrSGqjRc3NR1qqsQU8OwHQDSx8grY="; }; 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 +44,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 ]; }; From 20a9422c03c7b983bfe5247a1886e997b296d3e2 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 6 Aug 2023 00:13:10 +0900 Subject: [PATCH 4/6] python310Packages.laszip: 0.2.1 -> 0.2.3 Diff: tmontaigu/laszip-python@0.2.1...0.2.3 Changelog: https://github.com/tmontaigu/laszip-python/blob/0.2.3/Changelog.md --- pkgs/development/python-modules/laszip/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/laszip/default.nix b/pkgs/development/python-modules/laszip/default.nix index 94c1dad59145..2c6f4196595f 100644 --- a/pkgs/development/python-modules/laszip/default.nix +++ b/pkgs/development/python-modules/laszip/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , scikit-build-core @@ -10,7 +11,7 @@ buildPythonPackage rec { pname = "laszip-python"; - version = "0.2.1"; + version = "0.2.3"; format = "pyproject"; @@ -20,9 +21,11 @@ buildPythonPackage rec { owner = "tmontaigu"; repo = pname; rev = version; - hash = "sha256-ujKoUm2Btu25T7ZrSGqjRc3NR1qqsQU8OwHQDSx8grY="; + hash = "sha256-MiPzL9TDCf1xnCv7apwdfcpkFnBRi4PO/atTQxqL8cw="; }; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c++17"; + nativeBuildInputs = [ cmake pybind11 From 0c5c1df1840d39e6e5ce7821155a26820073cfd1 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 3 Aug 2023 22:56:50 +0900 Subject: [PATCH 5/6] python310Packages.laspy: refactor - add setuptools to nativeBuildInputs - replace checkInputs with nativeCheckInputs - fix the changelog url --- pkgs/development/python-modules/laspy/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/laspy/default.nix b/pkgs/development/python-modules/laspy/default.nix index 43366105532a..e5b0ea1457a9 100644 --- a/pkgs/development/python-modules/laspy/default.nix +++ b/pkgs/development/python-modules/laspy/default.nix @@ -3,6 +3,7 @@ , fetchPypi , numpy , laszip +, setuptools , pytestCheckHook , pythonOlder }: @@ -10,7 +11,7 @@ buildPythonPackage rec { pname = "laspy"; version = "2.4.1"; - format = "setuptools"; + format = "pyproject"; disabled = pythonOlder "3.7"; @@ -19,12 +20,16 @@ buildPythonPackage rec { hash = "sha256-E8rsxzJcsiQsslOUmE0hs7X3lsiLy0S8LtLTzxuXKsQ="; }; + 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 ]; }; From 6ac8ae0fb0742bfe61f456d8e452e9e77a148995 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 3 Aug 2023 22:59:13 +0900 Subject: [PATCH 6/6] python310Packages.laspy: 2.4.1 -> 2.5.1 Changelog: https://github.com/laspy/laspy/blob/2.5.1/CHANGELOG.md --- pkgs/development/python-modules/laspy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/laspy/default.nix b/pkgs/development/python-modules/laspy/default.nix index e5b0ea1457a9..69b4af29f01b 100644 --- a/pkgs/development/python-modules/laspy/default.nix +++ b/pkgs/development/python-modules/laspy/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "laspy"; - version = "2.4.1"; + version = "2.5.1"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-E8rsxzJcsiQsslOUmE0hs7X3lsiLy0S8LtLTzxuXKsQ="; + hash = "sha256-uqPJxswVVjbxYRSREfnPwkPb0U9synKclLNWsxxmjy4="; }; nativeBuildInputs = [