init vanta-agent

https://github.com/NixOS/nixpkgs/pull/335132
This commit is contained in:
Motiejus Jakštys 2024-08-20 16:21:17 +03:00
parent afcbae529e
commit 50f2f3839a
2 changed files with 51 additions and 1 deletions

View File

@ -97,8 +97,9 @@
compressDrv = super.callPackage ./pkgs/compress-drv { };
compressDrvWeb = super.callPackage ./pkgs/compress-drv/web.nix { };
tmuxbash = super.callPackage ./pkgs/tmuxbash.nix { };
nicer = super.callPackage ./pkgs/nicer.nix { };
tmuxbash = super.callPackage ./pkgs/tmuxbash.nix { };
vanta-agent = super.callPackage ./pkgs/vanta-agent.nix { };
pkgs-unstable = import nixpkgs-unstable {
inherit (super) system;
@ -375,6 +376,10 @@
};
formatter = pkgs.nixfmt-rfc-style;
packages = {
inherit (pkgs) vanta-agent nicer tmuxbash;
};
}
);
}

45
pkgs/vanta-agent.nix Normal file
View File

@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchurl,
dpkg,
}:
let
version = "2.9.0";
in
stdenv.mkDerivation {
pname = "vanta-agent";
inherit version;
src = fetchurl {
url = "https://vanta-agent-repo.s3.amazonaws.com/targets/versions/${version}/vanta-amd64.deb";
hash = "sha256-oTiILQNXcO3rPmXdLhueQw+h2psqMUcw+UmXaU70UYs=";
};
nativeBuildInputs = [ dpkg ];
unpackPhase = ''
runHook preUnpack
dpkg-deb -x $src .
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r usr $out/
cp -r var $out/
runHook postInstall
'';
meta = {
description = "Vanta Agent";
homepage = "https://vanta.com";
maintainers = with lib.maintainers; [ matdibu ];
platforms = [ "x86_64-linux" ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
}