nixpkgs/pkgs/development/mobile/androidenv/querypackages.sh
2018-12-18 21:16:06 +01:00

28 lines
464 B
Bash

#!/bin/sh -e
if [ "$1" = "" ]
then
echo "Please select a package set: 'packages', 'addons', 'system-images'" >&2
exit 1
fi
if [ "$2" = "" ]
then
echo "Please select a package group:" >&2
( cat <<EOF
builtins.attrNames (import ./generated/$1.nix {
fetchurl = null;
})
EOF
) | nix-instantiate --eval-only -
exit 1
fi
( cat <<EOF
builtins.attrNames (import ./generated/$1.nix {
fetchurl = null;
}).$2
EOF
) | nix-instantiate --eval-only -