Skip to content
This repository was archived by the owner on Sep 28, 2025. It is now read-only.

Fix broken devShell by adding flake-utils support for multiple systems#35

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-34
Draft

Fix broken devShell by adding flake-utils support for multiple systems#35
Copilot wants to merge 2 commits intomainfrom
copilot/fix-34

Conversation

Copy link
Contributor

Copilot AI commented Sep 7, 2025

The Nix flake was hardcoded to only support x86_64-linux systems, making it incompatible with other architectures like macOS (both Intel and Apple Silicon) and ARM Linux systems.

Before:

{
  description = "flake to setup the dev env required for Tandem";
  inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
  outputs = { self, nixpkgs }:
    let
      system = "x86_64-linux";  # Hardcoded system limitation
      pkgs = import nixpkgs {
        inherit system;
        config.allowUnfree = true;
      };
    in
    {
      devShells.${system}.default = # Only works on x86_64-linux
        with pkgs;
        mkShell { ... };
    };
}

After:

{
  description = "flake to setup the dev env required for Tandem";
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";  # Added flake-utils
  };
  outputs = { self, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:  # Support all default systems
      let
        pkgs = import nixpkgs {
          inherit system;
          config.allowUnfree = true;
        };
      in
      {
        devShells.default =  # Works on all supported architectures
          with pkgs;
          mkShell { ... };
      });
}

This change enables the development environment to work across all platforms supported by Nix:

  • x86_64-linux (Intel/AMD Linux)
  • x86_64-darwin (Intel macOS)
  • aarch64-linux (ARM Linux)
  • aarch64-darwin (Apple Silicon macOS)

All existing development dependencies (go, gopls, gotools, vagrant, sqlc, goreleaser) and shell configuration remain unchanged.

Fixes #34.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: yyovil <149292478+yyovil@users.noreply.github.com>
Copilot AI changed the title [WIP] broke devShell Fix broken devShell by adding flake-utils support for multiple systems Sep 7, 2025
Copilot AI requested a review from yyovil September 7, 2025 17:07
Copy link
Owner

@yyovil yyovil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want vagrant on aarch64 and remove source tandem.env as it should be the .envrc file

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

broke devShell

2 participants