Skip to content

Packages essential tools for developing, deploying, and managing OP Stack chains with deterministic, reproducible builds using Nix

Notifications You must be signed in to change notification settings

Arkiv-Network/op.nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

op.nix

Overview

This flake packages essential tools for developing, deploying, and managing OP Stack chains with deterministic, reproducible builds using Nix.

Quick Start

Prerequisites

  • Nix with flakes enabled
  • (Optional) direnv for automatic environment loading

Using Packages Directly

Run any package directly without installation:

# Deploy an OP Stack chain
nix run github:numtide/arkiv/op.nix#op-deployer -- --help

# Start local multi-L2 environment
nix run github:numtide/arkiv/op.nix#supersim

# Query OP contract releases
nix run github:numtide/arkiv/op.nix#op-releases -- --help

# Use Safe CLI
nix run github:numtide/arkiv/op.nix#safe-cli -- --help

Development Shell

Enter a development environment with all tools:

# Using nix develop
nix develop github:numtide/arkiv/op.nix

# Or with direnv (automatic activation)
echo "use flake" > .envrc
direnv allow

The development shell includes all OP Stack tools, Foundry (forge, cast, anvil), and just command runner.

Using in Your Flake

Add to your flake.nix:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    op-nix.url = "github:numtide/arkiv/op.nix";
  };

  outputs = { self, nixpkgs, op-nix }: {
    devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
      packages = [
        op-nix.packages.x86_64-linux.op-deployer
        op-nix.packages.x86_64-linux.supersim
      ];
    };
  };
}

Development

Code Formatting

Format all code:

nix fmt

Check formatting in CI:

nix flake check

Contributing

Contributions are welcome! Please ensure:

  1. Code is properly formatted: nix fmt
  2. Flake checks pass: nix flake check
  3. Package builds successfully: nix build .#<package-name>

License

See individual package licenses.

Related Projects

About

Packages essential tools for developing, deploying, and managing OP Stack chains with deterministic, reproducible builds using Nix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published