mirror of
https://github.com/justinwoo/easy-dhall-nix.git
synced 2024-11-22 19:19:42 +01:00
feat(build): check that we copied all binaries
Sometmmes a new binary is added to an output, like in the `dhall-yaml` case, where yaml-to-dhall was added. This uses `lr` because I can’t be bothered to figure out how to use `find` to the same effect.
This commit is contained in:
parent
0104f0fd3e
commit
66da4ffe17
1 changed files with 9 additions and 1 deletions
10
build.nix
10
build.nix
|
@ -24,7 +24,15 @@ pkgs.stdenv.mkDerivation rec {
|
|||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
binPath="$out/bin/${binName}"
|
||||
install -D -m555 -T ${binName} "$binPath"
|
||||
install -D -m555 -T "${binName}" "$binPath"
|
||||
rm "${binName}"
|
||||
|
||||
# check that we didn’t forget any files (maybe a new binary was added)
|
||||
if [ ! -z "$(${pkgs.lr}/bin/lr -1 -t 'depth == 1' .)" ]; then
|
||||
echo "still some files remaining!" >&2
|
||||
${pkgs.lr}/bin/lr .
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$binPath" --bash-completion-script "$binPath" > "${binName}.bash"
|
||||
installShellCompletion --bash "${binName}.bash"
|
||||
|
|
Loading…
Reference in a new issue