diff options
author | Antoine Eiche <lewo@abesis.fr> | 2020-11-11 09:56:37 +0100 |
---|---|---|
committer | Antoine Eiche <lewo@abesis.fr> | 2020-11-11 20:27:59 +0100 |
commit | 7d2020cb362aa4c16fad9d1151820a21a26bd5fe (patch) | |
tree | 943cfd7145cd26349540440fb15f3bf15eb32802 /tests/clamav.nix | |
parent | c04260cf5e685fc99ccb669654e147f94e3de8a4 (diff) |
Move clamav database to the blobs repository
This database is huge and can be fetched at build time.
Fixes #197
Diffstat (limited to 'tests/clamav.nix')
-rw-r--r-- | tests/clamav.nix | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/clamav.nix b/tests/clamav.nix index c641622..f62df58 100644 --- a/tests/clamav.nix +++ b/tests/clamav.nix @@ -21,14 +21,10 @@ pkgs.nixosTest { nodes = { server = { config, pkgs, lib, ... }: let - clamav-db-files = pkgs.stdenv.mkDerivation rec { - name = "clamav-db-files"; - src = lib.cleanSource ./clamav; - dontUnpack = true; - installPhase = '' - mkdir $out - cp -R $src/*.cvd $out/ - ''; + sources = import ../nix/sources.nix; + blobs = pkgs.fetchzip { + url = sources.blobs.url; + sha256 = sources.blobs.sha256; }; in { @@ -58,9 +54,9 @@ pkgs.nixosTest { ''; script = '' - cp ${clamav-db-files}/main.cvd /var/lib/clamav/ - cp ${clamav-db-files}/daily.cvd /var/lib/clamav/ - cp ${clamav-db-files}/bytecode.cvd /var/lib/clamav/ + cp ${blobs}/clamav/main.cvd /var/lib/clamav/ + cp ${blobs}/clamav/daily.cvd /var/lib/clamav/ + cp ${blobs}/clamav/bytecode.cvd /var/lib/clamav/ chown clamav:clamav /var/lib/clamav/* ''; |