···
1
-
{ stdenv, coreutils, fetchurl, patchelf, gcc }:
1
+
{ stdenv, fetchurl, patchelf, fontconfig, freetype
2
+
, gcc, glib, libICE, libSM, libX11, libXext, libXrender }:
arch = if stdenv.system == "x86_64-linux" then "x86_64"
···
17
+
libPackages = [ fontconfig freetype gcc.cc glib libICE libSM libX11 libXext
19
+
libPaths = stdenv.lib.concatStringsSep ":"
20
+
(map (path: "${path}/lib") libPackages);
18
-
name = "copy-com-1.47.0410";
24
+
name = "copy-com-3.2.01.0481";
# Note: copy.com doesn't version this file. Annoying.
url = "https://copy.com/install/linux/Copy.tgz";
23
-
sha256 = "a48c69f6798f888617cfeef5359829e619057ae0e6edf3940b4ea6c81131012a";
29
+
sha256 = "0bpphm71mqpaiygs57kwa23nli0qm64fvgl1qh7fkxyqqabh4g7k";
26
-
buildInputs = [ coreutils patchelf ];
32
+
nativeBuildInputs = [ patchelf ];
phases = "unpackPhase installPhase";
cp -r ${arch} "$out/${appdir}"
33
-
ensureDir "$out/bin"
34
-
ln -s "$out/${appdir}/CopyConsole" "$out/bin/copy_console"
35
-
ln -s "$out/${appdir}/CopyAgent" "$out/bin/copy_agent"
36
-
ln -s "$out/${appdir}/CopyCmd" "$out/bin/copy_cmd"
37
-
patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \
38
-
"$out/${appdir}/CopyConsole"
40
-
RPATH=${gcc.cc}/lib:$out/${appdir}
41
-
echo "updating rpaths to: $RPATH"
42
-
find "$out/${appdir}" -type f -a -perm +0100 \
43
-
-print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \;
41
+
for binary in Copy{Agent,Console,Cmd}; do
42
+
binary="$out/${appdir}/$binary"
43
+
ln -sv "$binary" "$out/bin"
44
+
patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} "$binary"
47
+
# Older versions of this package happily installed broken copies of
48
+
# anything other than CopyConsole - which was then also mangled to
49
+
# copy_console for some reason. Keep backwards compatibility (only
50
+
# for CopyConsole) for now; the NixOS service is already fixed.
51
+
ln -sv "$out/bin"/{CopyConsole,copy_console}
53
+
RPATH=${libPaths}:$out/${appdir}
54
+
echo "Updating rpaths to $RPATH in:"
55
+
find "$out/${appdir}" -type f -a -perm +0100 \
56
+
-print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \;
homepage = http://copy.com;
51
-
description = "Copy.com Client";
61
+
description = "Copy.com graphical & command-line clients";
# Closed Source unfortunately.
license = stdenv.lib.licenses.unfree;
54
-
maintainers = with stdenv.lib.maintainers; [ nathan-gs ];
64
+
maintainers = with stdenv.lib.maintainers; [ nathan-gs nckx ];
# NOTE: Copy.com itself only works on linux, so this is ok.
platforms = stdenv.lib.platforms.linux;