about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/dg/dgoss/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/dg/dgoss/package.nix')
-rw-r--r--nixpkgs/pkgs/by-name/dg/dgoss/package.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/dg/dgoss/package.nix b/nixpkgs/pkgs/by-name/dg/dgoss/package.nix
new file mode 100644
index 000000000000..cf396e70829e
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/dg/dgoss/package.nix
@@ -0,0 +1,49 @@
+{ lib
+, fetchFromGitHub
+, resholve
+, bash
+, coreutils
+, goss
+, which
+}:
+
+resholve.mkDerivation rec {
+  pname = "dgoss";
+  version = "0.4.6";
+
+  src = fetchFromGitHub {
+    owner = "goss-org";
+    repo = "goss";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-4LJD70Y6nxRWdcaPe074iP2MVUMDgoTOwWbC1JecVcI=";
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    sed -i '2i GOSS_PATH=${goss}/bin/goss' extras/dgoss/dgoss
+    install -D extras/dgoss/dgoss $out/bin/dgoss
+  '';
+
+  solutions = {
+    default = {
+      scripts = [ "bin/dgoss" ];
+      interpreter = "${bash}/bin/bash";
+      inputs = [ coreutils which ];
+      keep = {
+        "$CONTAINER_RUNTIME" = true;
+      };
+    };
+  };
+
+  meta = with lib; {
+    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;
+    maintainers = with maintainers; [ hyzual anthonyroussel ];
+    mainProgram = "dgoss";
+  };
+}