|
4 | 4 | inputs = { |
5 | 5 | nixpkgs.url = "github:NixOS/nixpkgs/24.11"; |
6 | 6 | 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 | | - }; |
18 | 7 | }; |
19 | 8 |
|
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 | + }; |
38 | 29 |
|
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 | + }; |
43 | 40 | } |
0 commit comments