libraw: cleanup and modernize

- Use `finalAttrs`
- `rev` -> `tag`
- Remove `with lib;`
- Cleanup imports

PhiliPdB 6ca1c4ae bc27efbb

+7 -8
+7 -8
pkgs/by-name/li/libraw/package.nix
··· 7 pkg-config, 8 9 # for passthru.tests 10 - freeimage, 11 hdrmerge, 12 imagemagick, 13 python3, 14 }: 15 16 - stdenv.mkDerivation rec { 17 pname = "libraw"; 18 version = "0.21.4"; 19 20 src = fetchFromGitHub { 21 owner = "LibRaw"; 22 repo = "LibRaw"; 23 - rev = version; 24 hash = "sha256-JAGIM7A9RbK22F8KczRcb+29t4fDDXzoCA3a4s/z6Q8="; 25 }; 26 ··· 45 ''; 46 47 passthru.tests = { 48 - inherit imagemagick hdrmerge; # freeimage 49 inherit (python3.pkgs) rawkit; 50 }; 51 52 - meta = with lib; { 53 description = "Library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)"; 54 homepage = "https://www.libraw.org/"; 55 - license = with licenses; [ 56 cddl 57 lgpl2Plus 58 ]; 59 - platforms = platforms.unix; 60 }; 61 - }
··· 7 pkg-config, 8 9 # for passthru.tests 10 hdrmerge, 11 imagemagick, 12 python3, 13 }: 14 15 + stdenv.mkDerivation (finalAttrs: { 16 pname = "libraw"; 17 version = "0.21.4"; 18 19 src = fetchFromGitHub { 20 owner = "LibRaw"; 21 repo = "LibRaw"; 22 + tag = finalAttrs.version; 23 hash = "sha256-JAGIM7A9RbK22F8KczRcb+29t4fDDXzoCA3a4s/z6Q8="; 24 }; 25 ··· 44 ''; 45 46 passthru.tests = { 47 + inherit imagemagick hdrmerge; 48 inherit (python3.pkgs) rawkit; 49 }; 50 51 + meta = { 52 description = "Library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)"; 53 homepage = "https://www.libraw.org/"; 54 + license = with lib.licenses; [ 55 cddl 56 lgpl2Plus 57 ]; 58 + platforms = lib.platforms.unix; 59 }; 60 + })