2021-06-04 09:07:49 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2022-04-15 01:41:22 +00:00
|
|
|
, resholve
|
2021-06-04 09:07:49 +00:00
|
|
|
, bash
|
|
|
|
, coreutils
|
|
|
|
, goss
|
|
|
|
, which
|
|
|
|
}:
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
resholve.mkDerivation rec {
|
2021-06-04 09:07:49 +00:00
|
|
|
pname = "dgoss";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.4.2";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-10-09 19:29:22 +00:00
|
|
|
owner = "goss-org";
|
2021-06-04 09:07:49 +00:00
|
|
|
repo = "goss";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-FDn1OETkYIpMenk8QAAHvfNZcSzqGl5xrD0fAZPVmRM=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
2022-06-16 17:23:12 +00:00
|
|
|
keep = {
|
|
|
|
"$CONTAINER_RUNTIME" = true;
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
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}";
|
2021-06-04 09:07:49 +00:00
|
|
|
description = "Convenience wrapper around goss that aims to bring the simplicity of goss to docker containers";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ hyzual anthonyroussel ];
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
}
|