depot/third_party/nixpkgs/pkgs/by-name/me/metadata/package.nix
Default email ae2dc6aea6 Project import generated by Copybara.
GitOrigin-RevId: 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0
2024-10-11 07:15:48 +02:00

51 lines
1 KiB
Nix

{ lib
, fetchFromGitHub
, pkg-config
, ffmpeg
, rustPlatform
, glib
, installShellFiles
, asciidoc
}:
rustPlatform.buildRustPackage rec {
pname = "metadata";
version = "0.1.9";
src = fetchFromGitHub {
owner = "zmwangx";
repo = "metadata";
rev = "v${version}";
hash = "sha256-OFWdCV9Msy/mNaSubqoJi4tBiFqL7RuWWQluSnKe4fU=";
};
cargoHash = "sha256-F5jXS/W600nbQtu1FD4+DawrFsO+5lJjvAvTiFKT840=";
nativeBuildInputs = [
pkg-config
asciidoc
installShellFiles
rustPlatform.bindgenHook
];
postBuild = ''
a2x --doctype manpage --format manpage man/metadata.1.adoc
'';
postInstall = ''
installManPage man/metadata.1
'';
buildInputs = [
ffmpeg
glib
];
env.FFMPEG_DIR = ffmpeg.dev;
meta = {
description = "Media metadata parser and formatter designed for human consumption, powered by FFmpeg";
maintainers = with lib.maintainers; [ clevor ];
license = lib.licenses.mit;
homepage = "https://github.com/zmwangx/metadata";
mainProgram = "metadata";
};
}