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