about summary refs log tree commit diff
path: root/pkgs/by-name/in/insync-nautilus/package.nix
blob: 98079f1a2e88bdf6c3036cdf7ff5a0a0534b4cad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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";
  };
})