Skip to content

Commit 047a61f

Browse files
committed
stealth: restructure to properly import
1 parent e334474 commit 047a61f

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

flake.nix

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,39 @@
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+
};
718
};
819

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 (system:
20+
outputs = { self, nixpkgs, flake-utils, bitcoin-core, rust-bitcoinkernel, ... }:
21+
flake-utils.lib.eachDefaultSystem (system:
1722
let
1823
pkgs = import nixpkgs { inherit system; };
1924
in
2025
{
21-
# Existing outputs
22-
flakes = {
23-
bitcoin-core = import ./bitcoin-core;
24-
rust-bitcoinkernel = import ./rust-bitcoinkernel;
25-
};
26-
26+
# Primary devShell for this repo
2727
devShells.default = pkgs.mkShell {
2828
buildInputs = with pkgs; [
2929
nix
3030
git
3131
];
3232
};
3333

34-
# Add formatter
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;
38+
39+
# Format function
3540
formatter = pkgs.nixpkgs-fmt;
3641
}
3742
);

0 commit comments

Comments
 (0)