mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 01:33:10 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
75 lines
1.4 KiB
Nix
75 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, pkg-config
|
|
, dav1d
|
|
, rav1e
|
|
, libde265
|
|
, x265
|
|
, libpng
|
|
, libjpeg
|
|
, libaom
|
|
, gdk-pixbuf
|
|
|
|
# for passthru.tests
|
|
, gimp
|
|
, imagemagick
|
|
, imlib2Full
|
|
, imv
|
|
, python3Packages
|
|
, vips
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libheif";
|
|
version = "1.18.2";
|
|
|
|
outputs = [ "bin" "out" "dev" "man" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "strukturag";
|
|
repo = "libheif";
|
|
rev = "v${version}";
|
|
hash = "sha256-Z21E2b4E9jGtwR1RpFMAbGsWFw6jXn++WexlzdoyZzE=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
cmake
|
|
];
|
|
|
|
buildInputs = [
|
|
dav1d
|
|
rav1e
|
|
libde265
|
|
x265
|
|
libpng
|
|
libjpeg
|
|
libaom
|
|
gdk-pixbuf
|
|
];
|
|
|
|
# Fix installation path for gdk-pixbuf module
|
|
PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${placeholder "out"}/${gdk-pixbuf.moduleDir}";
|
|
|
|
# Wrong include path in .cmake. It's a bit difficult to patch because of special characters.
|
|
postFixup = ''
|
|
sed '/^ INTERFACE_INCLUDE_DIRECTORIES/s|"[^"]*/include"|"${placeholder "dev"}/include"|' \
|
|
-i "$dev"/lib/cmake/libheif/libheif-config.cmake
|
|
'';
|
|
|
|
passthru.tests = {
|
|
inherit gimp imagemagick imlib2Full imv vips;
|
|
inherit (python3Packages) pillow-heif;
|
|
};
|
|
|
|
meta = {
|
|
homepage = "http://www.libheif.org/";
|
|
description = "ISO/IEC 23008-12:2017 HEIF image file format decoder and encoder";
|
|
license = lib.licenses.lgpl3Plus;
|
|
platforms = lib.platforms.unix;
|
|
maintainers = with lib.maintainers; [ gebner ];
|
|
};
|
|
}
|