aboutsummaryrefslogtreecommitdiff
path: root/pkgs/top-level/unix-tools.nix
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-07-08 19:23:10 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2018-07-09 12:00:32 -0400
commitf1a14f98446c0d65152542eb1196c4112cce843a (patch)
treed77d01b286bef4c86529c73a3438436c66b8ca73 /pkgs/top-level/unix-tools.nix
parent7e4ce2cfcbb217bb66e068803b549a4d1fa98673 (diff)
unixtools: link instead of copying
This is better for disk space.
Diffstat (limited to 'pkgs/top-level/unix-tools.nix')
-rw-r--r--pkgs/top-level/unix-tools.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/top-level/unix-tools.nix b/pkgs/top-level/unix-tools.nix
index 3f8fdf7d8883..52c3de3166ff 100644
--- a/pkgs/top-level/unix-tools.nix
+++ b/pkgs/top-level/unix-tools.nix
@@ -22,16 +22,19 @@ let
in runCommand "${cmd}-${version}" {
meta.platforms = map (n: { kernel.name = n; }) (attrNames providers);
passthru = { inherit provider; };
+ preferLocalBuild = true;
} ''
- if ! [ -x "${bin}" ]; then
- echo "Cannot find command ${cmd}"
+ if ! [ -x ${bin} ]; then
+ echo Cannot find command ${cmd}
exit 1
fi
- install -D "${bin}" "$out/bin/${cmd}"
+ mkdir -p $out/bin
+ ln -s ${bin} $out/bin/${cmd}
- if [ -f "${manpage}" ]; then
- install -D "${manpage}" $out/share/man/man1/${cmd}.1.gz
+ if [ -f ${manpage} ]; then
+ mkdir -p $out/share/man/man1
+ ln -s ${manpage} $out/share/man/man1/${cmd}.1.gz
fi
'';