Skip to content

chore: add full nix development support using go-overlay - #259

Open
Ahhhh-man wants to merge 1 commit into
santhosh-tekuri:boonfrom
Ahhhh-man:chore/add-nix-development
Open

chore: add full nix development support using go-overlay#259
Ahhhh-man wants to merge 1 commit into
santhosh-tekuri:boonfrom
Ahhhh-man:chore/add-nix-development

Conversation

@Ahhhh-man

@Ahhhh-man Ahhhh-man commented May 24, 2026

Copy link
Copy Markdown

This introduces a flake that pulls in go-overlay to provide a Go toolchain matched from go.work, the buildGoApplication helper used to package the CLI, and the govendor tool needed to keep vendoring reproducible. Using go-overlay lets the project build with standard Go module metadata instead of relying on nixpkgs' older Go packaging path.

See https://github.com/purpleclay/go-overlay

closes #179

Downstream example:

{
  description = "Example consumer of jsonschema/jv";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";

    jsonschema = {
      url = "github:santhosh-tekuri/jsonschema";
      inputs.nixpkgs.follows = "nixpkgs";
      inputs.flake-utils.follows = "flake-utils";
    };
  };

  outputs = { self, nixpkgs, flake-utils, jsonschema, ... }:
    flake-utils.lib.eachDefaultSystem (
      system: let
        pkgs = import nixpkgs { inherit system; };
      in
        with pkgs; {
          devShells.default = mkShell {
            buildInputs = [
              jsonschema.packages.${system}.default
            ];
          };
        }
    );
}

This introduces a flake that pulls in go-overlay to provide a Go
toolchain matched from go.work, the buildGoApplication helper used to
package the CLI, and the govendor tool needed to keep vendoring
reproducible. Using go-overlay lets the project build with standard Go
module metadata instead of relying on nixpkgs' older Go packaging path.

See https://github.com/purpleclay/go-overlay

Signed-off-by: Ahhhh-man <85831666+Ahhhh-man@users.noreply.github.com>
@santhosh-tekuri
santhosh-tekuri force-pushed the boon branch 3 times, most recently from 7ba9b5e to b0fc661 Compare June 28, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nix Package / Flake Support

1 participant