From 6ca1c4ae536fa8554c375f05ce45af250d7f37cc Mon Sep 17 00:00:00 2001 From: PhiliPdB Date: Sat, 26 Jul 2025 11:50:09 +0200 Subject: [PATCH] libraw: cleanup and modernize - Use `finalAttrs` - `rev` -> `tag` - Remove `with lib;` - Cleanup imports --- pkgs/by-name/li/libraw/package.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/li/libraw/package.nix b/pkgs/by-name/li/libraw/package.nix index f47a7c5b0119..157096563529 100644 --- a/pkgs/by-name/li/libraw/package.nix +++ b/pkgs/by-name/li/libraw/package.nix @@ -7,20 +7,19 @@ pkg-config, # for passthru.tests - freeimage, hdrmerge, imagemagick, python3, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libraw"; version = "0.21.4"; src = fetchFromGitHub { owner = "LibRaw"; repo = "LibRaw"; - rev = version; + tag = finalAttrs.version; hash = "sha256-JAGIM7A9RbK22F8KczRcb+29t4fDDXzoCA3a4s/z6Q8="; }; @@ -45,17 +44,17 @@ stdenv.mkDerivation rec { ''; passthru.tests = { - inherit imagemagick hdrmerge; # freeimage + inherit imagemagick hdrmerge; inherit (python3.pkgs) rawkit; }; - meta = with lib; { + meta = { description = "Library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)"; homepage = "https://www.libraw.org/"; - license = with licenses; [ + license = with lib.licenses; [ cddl lgpl2Plus ]; - platforms = platforms.unix; + platforms = lib.platforms.unix; }; -} +})