Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubexporter: init at 0.6.2; maintainers: add bakito #384179

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bakito
Copy link

@bakito bakito commented Feb 22, 2025

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@Tert0
Copy link
Member

Tert0 commented Feb 22, 2025

Some suggestions:

diff --git a/pkgs/by-name/ku/kubexporter/package.nix b/pkgs/by-name/ku/kubexporter/package.nix
index c41fd976847a..efd749a93b44 100644
--- a/pkgs/by-name/ku/kubexporter/package.nix
+++ b/pkgs/by-name/ku/kubexporter/package.nix
@@ -2,6 +2,8 @@
   lib,
   buildGoModule,
   fetchFromGitHub,
+  versionCheckHook,
+  nix-update-script,
 }:
 
 buildGoModule rec {
@@ -12,7 +14,7 @@ buildGoModule rec {
   src = fetchFromGitHub {
     owner = "bakito";
     repo = "kubexporter";
-    rev = "v${version}";
+    tag = "v${version}";
     hash = "sha256-u7IiDXr9tF4gTlKrKOY21Y4E2aVA0oC0XhZYKM8Z1QE=";
   };
 
@@ -24,11 +26,18 @@ buildGoModule rec {
     "-X github.com/bakito/kubexporter/version.Version=${version}"
   ];
 
-  meta = with lib; {
-    description = "KubExporter allows you to export resources from kubernetes as yaml/json files.";
+  nativeInstallCheckInputs = [ versionCheckHook ];
+  versionCheckProgramArg = "--version";
+  doInstallCheck = true;
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = {
+    description = "Tool for exporting Kubernetes resources as YAML or JSON files";
     homepage = "https://github.com/bakito/kubexporter";
-    license = licenses.asl20;
-    maintainers = with maintainers; [ bakito ];
+    changelog = "https://github.com/bakito/kubexporter/releases/tag/v${version}";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ bakito ];
     mainProgram = "kubexporter";
   };
 }

Please also make a separate commit for adding yourself into the maintainers list.

@github-actions github-actions bot removed the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Feb 22, 2025
@bakito
Copy link
Author

bakito commented Feb 22, 2025

Some suggestions:

diff --git a/pkgs/by-name/ku/kubexporter/package.nix b/pkgs/by-name/ku/kubexporter/package.nix
index c41fd976847a..efd749a93b44 100644
--- a/pkgs/by-name/ku/kubexporter/package.nix
+++ b/pkgs/by-name/ku/kubexporter/package.nix
@@ -2,6 +2,8 @@
   lib,
   buildGoModule,
   fetchFromGitHub,
+  versionCheckHook,
+  nix-update-script,
 }:
 
 buildGoModule rec {
@@ -12,7 +14,7 @@ buildGoModule rec {
   src = fetchFromGitHub {
     owner = "bakito";
     repo = "kubexporter";
-    rev = "v${version}";
+    tag = "v${version}";
     hash = "sha256-u7IiDXr9tF4gTlKrKOY21Y4E2aVA0oC0XhZYKM8Z1QE=";
   };
 
@@ -24,11 +26,18 @@ buildGoModule rec {
     "-X github.com/bakito/kubexporter/version.Version=${version}"
   ];
 
-  meta = with lib; {
-    description = "KubExporter allows you to export resources from kubernetes as yaml/json files.";
+  nativeInstallCheckInputs = [ versionCheckHook ];
+  versionCheckProgramArg = "--version";
+  doInstallCheck = true;
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = {
+    description = "Tool for exporting Kubernetes resources as YAML or JSON files";
     homepage = "https://github.com/bakito/kubexporter";
-    license = licenses.asl20;
-    maintainers = with maintainers; [ bakito ];
+    changelog = "https://github.com/bakito/kubexporter/releases/tag/v${version}";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ bakito ];
     mainProgram = "kubexporter";
   };
 }

Please also make a separate commit for adding yourself into the maintainers list.

@Tert0 changed applied, separate PR for maintainer is here: #384177
Would a separate commit in this PR be enough?

@Tert0
Copy link
Member

Tert0 commented Feb 22, 2025

@Tert0 changed applied, separate PR for maintainer is here: #384177

A separate PR is not necessary. The commit can be part of this PR.

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Feb 22, 2025
@bakito
Copy link
Author

bakito commented Feb 22, 2025

@Tert0 changed applied, separate PR for maintainer is here: #384177

A separate PR is not necessary. The commit can be part of this PR.

done

Copy link
Member

@Tert0 Tert0 left a comment

Choose a reason for hiding this comment

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

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 384179


x86_64-linux

✅ 1 package built:
  • kubexporter

@Tert0 Tert0 added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Feb 22, 2025
@bakito
Copy link
Author

bakito commented Feb 23, 2025

@Tert0 sive this is my first pull request in this repo, what needs to be don to get it metged?
Do I have to wait for the missing actions to finish?

@bakito bakito changed the title kubexporter: init at 0.6.2 kubexporter: init at 0.6.2; maintainers: add bakito Feb 23, 2025
@Tert0
Copy link
Member

Tert0 commented Feb 23, 2025

@Tert0 sive this is my first pull request in this repo, what needs to be don to get it metged? Do I have to wait for the missing actions to finish?

I think the missing actions are stuck and not really important to get this merged. After a week, you can post this PR into the review-requests matrix room or the discourse thread to get the attention of someone with commit access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants