Skip to content

Commit

Permalink
diffoscope: Add script to list required tools
Browse files Browse the repository at this point in the history
  • Loading branch information
dezgeg committed Mar 3, 2018
1 parent 9041eff commit 6326053
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pkgs/tools/misc/diffoscope/list-tools.sh
@@ -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

0 comments on commit 6326053

Please sign in to comment.