vuze: drop (#358309)
[NixPkgs.git] / pkgs / tools / security / quill / default.nix
blob3aa2e6525b62472f0805ab8474566eca112d632b
1 { lib, stdenv, rustPlatform, fetchFromGitHub, openssl, Security, libiconv, pkg-config, protobuf, buildPackages }:
3 rustPlatform.buildRustPackage rec {
4   pname = "quill";
5   version = "0.2.17";
7   src = fetchFromGitHub {
8     owner = "dfinity";
9     repo = "quill";
10     rev = "v${version}";
11     sha256 = "sha256-0DHTtnQU26l4DXUVDeHF+hkavlVY7rQykXxgWGSUc/k=";
12   };
14   ic = fetchFromGitHub {
15     owner = "dfinity";
16     repo = "ic";
17     rev = "779549eccfcf61ac702dfc2ee6d76ffdc2db1f7f";
18     sha256 = "1r31d5hab7k1n60a7y8fw79fjgfq04cgj9krwa6r9z4isi3919v6";
19   };
21   registry = "file://local-registry";
23   preBuild = ''
24     export REGISTRY_TRANSPORT_PROTO_INCLUDES=${ic}/rs/registry/transport/proto
25     export IC_BASE_TYPES_PROTO_INCLUDES=${ic}/rs/types/base_types/proto
26     export IC_PROTOBUF_PROTO_INCLUDES=${ic}/rs/protobuf/def
27     export IC_NNS_COMMON_PROTO_INCLUDES=${ic}/rs/nns/common/proto
28     export PROTOC=${buildPackages.protobuf}/bin/protoc
29     export OPENSSL_DIR=${openssl.dev}
30     export OPENSSL_LIB_DIR=${lib.getLib openssl}/lib
31   '';
33   cargoLock = {
34     lockFile = ./Cargo.lock;
35     outputHashes = {
36       "derive_more-0.99.8-alpha.0" = "sha256-tEsfYC9oCAsDjinCsUDgRg3q6ruvayuA1lRmsEP9cys=";
37       "dfn_candid-0.8.0" = "sha256-7LXTwxSA9pTjFynMRzNRXie4x5u8BSLpFaOzpRsgrKA=";
38       "once_cell-1.4.0-alpha.0" = "sha256-5g26ZizSY5egH/4yU5glzBxpWzdvgKtDsckBpAUBatw=";
39     };
40   };
42   nativeBuildInputs = [ pkg-config protobuf ];
43   buildInputs = [ openssl ]
44     ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv ];
46   meta = with lib; {
47     homepage = "https://github.com/dfinity/quill";
48     changelog = "https://github.com/dfinity/quill/releases/tag/v${version}";
49     description = "Minimalistic ledger and governance toolkit for cold wallets on the Internet Computer";
50     mainProgram = "quill";
51     license = licenses.asl20;
52     maintainers = with maintainers; [ imalison ];
53   };