unix-tools.nix: install binary instead of linking

This gives us a little smaller closure & was the original intent with unix-tools.nix. Some merge must have gotten rid of it.
This commit is contained in:
Matthew Justin Bauer 2018-06-11 14:49:50 -04:00 committed by GitHub
parent 694684ff80
commit 4ca4c886e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,14 +19,12 @@ let
in runCommand "${cmd}-${version}" {
meta.platforms = map (n: { kernel.name = n; }) (pkgs.lib.attrNames providers);
} ''
mkdir -p $out/bin
if ! [ -x "${provider}" ]; then
echo "Cannot find command ${cmd}"
exit 1
fi
ln -s "${provider}" "$out/bin/${cmd}"
install -D "${provider}" "$out/bin/${cmd}"
'';
# more is unavailable in darwin