dropbox-cli: minor refactoring to play nice with dropbox

We were previously getting collissions for the following
2 files with files from the dropbox package:

 - bin/dropbox
 - share/applications/dropbox.desktop

As a consequence the binary has been renamed to dropbox-cli and
the .desktop removed as it is redundant.
This commit is contained in:
Peter Hoeg 2016-03-20 21:16:49 +08:00
parent e3aa3c6abb
commit afa4a27a25

View File

@ -16,8 +16,7 @@ stdenv.mkDerivation {
phases = "unpackPhase installPhase";
installPhase = ''
mkdir -p "$out/bin/" "$out/share/applications"
cp data/dropbox.desktop "$out/share/applications"
mkdir -p "$out/bin/"
substitute "dropbox.in" "$out/bin/dropbox" \
--replace '@PACKAGE_VERSION@' ${version} \
--replace '@DESKTOP_FILE_DIR@' "$out/share/applications" \
@ -25,6 +24,7 @@ stdenv.mkDerivation {
--replace '@IMAGEDATA64@' '"too-lazy-to-fix"'
sed -i 's:db_path = .*:db_path = "${dropboxd}":' $out/bin/dropbox
chmod +x "$out/bin/"*
mv $out/bin/dropbox $out/bin/dropbox-cli
patchShebangs "$out/bin"
'';