c2patool: 0.9.10 -> 0.9.12

This commit is contained in:
R. Ryantm 2024-11-25 08:29:33 +00:00 committed by Nick Cao
parent 988507244d
commit 9e7eb7cd6d
No known key found for this signature in database

View File

@ -1,39 +1,36 @@
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, libiconv
, darwin
, openssl
, pkg-config
, git
{
lib,
fetchFromGitHub,
rustPlatform,
openssl,
pkg-config,
git,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "c2patool";
version = "0.9.10";
version = "0.9.12";
src = fetchFromGitHub {
owner = "contentauth";
repo = pname;
rev = "v${version}";
hash = "sha256-1q0s8fwhlD891AhS1Sr2JBHi69SUMdP2cYslM/yFh8o=";
hash = "sha256-3OaCsy6xt2Pc/Cqm3qbbpr7kiQiA2BM/LqIQnuw73MY=";
};
cargoHash = "sha256-4LfrafJd2W2HL/Q36lJ1zXw2CDLL79SLEuyKeFR9cUY=";
cargoHash = "sha256-sei1sOhR35tkNW4rObLC+0Y5upxNo6yjRMLNcro0tRY=";
# use the non-vendored openssl
OPENSSL_NO_VENDOR = 1;
env.OPENSSL_NO_VENDOR = 1;
nativeBuildInputs = [
git
pkg-config
];
buildInputs = [
openssl
] ++ lib.optional stdenv.hostPlatform.isDarwin [
libiconv
darwin.apple_sdk.frameworks.CoreServices
darwin.apple_sdk.frameworks.Carbon
];
checkFlags = [
@ -52,14 +49,18 @@ rustPlatform.buildRustPackage rec {
];
doInstallCheck = true;
installCheckPhase = ''
$out/bin/c2patool --version | grep "${version}"
'';
nativeInstallCheckInputs = [
versionCheckHook
];
meta = with lib; {
description = "Command line tool for displaying and adding C2PA manifests";
homepage = "https://github.com/contentauth/c2patool";
license = with licenses; [ asl20 /* or */ mit ];
license = with licenses; [
asl20 # or
mit
];
maintainers = with maintainers; [ ok-nick ];
mainProgram = "c2patool";
};