forked from lidofinance/validator-ejector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(nix): Add Nix Flakes & nix-direnv dev shell
- Loading branch information
1 parent
5ade0e9
commit 00ff88a
Showing
4 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# shellcheck shell=bash | ||
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" | ||
fi | ||
|
||
dotenv_if_exists | ||
|
||
use flake | ||
nix_direnv_watch_file ./shell.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
description = "Validator Ejector"; | ||
|
||
inputs = { | ||
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable; | ||
|
||
flake-parts = { | ||
url = "github:hercules-ci/flake-parts"; | ||
inputs.nixpkgs-lib.follows = "nixpkgs"; | ||
}; | ||
}; | ||
|
||
outputs = inputs @ {flake-parts, ...}: | ||
flake-parts.lib.mkFlake {inherit inputs;} { | ||
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"]; | ||
perSystem = {pkgs, ...}: let | ||
nodejs = pkgs.nodejs_20; | ||
yarn = pkgs.yarn.override {inherit nodejs;}; | ||
in { | ||
devShells.default = pkgs.mkShellNoCC { | ||
packages = [nodejs yarn]; | ||
}; | ||
|
||
packages.validator-ejector = pkgs.callPackage ./packages/validator-ejector {}; | ||
}; | ||
}; | ||
} |