Add Nix flake for mcrctl

Vendor dependencies and expose mcrctl binary via nix build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 21:01:28 -07:00
parent 1454f56adb
commit 75c8b110da
2275 changed files with 6788812 additions and 0 deletions

33
flake.nix Normal file
View File

@@ -0,0 +1,33 @@
{
description = "mcr - Metacircular Container Registry";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
};
outputs =
{ self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
version = "0.1.0";
in
{
packages.${system} = {
default = pkgs.buildGoModule {
pname = "mcrctl";
inherit version;
src = ./.;
vendorHash = null;
subPackages = [
"cmd/mcrctl"
];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
};
};
};
}