1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 19:45:54 +00:00
nixpkgs/pkgs/development/libraries/libwebp/default.nix
R. RyanTM bc26105522 libwebp: 0.6.1 -> 1.0.0
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/libwebp/versions.

These checks were done:

- built on NixOS
- ran ‘/nix/store/7rlf92q1g4sxv0g1gj8sf8310zm9na88-libwebp-1.0.0/bin/dwebp -h’ got 0 exit code
- ran ‘/nix/store/7rlf92q1g4sxv0g1gj8sf8310zm9na88-libwebp-1.0.0/bin/cwebp -h’ got 0 exit code
- ran ‘/nix/store/7rlf92q1g4sxv0g1gj8sf8310zm9na88-libwebp-1.0.0/bin/gif2webp -h’ got 0 exit code
- ran ‘/nix/store/7rlf92q1g4sxv0g1gj8sf8310zm9na88-libwebp-1.0.0/bin/img2webp -h’ got 0 exit code
- ran ‘/nix/store/7rlf92q1g4sxv0g1gj8sf8310zm9na88-libwebp-1.0.0/bin/img2webp --help’ got 0 exit code
- ran ‘/nix/store/7rlf92q1g4sxv0g1gj8sf8310zm9na88-libwebp-1.0.0/bin/webpmux -h’ got 0 exit code
- ran ‘/nix/store/7rlf92q1g4sxv0g1gj8sf8310zm9na88-libwebp-1.0.0/bin/webpinfo -h’ got 0 exit code
- found 1.0.0 with grep in /nix/store/7rlf92q1g4sxv0g1gj8sf8310zm9na88-libwebp-1.0.0
- directory tree listing: https://gist.github.com/a09e2cd5f3d318ac588ecdf308cc9898
2018-04-24 12:32:19 -07:00

68 lines
2.3 KiB
Nix

{ stdenv, fetchurl
, threadingSupport ? true # multi-threading
, openglSupport ? false, freeglut ? null, libGLU_combined ? null # OpenGL (required for vwebp)
, pngSupport ? true, libpng ? null # PNG image format
, jpegSupport ? true, libjpeg ? null # JPEG image format
, tiffSupport ? true, libtiff ? null # TIFF image format
, gifSupport ? true, giflib ? null # GIF image format
#, wicSupport ? true # Windows Imaging Component
, alignedSupport ? false # Force aligned memory operations
, swap16bitcspSupport ? false # Byte swap for 16bit color spaces
, experimentalSupport ? false # Experimental code
, libwebpmuxSupport ? true # Build libwebpmux
, libwebpdemuxSupport ? true # Build libwebpdemux
, libwebpdecoderSupport ? true # Build libwebpdecoder
}:
assert openglSupport -> ((freeglut != null) && (libGLU_combined != null));
assert pngSupport -> (libpng != null);
assert jpegSupport -> (libjpeg != null);
assert tiffSupport -> (libtiff != null);
assert gifSupport -> (giflib != null);
let
mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
in
with stdenv.lib;
stdenv.mkDerivation rec {
name = "libwebp-${version}";
version = "1.0.0";
src = fetchurl {
url = "http://downloads.webmproject.org/releases/webp/${name}.tar.gz";
sha256 = "0nr2hd4iv61fphdbx49g96a56jkmdm9n2qss7jpkg1pii11rq9c4";
};
configureFlags = [
(mkFlag threadingSupport "threading")
(mkFlag openglSupport "gl")
(mkFlag pngSupport "png")
(mkFlag jpegSupport "jpeg")
(mkFlag tiffSupport "tiff")
(mkFlag gifSupport "gif")
#(mkFlag (wicSupport && stdenv.isCygwin) "wic")
(mkFlag alignedSupport "aligned")
(mkFlag swap16bitcspSupport "swap-16bit-csp")
(mkFlag experimentalSupport "experimental")
(mkFlag libwebpmuxSupport "libwebpmux")
(mkFlag libwebpdemuxSupport "libwebpdemux")
(mkFlag libwebpdecoderSupport "libwebpdecoder")
];
buildInputs = [ ]
++ optionals openglSupport [ freeglut libGLU_combined ]
++ optional pngSupport libpng
++ optional jpegSupport libjpeg
++ optional tiffSupport libtiff
++ optional gifSupport giflib;
meta = {
description = "Tools and library for the WebP image format";
homepage = https://developers.google.com/speed/webp/;
license = licenses.bsd3;
platforms = platforms.all;
maintainers = with maintainers; [ codyopel ];
};
}