summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2024-04-09 14:34:47 +0200
committerGitHub <noreply@github.com>2024-04-09 14:34:47 +0200
commita76c4553d7e741e17f289224eda135423de0491d (patch)
treecf99a8bae8464ffc2e557a43c16c844d2d4510c3
parentcd2c9968cf779c7341ee7c37bc003d722f61a5cc (diff)
parent1ea6485c108322320beb25673008efac739d316f (diff)
Merge pull request #292020 from ok-nick/c2patool
-rw-r--r--maintainers/maintainer-list.nix6
-rw-r--r--pkgs/by-name/c2/c2patool/package.nix66
2 files changed, 72 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index fbfe7f1df909..4d9715f9784b 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -14796,6 +14796,12 @@
githubId = 7249506;
name = "oida";
};
+ ok-nick = {
+ email = "nick.libraries@gmail.com";
+ github = "ok-nick";
+ githubId = 25470747;
+ name = "Nick";
+ };
olcai = {
email = "dev@timan.info";
github = "olcai";
diff --git a/pkgs/by-name/c2/c2patool/package.nix b/pkgs/by-name/c2/c2patool/package.nix
new file mode 100644
index 000000000000..d715a062568a
--- /dev/null
+++ b/pkgs/by-name/c2/c2patool/package.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, rustPlatform
+, libiconv
+, darwin
+, openssl
+, pkg-config
+, git
+}:
+rustPlatform.buildRustPackage rec {
+ pname = "c2patool";
+ version = "0.8.2";
+
+ src = fetchFromGitHub {
+ owner = "contentauth";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "sha256-fVH7itpVPg0vkgKSWa9x61yttLx73gTeLT5+R4aSOFE=";
+ };
+
+ cargoHash = "sha256-oNNfQIwl7QprrlpIZrTYVGp/UMWANVr3b3ALFKupyy8=";
+
+ # use the non-vendored openssl
+ OPENSSL_NO_VENDOR = 1;
+
+ nativeBuildInputs = [
+ git
+ pkg-config
+ ];
+ buildInputs = [
+ openssl
+ ] ++ lib.optional stdenv.isDarwin [
+ libiconv
+ darwin.apple_sdk.frameworks.CoreServices
+ darwin.apple_sdk.frameworks.Carbon
+ ];
+
+ 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;
+ installCheckPhase = ''
+ $out/bin/c2patool --version | grep "${version}"
+ '';
+
+ 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 ];
+ maintainers = with maintainers; [ ok-nick ];
+ mainProgram = "c2patool";
+ };
+}