-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
52 lines (42 loc) · 1.6 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ rev ? "8e1eab9eae4278c9bb1dcae426848a581943db5a"
, sha256 ? "0jf4rccc0z9in1iahw13i5wl93gbp1x6mkjd3qivjg97ms9qw3l0"
, pkgs ? import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
inherit sha256; }) {
config.allowUnfree = true;
config.allowBroken = false;
}
}:
with pkgs; rustPlatform.buildRustPackage rec {
pname = "quill";
version = "0.2.9";
src = ./.;
cargoSha256 = "sha256-ZV0U8YjCwbIkc+2DmSuUlVYocpKmQSfNVKw1NvAp5xU";
cargoBuildFlags = [];
nativeBuildInputs = [ rls rustfmt clippy pkg-config wasm-pack cargo-bloat ];
buildInputs = [ openssl protobuf ]
++ (lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security);
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=${protobuf}/bin/protoc
export OPENSSL_DIR=${openssl.dev}
export OPENSSL_LIB_DIR=${openssl.out}/lib
'';
meta = with lib; {
description = "Minimalistic ledger and governance toolkit for cold wallets.";
homepage = https://github.com/dfinity/quill;
license = licenses.asl20;
maintainers = [ maintainers.jwiegley ];
platforms = platforms.all;
};
}