From 32f3046ef509993b35f11c08e441982d6d434470 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 3 Aug 2023 22:41:48 +0900 Subject: [PATCH] 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 a75cd1518fe..ee6e74aa7bc 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; }; -} +})