mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
unixtools: link instead of copying
This is better for disk space.
This commit is contained in:
parent
7e4ce2cfcb
commit
f1a14f9844
@ -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
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user