From 0d0b2c3561aec6cf9db481072f6d3d6affda481c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Thallis?= Date: Wed, 1 Apr 2026 19:40:01 -0300 Subject: [PATCH] Replace shell.nix with Nix flakes for reproducible dev environment Migrates from legacy shell.nix (using channel) to a Nix flake with pinned nixpkgs (nixos-25.11). Supports aarch64-darwin, x86_64-darwin, x86_64-linux, and aarch64-linux. Co-Authored-By: Claude Opus 4.6 (1M context) --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 28 ++++++++++++++++++++++++++++ shell.nix | 4 ---- 3 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix delete mode 100644 shell.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..a83d9bf7 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1775002709, + "narHash": "sha256-d3Yx83vSrN+2z/loBh4mJpyRqr9aAJqlke4TkpFmRJA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "bcd464ccd2a1a7cd09aa2f8d4ffba83b761b1d0e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..c793db89 --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + description = "FlowRunner development environment"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; + }; + + outputs = + { nixpkgs, ... }: + let + systems = [ + "aarch64-darwin" + "x86_64-darwin" + "x86_64-linux" + "aarch64-linux" + ]; + forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system}); + in + { + devShells = forAllSystems (pkgs: { + default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + beam28Packages.elixir_1_19 + ]; + }; + }); + }; +} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 823c5266..00000000 --- a/shell.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ pkgs ? import {} }: - pkgs.mkShell { - nativeBuildInputs = with pkgs.buildPackages; [ beam28Packages.elixir_1_19 ]; -}