Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2024-11-25 08:29:33 +00:00
{
lib,
fetchFromGitHub,
rustPlatform,
openssl,
pkg-config,
git,
versionCheckHook,
2024-03-25 16:07:54 -04:00
}:
2024-11-25 08:29:33 +00:00
2025-04-16 16:11:05 +08:00
rustPlatform.buildRustPackage (finalAttrs: {
2024-03-25 16:07:54 -04:00
pname = "c2patool";
2025-08-15 01:05:35 +00:00
version = "0.20.0";
2024-03-25 16:07:54 -04:00
src = fetchFromGitHub {
owner = "contentauth";
2025-04-16 16:11:05 +08:00
repo = "c2pa-rs";
tag = "c2patool-v${finalAttrs.version}";
2025-08-15 01:05:35 +00:00
hash = "sha256-GYqH1Gc3oGFvQDZ8vKuFOGUWvIRlDzoPKDK1rTU9H3Y=";
2024-03-25 16:07:54 -04:00
};
2025-08-15 01:05:35 +00:00
cargoHash = "sha256-anpm5touXTQviCAr3kJ1Wm7pAt5yGsJKMwHFYTnNPzI=";
2024-03-25 16:07:54 -04:00
# use the non-vendored openssl
2024-11-25 08:29:33 +00:00
env.OPENSSL_NO_VENDOR = 1;
2024-03-25 16:07:54 -04:00
nativeBuildInputs = [
git
pkg-config
];
2024-11-25 08:29:33 +00:00
2025-04-16 16:11:05 +08:00
buildInputs = [ openssl ];
# could not compile `c2pa` (lib test) due to 102 previous errors
doCheck = false;
2024-03-25 16:07:54 -04:00
checkFlags = [
# These tests rely on additional executables to be compiled to "target/debug/".
"--skip=test_fails_for_external_signer_failure"
"--skip=test_fails_for_external_signer_success_without_stdout"
"--skip=test_succeed_using_example_signer"
# These tests require network access to "http://timestamp.digicert.com", which is disabled in a sandboxed build.
"--skip=test_manifest_config"
"--skip=test_fails_for_not_found_external_signer"
"--skip=tool_embed_jpeg_report"
"--skip=tool_embed_jpeg_with_ingredients_report"
"--skip=tool_similar_extensions_match"
"--skip=tool_test_manifest_ingredient_json"
];
doInstallCheck = true;
2024-11-25 08:29:33 +00:00
2025-04-16 16:11:05 +08:00
nativeInstallCheckInputs = [ versionCheckHook ];
2024-03-25 16:07:54 -04:00
2025-04-16 16:11:05 +08:00
meta = {
description = "Command line tool for working with C2PA manifests and media assets";
homepage = "https://github.com/contentauth/c2pa-rs/tree/main/cli";
license = with lib.licenses; [
2024-11-25 08:29:33 +00:00
asl20 # or
mit
];
2025-04-16 16:11:05 +08:00
maintainers = with lib.maintainers; [ ok-nick ];
2024-03-25 16:07:54 -04:00
mainProgram = "c2patool";
};
2025-04-16 16:11:05 +08:00
})