about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/goss/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/goss/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/goss/default.nix41
1 files changed, 32 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/tools/misc/goss/default.nix b/nixpkgs/pkgs/tools/misc/goss/default.nix
index 79d3cf377d73..ef3d60aa0756 100644
--- a/nixpkgs/pkgs/tools/misc/goss/default.nix
+++ b/nixpkgs/pkgs/tools/misc/goss/default.nix
@@ -1,26 +1,49 @@
-{ lib, fetchFromGitHub, buildGoModule }:
+{ buildGoModule
+, fetchFromGitHub
+, goss
+, nix-update-script
+, lib
+, testers
+}:
 
 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"
+  ];
+
+  passthru = {
+    tests.version = testers.testVersion {
+      command = "goss --version";
+      package = goss;
+      version = "v${version}";
+    };
+    updateScript = nix-update-script { };
+  };
+
   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.
@@ -29,6 +52,6 @@ buildGoModule rec {
     '';
     license = licenses.asl20;
     platforms = platforms.linux;
-    maintainers = with maintainers; [ hyzual jk ];
+    maintainers = with maintainers; [ hyzual jk anthonyroussel ];
   };
 }