Skip to content

Commit 634e498

Browse files
committed
stealth: make a registry
1 parent 047a61f commit 634e498

File tree

1 file changed

+30
-33
lines changed

1 file changed

+30
-33
lines changed

flake.nix

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,37 @@
44
inputs = {
55
nixpkgs.url = "github:NixOS/nixpkgs/24.11";
66
flake-utils.url = "github:numtide/flake-utils";
7-
8-
# Import sub-flakes directly as inputs
9-
bitcoin-core = {
10-
url = "path:./bitcoin-core";
11-
inputs.nixpkgs.follows = "nixpkgs"; # Share nixpkgs input
12-
};
13-
14-
rust-bitcoinkernel = {
15-
url = "path:./rust-bitcoinkernel";
16-
inputs.nixpkgs.follows = "nixpkgs"; # Share nixpkgs input
17-
};
187
};
198

20-
outputs = { self, nixpkgs, flake-utils, bitcoin-core, rust-bitcoinkernel, ... }:
21-
flake-utils.lib.eachDefaultSystem (system:
22-
let
23-
pkgs = import nixpkgs { inherit system; };
24-
in
25-
{
26-
# Primary devShell for this repo
27-
devShells.default = pkgs.mkShell {
28-
buildInputs = with pkgs; [
29-
nix
30-
git
31-
];
32-
};
33-
34-
# Re-export the sub-flakes in a clear, accessible way
35-
# This allows: nix develop github:2140-dev/devazoa#bitcoin-core
36-
devShells.bitcoin-core = bitcoin-core.devShells.${system}.default;
37-
devShells.rust-bitcoinkernel = rust-bitcoinkernel.devShells.${system}.default;
9+
outputs = { self, nixpkgs, flake-utils, ... }:
10+
let
11+
supportedSystems = [
12+
"x86_64-linux"
13+
"aarch64-darwin"
14+
];
15+
in
16+
flake-utils.lib.eachSystem supportedSystems
17+
(system:
18+
let
19+
pkgs = import nixpkgs { inherit system; };
20+
in
21+
{
22+
# Restore development shell for the top-level repo
23+
devShells.default = pkgs.mkShell {
24+
buildInputs = with pkgs; [
25+
nix
26+
git
27+
];
28+
};
3829

39-
# Format function
40-
formatter = pkgs.nixpkgs-fmt;
41-
}
42-
);
30+
# Add formatter for nix fmt to work
31+
formatter = pkgs.nixpkgs-fmt;
32+
}
33+
) // {
34+
# The actual flake registry structure - each entry is a path to a flake
35+
flakeRegistry = {
36+
bitcoin-core = ./bitcoin-core;
37+
rust-bitcoinkernel = ./rust-bitcoinkernel;
38+
};
39+
};
4340
}

0 commit comments

Comments
 (0)