Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions pkgs/by-name/ki/kitops/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
}:

buildGoModule (finalAttrs: {
__structuredAttrs = true;
pname = "kitops";
version = "1.15.0";

src = fetchFromGitHub {
owner = "kitops-ml";
repo = "kitops";
tag = "v${finalAttrs.version}";
hash = "sha256-ySn91TIkWOd3myjcscmcN0jhbjp0mAYm9R2nG0bnTVo=";
};

vendorHash = "sha256-lT1xSuwEZMVjy18pQSuqybfgULyagJX4hCWUYdNrQ8M=";

subPackages = [ "." ];

ldflags = [
"-s"
"-X github.com/kitops-ml/kitops/pkg/lib/constants.Version=v${finalAttrs.version}"
];

postInstall = ''
mv $out/bin/kitops $out/bin/kit
'';

# The testing/ integration suite requires network access.
doCheck = false;
Comment on lines +33 to +34

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you can run some tests.

I experiment your code
3068775

and seems to build and test fine on linux
https://github.com/applePrincess/nixpkgs-review-gha/actions/runs/28413169208/job/84217078186

Though, I use (strongly discouraged for standard go packgae) checkPhase instead of checkFlags.


doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "version";

# kit's root command resolves a config home directory via $KITOPS_HOME
# (falling back to XDG-style paths); without it the version subcommand
# exits before printing its version, so point it at TMPDIR for the check.
# versionCheckHook wipes the environment unless the var is listed here.
versionCheckKeepEnvironment = [ "KITOPS_HOME" ];
preVersionCheck = ''
export KITOPS_HOME="$TMPDIR"
'';

meta = {
description = "Open source DevOps tool for packaging and versioning AI/ML models, datasets, code, and configuration into an OCI Artifact";
homepage = "https://github.com/kitops-ml/kitops";
changelog = "https://github.com/kitops-ml/kitops/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ gbhu753 ];
mainProgram = "kit";
};
})
Loading