diff options
author | Vladimír Čunát <v@cunat.cz> | 2023-09-12 19:06:44 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2023-09-12 19:06:44 +0200 |
commit | 300eaad172fef6365ffd06d3816c2e6377c46311 (patch) | |
tree | b877cef4af6268503496fe59cc0f72a36da32b9f /pkgs/applications/virtualization/docker/sbom.nix | |
parent | bc6f47f644cc42eed1fab8d0e16bb4ce32833f52 (diff) | |
parent | b874fb56d0f07a0ff88fcdc17e0001760ca89556 (diff) | |
download | nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar.gz nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar.bz2 nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar.lz nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar.xz nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar.zst nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.zip |
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/applications/virtualization/docker/sbom.nix')
-rw-r--r-- | pkgs/applications/virtualization/docker/sbom.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/applications/virtualization/docker/sbom.nix b/pkgs/applications/virtualization/docker/sbom.nix new file mode 100644 index 000000000000..7314eb2029fd --- /dev/null +++ b/pkgs/applications/virtualization/docker/sbom.nix @@ -0,0 +1,43 @@ +{ buildGoModule +, fetchFromGitHub +, docker +, lib +}: + +buildGoModule rec { + pname = "docker-sbom"; + version = "0.6.1"; + + src = fetchFromGitHub { + owner = "docker"; + repo = "sbom-cli-plugin"; + rev = "tags/v${version}"; + hash = "sha256-i3gIogHb0oW/VDuZUo6LGBmvqs/XfMXjpvTTYeGCK7Q="; + }; + + patches = [ + # Disable tests that require a docker daemon to be running + # in the sandbox + ./sbom-disable-tests.patch + ]; + + vendorHash = "sha256-XPPVAdY2NaasZ9bkf24VWWk3X5pjnryvsErYIWkeekc="; + + nativeBuildInputs = [ docker ]; + + installPhase = '' + runHook preInstall + install -D $GOPATH/bin/sbom-cli-plugin $out/libexec/docker/cli-plugins/docker-sbom + + mkdir -p $out/bin + ln -s $out/libexec/docker/cli-plugins/docker-sbom $out/bin/docker-sbom + runHook postInstall + ''; + + meta = with lib; { + description = "Plugin for Docker CLI to support SBOM creation using Syft"; + homepage = "https://github.com/docker/sbom-cli-plugin"; + license = licenses.asl20; + maintainers = with maintainers; [ raboof ]; + }; +} |