copy-com: 1.47.0410 -> 3.2.01.0481 + several fixes

The graphical UI (the largest part of this package) never worked; fixed.

Added myself as a maintainer.

+80 -70
+53 -53
nixos/modules/services/networking/copy-com.nix
··· 1 - { config, lib, pkgs, ... }: 2 - 3 - with lib; 4 - 5 - let 6 - 7 - cfg = config.services.copy-com; 8 - 9 - in 10 - 11 - { 12 - options = { 13 - 14 - services.copy-com = { 15 - 16 - enable = mkOption { 17 - default = false; 18 - description = " 19 - Enable the copy.com client. 20 - 21 - The first time copy.com is run, it needs to be configured. Before enabling run 22 - copy_console manually. 23 - "; 24 - }; 25 - 26 - user = mkOption { 27 - description = "The user for which copy should run."; 28 - }; 29 - 30 - debug = mkOption { 31 - default = false; 32 - description = "Output more."; 33 - }; 34 - }; 35 - }; 36 - 37 - config = mkIf cfg.enable { 38 - environment.systemPackages = [ pkgs.postfix ]; 39 - 40 - systemd.services."copy-com-${cfg.user}" = { 41 - description = "Copy.com Client"; 42 - after = [ "network.target" "local-fs.target" ]; 43 - wantedBy = [ "multi-user.target" ]; 44 - serviceConfig = { 45 - ExecStart = "${pkgs.copy-com}/bin/copy_console ${if cfg.debug then "-consoleOutput -debugToConsole=dirwatch,path-watch,csm_path,csm -debug -console" else ""}"; 46 - User = "${cfg.user}"; 47 - }; 48 - 49 - }; 50 - }; 51 - 52 - } 53 - 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let 6 + 7 + cfg = config.services.copy-com; 8 + 9 + in 10 + 11 + { 12 + options = { 13 + 14 + services.copy-com = { 15 + 16 + enable = mkOption { 17 + default = false; 18 + description = " 19 + Enable the Copy.com client. 20 + NOTE: before enabling the client for the first time, it must be 21 + configured by first running CopyConsole (command line) or CopyAgent 22 + (graphical) as the appropriate user. 23 + "; 24 + }; 25 + 26 + user = mkOption { 27 + description = "The user for which the Copy.com client should be run."; 28 + }; 29 + 30 + debug = mkOption { 31 + default = false; 32 + description = "Output more (debugging) messages to the console."; 33 + }; 34 + }; 35 + }; 36 + 37 + config = mkIf cfg.enable { 38 + environment.systemPackages = [ pkgs.postfix ]; 39 + 40 + systemd.services."copy-com-${cfg.user}" = { 41 + description = "Copy.com client"; 42 + after = [ "network.target" "local-fs.target" ]; 43 + wantedBy = [ "multi-user.target" ]; 44 + serviceConfig = { 45 + ExecStart = "${pkgs.copy-com}/bin/CopyConsole ${if cfg.debug then "-consoleOutput -debugToConsole=dirwatch,path-watch,csm_path,csm -debug -console" else ""}"; 46 + User = "${cfg.user}"; 47 + }; 48 + 49 + }; 50 + }; 51 + 52 + } 53 +
+27 -17
pkgs/applications/networking/copy-com/default.nix
··· 1 - { stdenv, coreutils, fetchurl, patchelf, gcc }: 1 + { stdenv, fetchurl, patchelf, fontconfig, freetype 2 + , gcc, glib, libICE, libSM, libX11, libXext, libXrender }: 2 3 3 4 let 4 5 arch = if stdenv.system == "x86_64-linux" then "x86_64" ··· 13 14 14 15 appdir = "opt/copy"; 15 16 17 + libPackages = [ fontconfig freetype gcc.cc glib libICE libSM libX11 libXext 18 + libXrender ]; 19 + libPaths = stdenv.lib.concatStringsSep ":" 20 + (map (path: "${path}/lib") libPackages); 21 + 16 22 in stdenv.mkDerivation { 17 23 18 - name = "copy-com-1.47.0410"; 24 + name = "copy-com-3.2.01.0481"; 19 25 20 26 src = fetchurl { 21 27 # Note: copy.com doesn't version this file. Annoying. 22 28 url = "https://copy.com/install/linux/Copy.tgz"; 23 - sha256 = "a48c69f6798f888617cfeef5359829e619057ae0e6edf3940b4ea6c81131012a"; 29 + sha256 = "0bpphm71mqpaiygs57kwa23nli0qm64fvgl1qh7fkxyqqabh4g7k"; 24 30 }; 25 31 26 - buildInputs = [ coreutils patchelf ]; 32 + nativeBuildInputs = [ patchelf ]; 27 33 28 34 phases = "unpackPhase installPhase"; 29 35 30 36 installPhase = '' 31 37 mkdir -p $out/opt 32 38 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" 39 39 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" {} \; 40 + mkdir -p "$out/bin" 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" 45 + done 44 46 45 - 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} 46 52 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" {} \; 47 57 ''; 48 58 49 59 meta = { 50 60 homepage = http://copy.com; 51 - description = "Copy.com Client"; 61 + description = "Copy.com graphical & command-line clients"; 52 62 # Closed Source unfortunately. 53 63 license = stdenv.lib.licenses.unfree; 54 - maintainers = with stdenv.lib.maintainers; [ nathan-gs ]; 64 + maintainers = with stdenv.lib.maintainers; [ nathan-gs nckx ]; 55 65 # NOTE: Copy.com itself only works on linux, so this is ok. 56 66 platforms = stdenv.lib.platforms.linux; 57 67 };