nixpkgs/pkgs/by-name/li/libde265/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

49 lines
1002 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, callPackage
# for passthru.tests
, imagemagick
, libheif
, imlib2Full
, gst_all_1
}:
stdenv.mkDerivation (finalAttrs: rec {
version = "1.0.15";
pname = "libde265";
src = fetchFromGitHub {
owner = "strukturag";
repo = "libde265";
rev = "refs/tags/v${version}";
hash = "sha256-guiLM4RNe5O0qpeCoQUbs1Z7j0wp8iK9za2+6NIB8yY=";
};
nativeBuildInputs = [ cmake pkg-config ];
enableParallelBuilding = true;
passthru.tests = {
inherit imagemagick libheif imlib2Full;
inherit (gst_all_1) gst-plugins-bad;
test-corpus-decode = callPackage ./test-corpus-decode.nix {
libde265 = finalAttrs.finalPackage;
};
};
meta = {
homepage = "https://github.com/strukturag/libde265";
description = "Open h.265 video codec implementation";
mainProgram = "dec265";
license = lib.licenses.lgpl3;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ gebner ];
};
})