From f5de44f0ea808bd71c9ccf37a4bd9dc04ef61443 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Mon, 4 Sep 2023 12:27:46 +0200 Subject: [PATCH 1/5] goss: 0.3.18 -> 0.4.1 https://github.com/goss-org/goss/releases/tag/v0.4.1 https://github.com/goss-org/goss/compare/v0.3.18...v0.4.1 --- pkgs/tools/misc/goss/default.nix | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/misc/goss/default.nix b/pkgs/tools/misc/goss/default.nix index 79d3cf377d73..cfb8833d8a47 100644 --- a/pkgs/tools/misc/goss/default.nix +++ b/pkgs/tools/misc/goss/default.nix @@ -2,25 +2,33 @@ buildGoModule rec { pname = "goss"; - version = "0.3.18"; + + # Don't forget to update dgoss to the same version. + version = "0.4.1"; src = fetchFromGitHub { - owner = "aelsabbahy"; + owner = "goss-org"; repo = pname; - rev = "v${version}"; - sha256 = "01ssc7rnnwpyhjv96qy8drsskghbfpyxpsahk8s62lh8pxygynhv"; + rev = "refs/tags/v${version}"; + hash = "sha256-dpMTUBMEG5tDi7E6ZRg1KHqIj5qDlvwfwJEgq/5z7RE="; }; - vendorSha256 = "sha256-zlQMVn4w6syYmntxpeiIc1UTbFrIJzOMg0RVDCICTM8="; + vendorHash = "sha256-n+k7f9e2iqf4KrcDkzX0CWk+Bq2WE3dyUEid4PTP1FA="; CGO_ENABLED = 0; ldflags = [ "-s" "-w" "-X main.version=v${version}" ]; + checkFlags = [ + # Prometheus tests are skipped upstream + # See https://github.com/goss-org/goss/blob/master/ci/go-test.sh + "-skip" "^TestPrometheus" + ]; + meta = with lib; { - homepage = "https://github.com/aelsabbahy/goss/"; - changelog = "https://github.com/aelsabbahy/goss/releases/tag/v${version}"; + homepage = "https://github.com/goss-org/goss/"; + changelog = "https://github.com/goss-org/goss/releases/tag/v${version}"; description = "Quick and easy server validation"; longDescription = '' Goss is a YAML based serverspec alternative tool for validating a server’s configuration. From 27b998f564f6effc43b2950bcc3d51a0391d5b2c Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Mon, 4 Sep 2023 12:28:46 +0200 Subject: [PATCH 2/5] goss: add anthonyroussel to maintainers --- pkgs/tools/misc/goss/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/misc/goss/default.nix b/pkgs/tools/misc/goss/default.nix index cfb8833d8a47..09c0e4d36937 100644 --- a/pkgs/tools/misc/goss/default.nix +++ b/pkgs/tools/misc/goss/default.nix @@ -37,6 +37,6 @@ buildGoModule rec { ''; license = licenses.asl20; platforms = platforms.linux; - maintainers = with maintainers; [ hyzual jk ]; + maintainers = with maintainers; [ hyzual jk anthonyroussel ]; }; } From 81dad28a547481d707b3a2bad27cfdbf17d5a8c2 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Mon, 4 Sep 2023 12:32:09 +0200 Subject: [PATCH 3/5] goss: add passthru.updateScript, tests.version --- pkgs/tools/misc/goss/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/goss/default.nix b/pkgs/tools/misc/goss/default.nix index 09c0e4d36937..ef3d60aa0756 100644 --- a/pkgs/tools/misc/goss/default.nix +++ b/pkgs/tools/misc/goss/default.nix @@ -1,4 +1,10 @@ -{ lib, fetchFromGitHub, buildGoModule }: +{ buildGoModule +, fetchFromGitHub +, goss +, nix-update-script +, lib +, testers +}: buildGoModule rec { pname = "goss"; @@ -26,6 +32,15 @@ buildGoModule rec { "-skip" "^TestPrometheus" ]; + passthru = { + tests.version = testers.testVersion { + command = "goss --version"; + package = goss; + version = "v${version}"; + }; + updateScript = nix-update-script { }; + }; + meta = with lib; { homepage = "https://github.com/goss-org/goss/"; changelog = "https://github.com/goss-org/goss/releases/tag/v${version}"; From 291fcd94b8b43e075cf59d133d0233c1ed461d8b Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Mon, 4 Sep 2023 12:44:08 +0200 Subject: [PATCH 4/5] dgoss: 0.3.18 -> 0.4.1 --- pkgs/tools/misc/dgoss/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/misc/dgoss/default.nix b/pkgs/tools/misc/dgoss/default.nix index 66474c88f5e7..3612d363e8de 100644 --- a/pkgs/tools/misc/dgoss/default.nix +++ b/pkgs/tools/misc/dgoss/default.nix @@ -9,13 +9,13 @@ resholve.mkDerivation rec { pname = "dgoss"; - version = "0.3.18"; + version = "0.4.1"; src = fetchFromGitHub { - owner = "aelsabbahy"; + owner = "goss-org"; repo = "goss"; - rev = "v${version}"; - sha256 = "01ssc7rnnwpyhjv96qy8drsskghbfpyxpsahk8s62lh8pxygynhv"; + rev = "refs/tags/v${version}"; + hash = "sha256-dpMTUBMEG5tDi7E6ZRg1KHqIj5qDlvwfwJEgq/5z7RE="; }; dontConfigure = true; @@ -38,7 +38,8 @@ resholve.mkDerivation rec { }; meta = with lib; { - homepage = "https://github.com/aelsabbahy/goss/blob/v${version}/extras/dgoss/README.md"; + homepage = "https://github.com/goss-org/goss/blob/v${version}/extras/dgoss/README.md"; + changelog = "https://github.com/goss-org/goss/releases/tag/v${version}"; description = "Convenience wrapper around goss that aims to bring the simplicity of goss to docker containers"; license = licenses.asl20; platforms = platforms.linux; From 65f9a7b416427d3c52ed68cc2020dafa76adc108 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Mon, 4 Sep 2023 12:44:51 +0200 Subject: [PATCH 5/5] dgoss: add anthonyroussel to maintainers --- pkgs/tools/misc/dgoss/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/misc/dgoss/default.nix b/pkgs/tools/misc/dgoss/default.nix index 3612d363e8de..3c5c2ff8bbab 100644 --- a/pkgs/tools/misc/dgoss/default.nix +++ b/pkgs/tools/misc/dgoss/default.nix @@ -43,6 +43,6 @@ resholve.mkDerivation rec { description = "Convenience wrapper around goss that aims to bring the simplicity of goss to docker containers"; license = licenses.asl20; platforms = platforms.linux; - maintainers = with maintainers; [ hyzual ]; + maintainers = with maintainers; [ hyzual anthonyroussel ]; }; }