refactor(nix/*): drop yants and consumers, and some more
Change-Id: I96ab5890518c7bb0d4a676adbad20e4c49699b63
This commit is contained in:
parent
001556aa30
commit
cff6575948
33 changed files with 11 additions and 2414 deletions
|
|
@ -1,15 +0,0 @@
|
|||
{ depot, pkgs, ... }:
|
||||
|
||||
let
|
||||
bins = depot.nix.getBins pkgs.coreutils [ "printf" ];
|
||||
|
||||
# printf(1), but redirect to stderr
|
||||
in
|
||||
depot.nix.writeExecline "eprintf" { } [
|
||||
"fdmove"
|
||||
"-c"
|
||||
"1"
|
||||
"2"
|
||||
bins.printf
|
||||
"$@"
|
||||
]
|
||||
|
|
@ -1,14 +1,6 @@
|
|||
{ depot, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
|
||||
bins =
|
||||
depot.nix.getBins pkgs.cargo-audit [ "cargo-audit" ]
|
||||
// depot.nix.getBins pkgs.jq [ "jq" ]
|
||||
// depot.nix.getBins pkgs.findutils [ "find" ]
|
||||
// depot.nix.getBins pkgs.gnused [ "sed" ]
|
||||
;
|
||||
|
||||
our-crates = lib.filter (v: v ? outPath)
|
||||
(builtins.attrValues depot.third_party.rust-crates);
|
||||
|
||||
|
|
@ -36,10 +28,10 @@ let
|
|||
exit 100
|
||||
fi
|
||||
|
||||
"${bins.cargo-audit}" audit --json --no-fetch \
|
||||
${pkgs.cargo-audit}/bin/cargo-audit audit --json --no-fetch \
|
||||
--db "${depot.third_party.rustsec-advisory-db}" \
|
||||
--file "$2" \
|
||||
| "${bins.jq}" --raw-output --join-output \
|
||||
| ${pkgs.jq}/bin/jq --raw-output --join-output \
|
||||
--from-file "${./format-audit-result.jq}" \
|
||||
--arg maintainers "''${4:-}" \
|
||||
--argjson checklist "''${3:-false}" \
|
||||
|
|
@ -56,9 +48,9 @@ let
|
|||
|
||||
# Find prints the found lockfiles as <DEPOT ROOT>\t<LOCKFILE DIR>\t<LOCKFILE PATH>\0
|
||||
while IFS=$'\t' read -r -d $'\0' entryPoint dir lockFile; do
|
||||
label="$(printf '%s' "$dir" | "${bins.sed}" "s|^$entryPoint|/|")"
|
||||
label="$(printf '%s' "$dir" | ${pkgs.gnused}/bin/sed "s|^$entryPoint|/|")"
|
||||
"${lock-file-report}" "$label" "$lockFile" || status=1
|
||||
done < <("${bins.find}" "$root" -type f -name Cargo.lock -printf '%H\t%h\t%p\0' )
|
||||
done < <(${pkgs.findutils}/bin/find "$root" -type f -name Cargo.lock -printf '%H\t%h\t%p\0' )
|
||||
|
||||
exit $status
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue