Skip to content

Commit 9cc02a2

Browse files
committed
stealth: try out flake-parts
1 parent 634e498 commit 9cc02a2

File tree

9 files changed

+154
-248
lines changed

9 files changed

+154
-248
lines changed

bitcoin-core/flake.lock

Lines changed: 0 additions & 61 deletions
This file was deleted.

bitcoin-core/flake.nix

Lines changed: 0 additions & 89 deletions
This file was deleted.

flake.lock

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,16 @@
11
{
2-
description = "devazoa - a collection of development environments";
2+
description = "devazoa - a collection of bitcoin development environments";
33

44
inputs = {
55
nixpkgs.url = "github:NixOS/nixpkgs/24.11";
6-
flake-utils.url = "github:numtide/flake-utils";
6+
flake-parts.url = "github:hercules-ci/flake-parts";
77
};
88

9-
outputs = { self, nixpkgs, flake-utils, ... }:
10-
let
11-
supportedSystems = [
12-
"x86_64-linux"
13-
"aarch64-darwin"
9+
outputs = inputs@{ flake-parts, ... }:
10+
flake-parts.lib.mkFlake { inherit inputs; } {
11+
imports = [
12+
./modules/devshells.nix
13+
./modules/formatter.nix
1414
];
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-
};
29-
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-
};
3915
};
4016
}

modules/devshells.nix

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{ lib, ... }:
2+
3+
{
4+
systems = [
5+
"x86_64-linux"
6+
"aarch64-darwin"
7+
];
8+
9+
perSystem = { system, pkgs, ... }: {
10+
devShells = {
11+
default = pkgs.mkShell {
12+
packages = with pkgs; [ nix git ];
13+
};
14+
15+
bitcoin-core = import ../shells/bitcoin-core.nix { inherit pkgs system; };
16+
rust-bitcoinkernel = import ../shells/rust-bitcoinkernel.nix { inherit pkgs system; };
17+
};
18+
};
19+
}

modules/formatter.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{ lib, ... }:
2+
3+
{
4+
perSystem = { pkgs, ... }: {
5+
formatter = pkgs.nixpkgs-fmt;
6+
};
7+
}

rust-bitcoinkernel/flake.nix

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)