about summary refs log tree commit diff
path: root/pkgs/desktops/xfce/applications/xfce4-panel-profiles/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops/xfce/applications/xfce4-panel-profiles/default.nix')
-rw-r--r--pkgs/desktops/xfce/applications/xfce4-panel-profiles/default.nix60
1 files changed, 46 insertions, 14 deletions
diff --git a/pkgs/desktops/xfce/applications/xfce4-panel-profiles/default.nix b/pkgs/desktops/xfce/applications/xfce4-panel-profiles/default.nix
index e223f8bc66632..2e25e686ccd56 100644
--- a/pkgs/desktops/xfce/applications/xfce4-panel-profiles/default.nix
+++ b/pkgs/desktops/xfce/applications/xfce4-panel-profiles/default.nix
@@ -1,31 +1,63 @@
-{ mkXfceDerivation, lib, python3, intltool, gettext,
- gtk3, libxfce4ui, libxfce4util, pango, harfbuzz, gdk-pixbuf, atk }:
+{ stdenv
+, lib
+, fetchFromGitLab
+, gettext
+, gobject-introspection
+, intltool
+, wrapGAppsHook3
+, glib
+, gtk3
+, libxfce4ui
+, python3
+, gitUpdater
+}:
 
 let
-  pythonEnv = python3.withPackages(ps: [ ps.pygobject3 ps.psutil ]);
-  makeTypelibPath = lib.makeSearchPathOutput "lib/girepository-1.0" "lib/girepository-1.0";
-in mkXfceDerivation {
-  category = "apps";
+  pythonEnv = python3.withPackages (ps: [
+    ps.pygobject3
+    ps.psutil
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "xfce4-panel-profiles";
   version = "1.0.14";
 
-  sha256 = "sha256-mGA70t2U4mqEbcrj/DDsPl++EKWyZ8YXzKzzVOrH5h8=";
+  src = fetchFromGitLab {
+    domain = "gitlab.xfce.org";
+    owner = "apps";
+    repo = "xfce4-panel-profiles";
+    rev = "xfce4-panel-profiles-${finalAttrs.version}";
+    sha256 = "sha256-mGA70t2U4mqEbcrj/DDsPl++EKWyZ8YXzKzzVOrH5h8=";
+  };
+
+  nativeBuildInputs = [
+    gettext
+    gobject-introspection
+    intltool
+    wrapGAppsHook3
+  ];
 
-  nativeBuildInputs = [ intltool gettext ];
-  propagatedBuildInputs = [ pythonEnv ];
+  buildInputs = [
+    glib
+    gtk3
+    libxfce4ui
+    pythonEnv
+  ];
 
   configurePhase = ''
+    runHook preConfigure
+    # This is just a handcrafted script and does not accept additional arguments.
     ./configure --prefix=$out
+    runHook postConfigure
   '';
 
-  postFixup = ''
-    wrapProgram $out/bin/xfce4-panel-profiles \
-      --set GI_TYPELIB_PATH ${makeTypelibPath [ gtk3 libxfce4ui libxfce4util pango harfbuzz gdk-pixbuf atk ]}
-  '';
+  passthru.updateScript = gitUpdater { rev-prefix = "xfce4-panel-profiles-"; };
 
   meta = with lib; {
+    homepage = "https://docs.xfce.org/apps/xfce4-panel-profiles/start";
     description = "Simple application to manage Xfce panel layouts";
     mainProgram = "xfce4-panel-profiles";
     maintainers = with maintainers; [ ] ++ teams.xfce.members;
+    platforms = platforms.linux;
   };
-}
+})