From 1d0d67d4d4ce6b36d0d679560f9583bd6b4cf417 Mon Sep 17 00:00:00 2001 From: hellwolf Date: Sat, 6 Apr 2024 14:07:40 +0300 Subject: [PATCH 1/2] insync: include emblem-icons - insync-emblem-icons is included, which is used by other insync pakcages. --- pkgs/by-name/in/insync/package.nix | 73 +++++++++++++++++------------- 1 file changed, 41 insertions(+), 32 deletions(-) diff --git a/pkgs/by-name/in/insync/package.nix b/pkgs/by-name/in/insync/package.nix index b8206c38ce90..7ec64182f947 100644 --- a/pkgs/by-name/in/insync/package.nix +++ b/pkgs/by-name/in/insync/package.nix @@ -6,7 +6,6 @@ , autoPatchelfHook , dpkg , nss -, cacert , alsa-lib , libvorbis , libdrm @@ -22,36 +21,24 @@ let # Find a binary from https://www.insynchq.com/downloads/linux#ubuntu. version = "3.8.7.50516"; ubuntu-dist = "mantic_amd64"; - meta = with lib; { - platforms = ["x86_64-linux"]; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - license = licenses.unfree; - maintainers = with maintainers; [ hellwolf ]; - homepage = "https://www.insynchq.com"; - description = "Google Drive sync and backup with multiple account support"; - longDescription = '' - Insync is a commercial application that syncs your Drive files to your - computer. It has more advanced features than Google's official client - such as multiple account support, Google Doc conversion, symlink support, - and built in sharing. - - There is a 15-day free trial, and it is a paid application after that. - - Known bug(s): - - 1) Currently the system try icon does not render correctly. - ''; - mainProgram = "insync"; - }; - + insyncDeb = (fetchurl { + urls = [ + "https://cdn.insynchq.com/builds/linux/insync_${version}-${ubuntu-dist}.deb" + "https://web.archive.org/web/20240409080945/https://cdn.insynchq.com/builds/linux/insync_${version}-${ubuntu-dist}.deb" + ]; + hash = "sha256-U7BcgghbdR7r9WiZpEOka+BzXwnxrzL6p4imGESuB/k="; + }); + insyncEmblemIconsDeb = (fetchurl { + urls = [ + "https://cdn.insynchq.com/builds/linux/insync-emblem-icons_${version}_all.deb" + "https://web.archive.org/web/20240409081214/https://cdn.insynchq.com/builds/linux/insync-emblem-icons_${version}_all.deb" + ]; + hash = "sha256-uALaIxETEEkjDTx331uIsb4VswWk2K0dGuDMYH8v5U8="; + }); insync-pkg = stdenvNoCC.mkDerivation { name = "${pname}-pkg-${version}"; - inherit version meta; - src = fetchurl { - url = "https://cdn.insynchq.com/builds/linux/insync_${version}-${ubuntu-dist}.deb"; - sha256 = "sha256-U7BcgghbdR7r9WiZpEOka+BzXwnxrzL6p4imGESuB/k="; - }; + srcs = [ insyncDeb insyncEmblemIconsDeb ]; nativeBuildInputs = [ dpkg @@ -71,7 +58,8 @@ let ]; unpackPhase = '' - dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner + dpkg-deb --fsys-tarfile ${insyncDeb} | tar -x --no-same-permissions --no-same-owner + dpkg-deb --fsys-tarfile ${insyncEmblemIconsDeb} | tar -x --no-same-permissions --no-same-owner ''; installPhase = '' @@ -88,8 +76,7 @@ let }; in buildFHSEnv { - name = pname; - inherit meta; + inherit pname version; targetPkgs = pkgs: with pkgs; [ libudev0-shim @@ -97,7 +84,7 @@ in buildFHSEnv { ]; extraInstallCommands = '' - cp -rsHf "${insync-pkg}"/share $out + cp -rsHf "${insync-pkg}"/share $out/ ''; runScript = writeShellScript "insync-wrapper.sh" '' @@ -119,4 +106,26 @@ in buildFHSEnv { unshareCgroup = false; dieWithParent = true; + + meta = with lib; { + platforms = [ "x86_64-linux" ]; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + license = licenses.unfree; + maintainers = with maintainers; [ hellwolf ]; + homepage = "https://www.insynchq.com"; + description = "Google Drive sync and backup with multiple account support"; + longDescription = '' + Insync is a commercial application that syncs your Drive files to your + computer. It has more advanced features than Google's official client + such as multiple account support, Google Doc conversion, symlink support, + and built in sharing. + + There is a 15-day free trial, and it is a paid application after that. + + Known bug(s): + + 1) Currently the system try icon does not render correctly. + ''; + mainProgram = "insync"; + }; } From 02d5d463dcb3b7f571bd29a75613b5e693d06116 Mon Sep 17 00:00:00 2001 From: hellwolf Date: Fri, 29 Mar 2024 14:23:18 +0200 Subject: [PATCH 2/2] insync-nautilus: init at 3.8.7.50516 --- pkgs/by-name/in/insync-nautilus/package.nix | 48 +++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/in/insync-nautilus/package.nix diff --git a/pkgs/by-name/in/insync-nautilus/package.nix b/pkgs/by-name/in/insync-nautilus/package.nix new file mode 100644 index 000000000000..98079f1a2e88 --- /dev/null +++ b/pkgs/by-name/in/insync-nautilus/package.nix @@ -0,0 +1,48 @@ +{ stdenv, + fetchurl, + lib, + dpkg, + gnome, + insync +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "insync-nautilus"; + version = lib.getVersion insync; + pyproject = true; + + # Download latest from: https://www.insynchq.com/downloads/linux#nautilus + + src = fetchurl { + urls = [ + "https://cdn.insynchq.com/builds/linux/insync-nautilus_${finalAttrs.version}_all.deb" + "https://web.archive.org/web/20240409080611/https://cdn.insynchq.com/builds/linux/insync-nautilus_${finalAttrs.version}_all.deb" + ]; + hash = "sha256-aB1/ZzcQH3T1lviMZO8jXbtdbe4TW20f0TAcv4HDOGI="; + }; + + nativeBuildInputs = [ + dpkg + ]; + + buildInputs = [ + gnome.nautilus-python + insync + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out + cp -R usr/share $out/ + runHook postInstall + ''; + + meta = with lib; { + platforms = [ "x86_64-linux" ]; + sourceProvenance = with lib.sourceTypes; [ fromSource ]; + license = licenses.unfree; + maintainers = with maintainers; [ hellwolf ]; + homepage = "https://www.insynchq.com"; + description = "This package contains the Python extension and icons for integrating Insync with Nautilus"; + }; +})