chore(3p/rustsec-advisory-db): track using niv

This will make sure that the db is updated regularly (on every channel
bump). This is fine, because an advisory no longer implies a build
failure.

Change-Id: I1dc0b335e0881b5c58015da63c3c47f1ab1e645f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4554
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
sterni 2021-12-24 12:24:04 +01:00
parent 6c4e447587
commit e855d140bd
3 changed files with 20 additions and 27 deletions

View file

@ -1,27 +1,19 @@
# RustSec's advisory db for crates
#
# Update using:
#
# nix-prefetch-git --quiet --url https://github.com/RustSec/advisory-db.git > third_party/rustsec-advisory-db/pin.json
#
# TODO(Profpatsch): automatically update in regular intervals
{ pkgs, ... }:
{ pkgs, depot, ... }:
let
pin = builtins.fromJSON (builtins.readFile ./pin.json);
date = builtins.head (builtins.split "T" pin.date);
inherit (depot.third_party.sources) rustsec-advisory-db;
in
pkgs.fetchFromGitHub {
name = "advisory-db-${date}";
owner = "RustSec";
repo = "advisory-db";
inherit (pin)
rev
inherit (rustsec-advisory-db)
owner
repo
sha256
rev
;
passthru = {
inherit (pin) rev;
inherit (rustsec-advisory-db) rev;
};
}