Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.5 KiB
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
fontconfig,
writableTmpDirAsHomeHook,
writeShellApplication,
hdr10plus,
nixVersions,
nix-update,
tomlq,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "hdr10plus_tool";
version = "1.7.1";
src = fetchFromGitHub {
owner = "quietvoid";
repo = "hdr10plus_tool";
tag = finalAttrs.version;
hash = "sha256-Lpm770Eb81L+eEzHUD+0+J3iS9CFdSP3odhw6KDtgAI=";
};
cargoHash = "sha256-Qkl02HAC6PVCHW226R6StmzrGZv/IHcE88kEg9BpObs=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ fontconfig ];
nativeCheckInputs = [ writableTmpDirAsHomeHook ];
preCheck = ''
export FONTCONFIG_FILE="${fontconfig.out}/etc/fonts/fonts.conf";
'';
passthru.updateScript = lib.getExe (writeShellApplication {
name = "update-${finalAttrs.pname}";
runtimeInputs = [
nixVersions.latest
nix-update
tomlq
];
text = ''
nix-update ${finalAttrs.pname}
src="$(nix eval -f . --raw ${finalAttrs.pname}.src)"
libver="$(tq -f "$src/hdr10plus/Cargo.toml" package.version)"
nix-update ${hdr10plus.pname} --version "$libver"
'';
});
meta = {
description = "CLI utility to work with HDR10+ in HEVC files";
homepage = "https://github.com/quietvoid/hdr10plus_tool";
changelog = "https://github.com/quietvoid/hdr10plus_tool/releases/tag/${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ johnrtitor ];
mainProgram = "hdr10plus_tool";
};
})