1{ lib
2, stdenv
3, rustPlatform
4, fetchFromGitHub
5, darwin
6}:
7
8rustPlatform.buildRustPackage rec {
9 pname = "rcodesign";
10 version = "0.22.0";
11
12 src = fetchFromGitHub {
13 owner = "indygreg";
14 repo = "apple-platform-rs";
15 rev = "apple-codesign/${version}";
16 hash = "sha256-ndbDBGtTOfHHUquKrETe4a+hB5Za9samlnXwVGVvWy4=";
17 };
18
19 cargoHash = "sha256-cpQBdxTw/ge4VtzjdL2a2xgSeCT22fMIjuKu5UEedhI=";
20
21 buildInputs = lib.optionals stdenv.isDarwin [
22 darwin.apple_sdk_11_0.frameworks.Security
23 ];
24
25 cargoBuildFlags = [
26 # Only build the binary we want
27 "--bin"
28 "rcodesign"
29 ];
30
31 checkFlags = [
32 # Does network IO
33 "--skip=ticket_lookup::test::lookup_ticket"
34 ];
35
36 meta = with lib; {
37 description = "A cross-platform CLI interface to interact with Apple code signing.";
38 longDescription = ''
39 rcodesign provides various commands to interact with Apple signing,
40 including signing and notarizing binaries, generating signing
41 certificates, and verifying existing signed binaries.
42
43 For more information, refer to the [documentation](https://gregoryszorc.com/docs/apple-codesign/stable/apple_codesign_rcodesign.html).
44 '';
45 homepage = "https://github.com/indygreg/apple-platform-rs";
46 license = licenses.mpl20;
47 maintainers = with maintainers; [ euank ];
48 };
49}