Skip to content

Commit 57e5585

Browse files
ericcrosson-bitgoaider
andcommitted
feat: add nix flake configuration for project development environment
Closes Ticket: DX-1345 Co-authored-by: aider <[email protected]>
1 parent f47d772 commit 57e5585

File tree

6 files changed

+84
-3
lines changed

6 files changed

+84
-3
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ lab/
1515
.yarn
1616
modules/**/dist/
1717
modules/**/pack-scoped/
18-
coverage
18+
coverage
19+
/.direnv/

.prettierignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ protobuf/
55
*.json
66
*.min.js
77
CHANGELOG.md
8+
flake.lock
89

9-
10-
modules/babylonlabs-io-btc-staking-ts/
10+
modules/babylonlabs-io-btc-staking-ts/

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,5 @@
137137
/tsconfig.json @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
138138
/tsconfig.packages.json @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
139139
/.iyarc @BitGo/wallet-platform @BitGo/hsm @BitGo/velocity
140+
flake.nix @BitGo/wallet-platform @BitGo/hsm @BitGo/developer-experience
141+
flake.lock @BitGo/wallet-platform @BitGo/hsm @BitGo/developer-experience

flake.lock

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

flake.nix

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:nixos/nixpkgs";
4+
nixpkgs-nodejs.url = "github:nixos/nixpkgs/de1864217bfa9b5845f465e771e0ecb48b30e02d"; # Node.js 20.18.1
5+
};
6+
7+
outputs = {
8+
self,
9+
nixpkgs,
10+
nixpkgs-nodejs,
11+
}: let
12+
forEachSystem = nixpkgs.lib.genAttrs [
13+
"aarch64-darwin"
14+
"aarch64-linux"
15+
"x86_64-darwin"
16+
"x86_64-linux"
17+
];
18+
in {
19+
devShells = forEachSystem (system: let
20+
pkgs = nixpkgs.legacyPackages.${system};
21+
in {
22+
default = pkgs.mkShell {
23+
packages = with nixpkgs-nodejs.legacyPackages.${system}; [
24+
nodejs_20
25+
(yarn.override { nodejs = nodejs_20; })
26+
];
27+
28+
shellHook = ''
29+
export PATH="$(pwd)/node_modules/.bin:$PATH"
30+
'';
31+
};
32+
});
33+
};
34+
}

0 commit comments

Comments
 (0)