-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.nix
38 lines (31 loc) · 1.08 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
{ pkgsFun ? import (import ./nix/nixpkgs/thunk.nix)
, rustOverlay ? import "${import ./nix/nixpkgs-mozilla/thunk.nix}/rust-overlay.nix"
# Rust manifest hash must be updated when rust-toolchain file changes.
, rustPackages ? pkgs.rustChannelOf {
date = "2020-05-04";
rustToolchain = ./rust-toolchain;
sha256 = "1hkisci4as93hx8ybf13bmxkj9jsvd4a9ilvjmw6n64w4jkc1nk9";
}
, pkgs ? pkgsFun {
overlays = [
rustOverlay
];
}
, gitignoreNix ? import ./nix/gitignore.nix/thunk.nix
}:
let
rustPlatform = pkgs.makeRustPlatform {
inherit (rustPackages) cargo;
rustc = rustPackages.rust;
};
inherit (import gitignoreNix { inherit (pkgs) lib; }) gitignoreSource;
in rustPlatform.buildRustPackage {
name = "ckb-plugin-ledger";
src = gitignoreSource ./.;
nativeBuildInputs = [ pkgs.pkgconfig ];
buildInputs = [ rustPackages.rust-std pkgs.openssl pkgs.libudev ];
verifyCargoDeps = true;
# Cargo hash must be updated when Cargo.lock file changes.
# cargoSha256 = pkgs.lib.fakeSha256;
cargoSha256 = "0wa11bvxkw9b29hd2ybamrvh020p4b17fxlvjysdjc02b5i46s75";
}