tvl-depot/third_party/rustsec-advisory-db/default.nix
sterni e2238d6315 fix(3p/rustsec-advisory-db): expose rev for nixpkgs-crate-holes
Not sure if this used to work or if I started using the rev attribute in
nixpkgs-crate-holes without actually testing it. The failure in any case
is hidden from CI as it occurs at runtime, being hidden behind a
function.

Change-Id: Ib1db5393554a699c7c4b18697a9c9c902e93a507
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5199
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
2022-02-03 23:40:16 +00:00

27 lines
563 B
Nix

# 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, ... }:
let
pin = builtins.fromJSON (builtins.readFile ./pin.json);
date = builtins.head (builtins.split "T" pin.date);
in
pkgs.fetchFromGitHub {
name = "advisory-db-${date}";
owner = "RustSec";
repo = "advisory-db";
inherit (pin)
rev
sha256
;
passthru = {
inherit (pin) rev;
};
}