Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
ruby-version: '3.2'
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install Ruby dependencies
run: bundle install
- name: Setup just
Expand Down
39 changes: 39 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
{
description = "Development environment for codetracer-ruby-recorder";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
inputs.pre-commit-hooks.url = "github:cachix/git-hooks.nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks.url = "github:cachix/git-hooks.nix";
};

outputs = {
self,
nixpkgs,
fenix,
pre-commit-hooks,
}: let
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
forEachSystem = nixpkgs.lib.genAttrs systems;

rust-toolchain-for = system: fenix.packages.${system}.fromToolchainFile {
file = ./rust-toolchain.toml;
sha256 = "sha256-Qxt8XAuaUR2OMdKbN4u8dBJOhSHxS+uS06Wl9+flVEk=";
};
in {
checks = forEachSystem (system: {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
Expand Down Expand Up @@ -38,8 +50,7 @@
ruby

# The native extension is implemented in Rust
rustc
cargo
(rust-toolchain-for system)
libiconv # Required dependency when building the rb-sys Rust crate on macOS and some Linux systems

# Required for bindgen (used by rb-sys crate for generating Ruby C API bindings)
Expand Down
3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.88.0"
components = [ "rustc", "rust-analyzer", "rust-std", "cargo", "rustfmt", "rustc-dev", "llvm-tools" ]
Loading