about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin.nix')
-rw-r--r--nixpkgs/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin.nix51
1 files changed, 35 insertions, 16 deletions
diff --git a/nixpkgs/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin.nix b/nixpkgs/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin.nix
index 5ab311ef16f7..cff2ef251ad4 100644
--- a/nixpkgs/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin.nix
+++ b/nixpkgs/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin.nix
@@ -1,29 +1,48 @@
-{ stdenv, fetchurl, pkgconfig, intltool, gtk2, libxml2, libsoup, upower,
-libxfce4ui, libxfce4util, xfce4-panel, hicolor-icon-theme }:
+{ stdenv, fetchurl, pkgconfig, intltool, gtk3, libxml2, libsoup, upower,
+  libxfce4ui, libxfce4util, xfce4-panel, hicolor-icon-theme, xfce }:
+
+let
+  category = "panel-plugins";
+in
 
 stdenv.mkDerivation rec {
-  name = "${p_name}-${ver_maj}.${ver_min}";
-  p_name  = "xfce4-weather-plugin";
-  ver_maj = "0.8";
-  ver_min = "10";
+  pname  = "xfce4-weather-plugin";
+  version = "0.10.1";
 
   src = fetchurl {
-    url = "mirror://xfce/src/panel-plugins/${p_name}/${ver_maj}/${name}.tar.bz2";
-    sha256 = "1f7ac2zr5s5w6krdpgsq252wxhhmcblia3j783132ilh8k246vgf";
+    url = "mirror://xfce/src/${category}/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
+    sha256 = "12bs2rfmmy021087i10vxibdbbvd5vld0vk3h5hymhpz7rgszcmg";
   };
 
-  nativeBuildInputs = [ pkgconfig intltool ];
+  nativeBuildInputs = [
+    pkgconfig
+    intltool
+  ];
 
-  buildInputs = [ gtk2 libxml2 libsoup upower libxfce4ui libxfce4util
-   xfce4-panel hicolor-icon-theme ];
+  buildInputs = [
+    gtk3
+    libxml2
+    libsoup
+    upower
+    libxfce4ui
+    libxfce4util
+    xfce4-panel
+    hicolor-icon-theme
+  ];
 
   enableParallelBuilding = true;
+  
+  passthru.updateScript = xfce.updateScript {
+    inherit pname version;
+    attrPath = "xfce.${pname}";
+    versionLister = xfce.archiveLister category pname;
+  };
 
-  meta = {
-    homepage = "http://goodies.xfce.org/projects/panel-plugins/${p_name}";
+  meta = with stdenv.lib; {
+    homepage = "https://docs.xfce.org/panel-plugins/xfce4-weather-plugin";
     description = "Weather plugin for the Xfce desktop environment";
-    license = stdenv.lib.licenses.gpl2Plus;
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.romildo ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.romildo ];
   };
 }