about summary refs log tree commit diff
diff options
context:
space:
mode:
authorluftmensch-luftmensch <valentinobocchetti59@gmail.com>2024-06-09 17:58:51 +0200
committerluftmensch-luftmensch <valentinobocchetti59@gmail.com>2024-06-12 11:05:49 +0200
commit49e4a8e26f810427f7053f0e93ae69fbec4263a6 (patch)
tree9619e7c234fd99610952edaf157835f7c83a706f
parentbad3a8fbfedaf196d7450134b1f0e4699e83439a (diff)
syncthing-tray: migrate to buildGoModule
-rw-r--r--pkgs/applications/misc/syncthing-tray/default.nix28
-rw-r--r--pkgs/applications/misc/syncthing-tray/deps.nix93
-rw-r--r--pkgs/by-name/sy/syncthing-tray/package.nix44
-rw-r--r--pkgs/top-level/all-packages.nix2
4 files changed, 44 insertions, 123 deletions
diff --git a/pkgs/applications/misc/syncthing-tray/default.nix b/pkgs/applications/misc/syncthing-tray/default.nix
deleted file mode 100644
index e9db92df121c4..0000000000000
--- a/pkgs/applications/misc/syncthing-tray/default.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ lib, fetchFromGitHub, buildGoPackage, pkg-config, libappindicator-gtk3 }:
-
-buildGoPackage rec {
-  pname = "syncthing-tray";
-  version = "0.7";
-
-  goPackagePath = "github.com/alex2108/syncthing-tray";
-
-  src = fetchFromGitHub {
-    owner = "alex2108";
-    repo = "syncthing-tray";
-    rev = "v${version}";
-    sha256 = "0869kinnsfzb8ydd0sv9fgqsi1sy5rhqg4whfdnrv82xjc71xyw3";
-  };
-
-  goDeps = ./deps.nix;
-
-  nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ libappindicator-gtk3 ];
-
-  meta = with lib; {
-    description = "Simple application tray for syncthing";
-    homepage = "https://github.com/alex2108/syncthing-tray";
-    license = licenses.mit;
-    maintainers = with maintainers; [ nickhu ];
-    mainProgram = "syncthing-tray";
-  };
-}
diff --git a/pkgs/applications/misc/syncthing-tray/deps.nix b/pkgs/applications/misc/syncthing-tray/deps.nix
deleted file mode 100644
index 1103146ed1b7e..0000000000000
--- a/pkgs/applications/misc/syncthing-tray/deps.nix
+++ /dev/null
@@ -1,93 +0,0 @@
-# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
-[
-  {
-    goPackagePath = "github.com/alex2108/systray";
-    fetch = {
-      type = "git";
-      url = "https://github.com/alex2108/systray";
-      rev = "40e874866be2dc2c57ab031bcbde27a76b90721a";
-      sha256 = "1bxnb6skb9ss0lwlwswql07ardkhm28nxglvlsxkdlmzv1dcwy1q";
-    };
-  }
-  {
-    goPackagePath = "github.com/getlantern/context";
-    fetch = {
-      type = "git";
-      url = "https://github.com/getlantern/context";
-      rev = "624d99b1798d7c5375ea1d3ca4c5b04d58f7c775";
-      sha256 = "09yf9x6478a5z01hybr98zwa8ax3fx7l6wwsvdkxp3fdg9dqm13b";
-    };
-  }
-  {
-    goPackagePath = "github.com/getlantern/errors";
-    fetch = {
-      type = "git";
-      url = "https://github.com/getlantern/errors";
-      rev = "99fa440517e8f3d1e4cd8d6dbed6b41f4c1ed3d6";
-      sha256 = "08rl32l5ks67hcgjxik62nd5g558mv4101kmz1ak7d3vfgg3m6i3";
-    };
-  }
-  {
-    goPackagePath = "github.com/getlantern/golog";
-    fetch = {
-      type = "git";
-      url = "https://github.com/getlantern/golog";
-      rev = "cca714f7feb5df8e455f409b549d384441ac4578";
-      sha256 = "0gnf30n38zkx356cqc6jdv1kbzy59ddqhqndwrxsm2n2zc3b5p7q";
-    };
-  }
-  {
-    goPackagePath = "github.com/getlantern/hex";
-    fetch = {
-      type = "git";
-      url = "https://github.com/getlantern/hex";
-      rev = "083fba3033ad473db3dd31c9bb368473d37581a7";
-      sha256 = "18q6rypmcqmcwlfzrrdcz08nff0a289saplvd9y3ifnfcqdw3j77";
-    };
-  }
-  {
-    goPackagePath = "github.com/getlantern/hidden";
-    fetch = {
-      type = "git";
-      url = "https://github.com/getlantern/hidden";
-      rev = "d52a649ab33af200943bb599898dbdcfdbc94cb7";
-      sha256 = "0133qmp4sjq8da5di3459vc5g5nqbpqra0f558zd95js3fdmkmsi";
-    };
-  }
-  {
-    goPackagePath = "github.com/getlantern/ops";
-    fetch = {
-      type = "git";
-      url = "https://github.com/getlantern/ops";
-      rev = "b70875f5d689a9438bca72aefd7142a2af889b18";
-      sha256 = "0cfa2bbkykbzbskmgd2an34him72z6f3y88ag1v5ffpb0d6bnar7";
-    };
-  }
-  {
-    goPackagePath = "github.com/getlantern/stack";
-    fetch = {
-      type = "git";
-      url = "https://github.com/getlantern/stack";
-      rev = "02f928aad224fbccd50d66edd776fc9d1e9f2f2b";
-      sha256 = "0ddl5r4iw3c7p4drh4d8phl7d0ssdddsnd3xjm1lzgxylqq6r568";
-    };
-  }
-  {
-    goPackagePath = "github.com/oxtoacart/bpool";
-    fetch = {
-      type = "git";
-      url = "https://github.com/oxtoacart/bpool";
-      rev = "4e1c5567d7c2dd59fa4c7c83d34c2f3528b025d6";
-      sha256 = "01kk6dhkz96yhp3p5v2rjwq8mbrwrdsn6glqw7jp4h7g5za7yi95";
-    };
-  }
-  {
-    goPackagePath = "github.com/toqueteos/webbrowser";
-    fetch = {
-      type = "git";
-      url = "https://github.com/toqueteos/webbrowser";
-      rev = "e2ebfdc6cb1a3fdc4fc4dbd20a0cae0c2e406792";
-      sha256 = "0sgjnxrq0jgipkij8b6xiy4am9bv9zziqxxdhw15rdjc5piyk3a2";
-    };
-  }
-]
diff --git a/pkgs/by-name/sy/syncthing-tray/package.nix b/pkgs/by-name/sy/syncthing-tray/package.nix
new file mode 100644
index 0000000000000..2fc912de8519d
--- /dev/null
+++ b/pkgs/by-name/sy/syncthing-tray/package.nix
@@ -0,0 +1,44 @@
+{
+  lib,
+  fetchFromGitHub,
+  fetchpatch,
+  buildGoModule,
+  pkg-config,
+  libappindicator-gtk3,
+}:
+
+buildGoModule rec {
+  pname = "syncthing-tray";
+  version = "0.7";
+
+  src = fetchFromGitHub {
+    owner = "alex2108";
+    repo = "syncthing-tray";
+    rev = "v${version}";
+    sha256 = "0869kinnsfzb8ydd0sv9fgqsi1sy5rhqg4whfdnrv82xjc71xyw3";
+  };
+
+  vendorHash = "sha256-hGV5bivDUFEbOwU9sU+Eu5Wzz/aZtj6NUkpzHlmZTtw=";
+
+  patches = [
+    # Migrate to Go modules
+    (fetchpatch {
+      url = "https://github.com/alex2108/syncthing-tray/commit/94fac974a227cd03c566f81797a21b1bcc29adf5.patch";
+      hash = "sha256-uJfnI9kGIlw4OzFoML+ulgR3keOeVB3+ox/4RtYJNXY=";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libappindicator-gtk3 ];
+
+  meta = {
+    description = "Simple application tray for syncthing";
+    homepage = "https://github.com/alex2108/syncthing-tray";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [
+      luftmensch-luftmensch
+      nickhu
+    ];
+    mainProgram = "syncthing-tray";
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 918237c123620..aeb0f1013b103 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -34573,8 +34573,6 @@ with pkgs;
 
   stc-cli = callPackage ../applications/networking/stc-cli { };
 
-  syncthing-tray = callPackage ../applications/misc/syncthing-tray { };
-
   syncthingtray = kdePackages.callPackage ../applications/misc/syncthingtray {
     # renamed in KF5 -> KF6
     plasma-framework = kdePackages.libplasma;