about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul Meyer <49727155+katexochen@users.noreply.github.com>2024-06-13 07:55:13 +0200
committerGitHub <noreply@github.com>2024-06-13 07:55:13 +0200
commita1a0c6ac276cdfa5092f24de439225e1aeafcdb9 (patch)
treefe4adcf93c3b229ca9063ce30836292b0e070e44
parentb78c0b9c082359a5b8de0eb1b06c9dc49424f490 (diff)
parente21eb95cc404c91a8e21a6e9e279524caa04be13 (diff)
Merge pull request #318082 from katexochen/go-upower-notify/mods
go-upower-notify: unstable-2016-03-10 -> 0-unstable-2019-01-06; migrate to buildGoModule
-rw-r--r--pkgs/tools/misc/upower-notify/default.nix23
-rw-r--r--pkgs/tools/misc/upower-notify/deps.nix11
2 files changed, 15 insertions, 19 deletions
diff --git a/pkgs/tools/misc/upower-notify/default.nix b/pkgs/tools/misc/upower-notify/default.nix
index 8033a91ecf51a..205735ae01382 100644
--- a/pkgs/tools/misc/upower-notify/default.nix
+++ b/pkgs/tools/misc/upower-notify/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildGoPackage, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
 
 # To use upower-notify, the maintainer suggests adding something like this to your configuration.nix:
 #
@@ -6,20 +6,27 @@
 #   ${pkgs.dunst}/bin/dunst -shrink -geometry 0x0-50-50 -key space & # ...if don't already have a dbus notification display app
 #   (sleep 3; exec ${pkgs.yeshup}/bin/yeshup ${pkgs.go-upower-notify}/bin/upower-notify) &
 # '';
-buildGoPackage rec {
+buildGoModule {
   pname = "upower-notify";
-  version = "unstable-2016-03-10";
-
-  goPackagePath = "github.com/omeid/upower-notify";
+  version = "0-unstable-2019-01-06";
 
   src = fetchFromGitHub {
     owner = "omeid";
     repo = "upower-notify";
-    rev = "14c581e683a7e90ec9fa6d409413c16599a5323c";
-    sha256 = "16zlvn53p9m10ph8n9gps51fkkvl6sf4afdzni6azk05j0ng49jw";
+    rev = "7013b0d4d2687e03554b1287e566dc8979896ea5";
+    sha256 = "sha256-8kGMeWIyM6ML1ffQ6L+SNzuBb7e5Y5I5QKMkyEjSVEA=";
   };
 
-  goDeps = ./deps.nix;
+  patches = [
+    # Migrate to Go module
+    (fetchpatch {
+      url = "https://github.com/omeid/upower-notify/commit/dff8ad7e33e5b0cf148e73c6ea0c358da72006ed.patch";
+      hash = "sha256-zPSryo6f+6QGgjOkC3W1fPIbZ3FD6S/rAuBJXHWqjZg=";
+    })
+  ];
+
+  vendorHash = "sha256-58zK6t3rb+19ilaQaNgsMVFQBYKPIV40ww8klrGbpnw=";
+  proxyVendor = true;
 
   meta = with lib; {
     description = "simple tool to give you Desktop Notifications about your battery";
diff --git a/pkgs/tools/misc/upower-notify/deps.nix b/pkgs/tools/misc/upower-notify/deps.nix
deleted file mode 100644
index 8a729857b8191..0000000000000
--- a/pkgs/tools/misc/upower-notify/deps.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-[
-  {
-    goPackagePath = "github.com/godbus/dbus";
-    fetch = {
-      type = "git";
-      url = "https://github.com/godbus/dbus";
-      rev = "32c6cc29c14570de4cf6d7e7737d68fb2d01ad15";
-      sha256 = "0v401f761l88yapiaw23pxvxviqrwl2r2vfd6lq02044i7x4i5r3";
-    };
-  }
-]