-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathflake.nix
More file actions
82 lines (75 loc) · 2.29 KB
/
flake.nix
File metadata and controls
82 lines (75 loc) · 2.29 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
description = "Dev environment for bdk_sp workspace";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
};
nixConfig = {
extra-substituters = ["https://sptabconf7.cachix.org"];
extra-trusted-public-keys = ["sptabconf7.cachix.org-1:ulR9Y3dF4M6zKXnRRT4+r1Yp52EBMk6yVPKEp1EmdJk="];
};
outputs = {
self,
nixpkgs,
flake-utils,
rust-overlay,
}:
flake-utils.lib.eachDefaultSystem (
system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
# Define the Rust version we want to use
rustVersion = pkgs.rust-bin.stable.latest.default;
in {
formatter = pkgs.alejandra;
packages = {
sp-cli2 =
(pkgs.makeRustPlatform {
cargo = rustVersion;
rustc = rustVersion;
})
.buildRustPackage {
pname = "sp-cli2";
version = "0.1.0";
# Disable cargo-auditable which doesn't support edition 2024
auditable = false;
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"bdk_tx-0.1.0" = "sha256-29weg2aCn+4MHC9DJLSBd09RS7igbTqF/fKRd5u5ef4=";
};
};
buildAndTestSubdir = "cli/v2";
meta = with pkgs.lib; {
description = "A lightweight command line bitcoin silent payment wallet powered by BDK";
homepage = "https://bitcoindevkit.org";
license = with licenses; [mit];
mainProgram = "sp-cli2";
};
};
};
defaultPackage = self.packages.${system}.sp-cli2;
apps = {
sp-cli2 = flake-utils.lib.mkApp {
drv = self.defaultPackage;
name = "sp-cli2";
};
};
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.rustc
pkgs.cargo
pkgs.rust-analyzer
self.packages.${system}.sp-cli2
];
};
}
);
}