Files
millerson-overlay.nix/packages/container-use/package.nix

43 lines
933 B
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "container-use";
version = "0.4.2";
src = fetchFromGitHub {
owner = "dagger";
repo = "container-use";
rev = "v${version}";
hash = "sha256-YKgS142a9SL1ZEjS+VArxwUzQX961zwlGuHW43AMxQA=";
};
vendorHash = "sha256-M7YhEm9Gmjv2gxB2r7AS5JLLThEkvtJfLBrB+cvsN5c=";
env.CGO_ENABLED = 0;
subPackages = [ "cmd/container-use" ];
doCheck = false;
postInstall = ''
ln -s $out/bin/container-use $out/bin/cu
'';
ldflags = [
"-s -w -X main.version=v${version}"
];
meta = with lib; {
description = "Containerized environments for coding agents";
homepage = "https://github.com/dagger/container-use";
changelog = "https://github.com/dagger/container-use/releases/tag/v${version}";
license = licenses.asl20;
mainProgram = "container-use";
platforms = platforms.linux ++ platforms.darwin;
};
}