Files
nixpkgs/pkgs/by-name/c2/c2patool/package.nix
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

67 lines
1.7 KiB
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
openssl,
pkg-config,
git,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "c2patool";
version = "0.23.4";
src = fetchFromGitHub {
owner = "contentauth";
repo = "c2pa-rs";
tag = "c2patool-v${finalAttrs.version}";
hash = "sha256-6y7IKuYnwSSrfe44U+fNU8Q9YdHOq2Btvie6ZqTIBRw=";
};
cargoHash = "sha256-JnbvX/EkvatP/xlY+cTtRjVV+Rz2jjFIsqIvOFXqB5Q=";
# use the non-vendored openssl
env.OPENSSL_NO_VENDOR = 1;
nativeBuildInputs = [
git
pkg-config
];
buildInputs = [ openssl ];
# could not compile `c2pa` (lib test) due to 102 previous errors
doCheck = false;
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;
nativeInstallCheckInputs = [ versionCheckHook ];
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; [
asl20 # or
mit
];
maintainers = with lib.maintainers; [ ok-nick ];
mainProgram = "c2patool";
};
})