diff options
author | Bobby Rong <rjl931189261@126.com> | 2024-02-24 21:56:20 +0800 |
---|---|---|
committer | Bobby Rong <rjl931189261@126.com> | 2024-03-14 23:34:06 +0800 |
commit | cbe14f0baf048e48d93ce101b303ed44f1380c3c (patch) | |
tree | 1614488da0c14cbc9d050f835e314551cc0ae88c /pkgs/desktops/mate | |
parent | 2f977d185f0acd2df30c6fb27eb133673aaa48b9 (diff) | |
download | nixlib-cbe14f0baf048e48d93ce101b303ed44f1380c3c.tar nixlib-cbe14f0baf048e48d93ce101b303ed44f1380c3c.tar.gz nixlib-cbe14f0baf048e48d93ce101b303ed44f1380c3c.tar.bz2 nixlib-cbe14f0baf048e48d93ce101b303ed44f1380c3c.tar.lz nixlib-cbe14f0baf048e48d93ce101b303ed44f1380c3c.tar.xz nixlib-cbe14f0baf048e48d93ce101b303ed44f1380c3c.tar.zst nixlib-cbe14f0baf048e48d93ce101b303ed44f1380c3c.zip |
mate.mate-panel-with-applets: init
Diffstat (limited to 'pkgs/desktops/mate')
-rw-r--r-- | pkgs/desktops/mate/default.nix | 12 | ||||
-rw-r--r-- | pkgs/desktops/mate/mate-panel/with-applets.nix | 61 |
2 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/desktops/mate/default.nix b/pkgs/desktops/mate/default.nix index bbd9f8c09989..7c65e36d13db 100644 --- a/pkgs/desktops/mate/default.nix +++ b/pkgs/desktops/mate/default.nix @@ -35,6 +35,7 @@ let mate-netbook = callPackage ./mate-netbook { }; mate-notification-daemon = callPackage ./mate-notification-daemon { }; mate-panel = callPackage ./mate-panel { }; + mate-panel-with-applets = callPackage ./mate-panel/with-applets.nix { }; mate-polkit = callPackage ./mate-polkit { }; mate-power-manager = callPackage ./mate-power-manager { }; mate-sensors-applet = callPackage ./mate-sensors-applet { }; @@ -99,6 +100,17 @@ let cajaExtensions = [ caja-extensions ]; + + panelApplets = [ + mate-applets + mate-indicator-applet + mate-netbook + mate-notification-daemon + mate-media + mate-power-manager + mate-sensors-applet + mate-utils + ]; }; in lib.makeScope pkgs.newScope packages diff --git a/pkgs/desktops/mate/mate-panel/with-applets.nix b/pkgs/desktops/mate/mate-panel/with-applets.nix new file mode 100644 index 000000000000..e3f76645aa7c --- /dev/null +++ b/pkgs/desktops/mate/mate-panel/with-applets.nix @@ -0,0 +1,61 @@ +{ stdenv +, lib +, glib +, wrapGAppsHook +, xorg +, marco +, mate-panel +, panelApplets +, applets ? [ ] +, useDefaultApplets ? true +}: + +let + selectedApplets = applets ++ (lib.optionals useDefaultApplets panelApplets); +in +stdenv.mkDerivation { + pname = "${mate-panel.pname}-with-applets"; + version = mate-panel.version; + + src = null; + + paths = [ mate-panel ] ++ selectedApplets; + passAsFile = [ "paths" ]; + + nativeBuildInputs = [ + glib + wrapGAppsHook + ]; + + buildInputs = lib.forEach selectedApplets (x: x.buildInputs) ++ selectedApplets + ++ [ mate-panel ] ++ mate-panel.buildInputs ++ mate-panel.propagatedBuildInputs; + + dontUnpack = true; + dontConfigure = true; + dontBuild = true; + + preferLocalBuild = true; + allowSubstitutes = false; + + installPhase = '' + runHook preInstall + + mkdir -p $out + for i in $(cat $pathsPath); do + ${xorg.lndir}/bin/lndir -silent $i $out + done + + runHook postInstall + ''; + + preFixup = '' + gappsWrapperArgs+=( + --set MATE_PANEL_APPLETS_DIR "$out/share/mate-panel/applets" + --set MATE_PANEL_EXTRA_MODULES "$out/lib/mate-panel/applets" + # Workspace switcher settings + --prefix XDG_DATA_DIRS : "${glib.getSchemaDataDirPath marco}" + ) + ''; + + inherit (mate-panel.meta); +} |