mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
diffoscope: Add script to list required tools
This commit is contained in:
parent
9041eff01e
commit
6326053490
20
pkgs/tools/misc/diffoscope/list-tools.sh
Executable file
20
pkgs/tools/misc/diffoscope/list-tools.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
diffoscope=$(nix-build --no-out-link -E 'with import ./. {}; diffoscope.override { enableBloat = true; }')/bin/diffoscope
|
||||
|
||||
required=$($diffoscope --list-tools | \
|
||||
grep '^External-Tools-Required:' | \
|
||||
cut -d ' ' -f2- | \
|
||||
tr -d ,)
|
||||
|
||||
# Uber-hacky!
|
||||
pathScript=$(cat $diffoscope | grep PATH)
|
||||
|
||||
export PATH=$(nix-build --no-out-link -A which)/bin
|
||||
eval "$pathScript"
|
||||
|
||||
for tool in $required; do
|
||||
if ! which $tool >/dev/null 2>&1; then
|
||||
echo $tool
|
||||
fi
|
||||
done | sort
|
Loading…
Reference in New Issue
Block a user