summary refs log tree commit diff
path: root/pkgs/tools/security/quill/default.nix
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-07-21 00:05:28 +0000
committerGitHub <noreply@github.com>2021-07-21 00:05:28 +0000
commit8a3580c2f60ab204ea35562eaae8313e0fe0ce12 (patch)
treeab5331a9b9a64353a4daf15ad9908218bf303351 /pkgs/tools/security/quill/default.nix
parentfef688899e5882f13efb5f01d54febad37023252 (diff)
parent4218023470e5d24f3f571963ba54c74327e6c1fe (diff)
downloadnixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar
nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar.gz
nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar.bz2
nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar.lz
nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar.xz
nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar.zst
nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.zip
Merge master into haskell-updates
Diffstat (limited to 'pkgs/tools/security/quill/default.nix')
-rw-r--r--pkgs/tools/security/quill/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/tools/security/quill/default.nix b/pkgs/tools/security/quill/default.nix
new file mode 100644
index 00000000000..74c7996a896
--- /dev/null
+++ b/pkgs/tools/security/quill/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, rustPlatform, fetchFromGitHub, openssl, Security, libiconv, pkg-config, protobuf, which, buildPackages }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "quill";
+  version = "0.2.1";
+
+  src = fetchFromGitHub {
+    owner = "dfinity";
+    repo = "quill";
+    rev = "v${version}";
+    sha256 = "02ga2xkdxs36mfr4lv43cy6wkf27c28bdkzfkp3az5jvyk17mkfr";
+  };
+
+  ic = fetchFromGitHub {
+    owner = "dfinity";
+    repo = "ic";
+    rev = "779549eccfcf61ac702dfc2ee6d76ffdc2db1f7f";
+    sha256 = "1r31d5hab7k1n60a7y8fw79fjgfq04cgj9krwa6r9z4isi3919v6";
+  };
+
+  registry = "file://local-registry";
+
+  preBuild = ''
+    export REGISTRY_TRANSPORT_PROTO_INCLUDES=${ic}/rs/registry/transport/proto
+    export IC_BASE_TYPES_PROTO_INCLUDES=${ic}/rs/types/base_types/proto
+    export IC_PROTOBUF_PROTO_INCLUDES=${ic}/rs/protobuf/def
+    export IC_NNS_COMMON_PROTO_INCLUDES=${ic}/rs/nns/common/proto
+    export PROTOC=${buildPackages.protobuf}/bin/protoc
+    export OPENSSL_DIR=${openssl.dev}
+    export OPENSSL_LIB_DIR=${openssl.out}/lib
+  '';
+
+  cargoSha256 = "142pzhyi73ljlqas5vbhjhn4vmp9w9ps1mv8q7s3kzg0h7jcvm1k";
+
+  nativeBuildInputs = [ pkg-config protobuf ];
+  buildInputs = [ openssl ]
+    ++ lib.optionals stdenv.isDarwin [ Security libiconv ];
+
+  meta = with lib; {
+    homepage = "https://github.com/dfinity/quill";
+    changelog = "https://github.com/dfinity/quill/releases/tag/v${version}";
+    description = "Minimalistic ledger and governance toolkit for cold wallets on the Internet Computer.";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ imalison ];
+  };
+}