summary refs log tree commit diff
diff options
context:
space:
mode:
authorcolin <colin@uninsane.org>2022-09-30 16:27:41 -0700
committerRick van Schijndel <Mindavi@users.noreply.github.com>2022-11-26 10:53:58 +0100
commitae466ee0acf8da56e5b47c9f88f48982223d0424 (patch)
treedb593d0d4d4a6c4e9bad1161fa251472dddaf404
parent0d9eed3128a1d1e24ad28be9295b1397e21f2c48 (diff)
downloadnixpkgs-ae466ee0acf8da56e5b47c9f88f48982223d0424.tar
nixpkgs-ae466ee0acf8da56e5b47c9f88f48982223d0424.tar.gz
nixpkgs-ae466ee0acf8da56e5b47c9f88f48982223d0424.tar.bz2
nixpkgs-ae466ee0acf8da56e5b47c9f88f48982223d0424.tar.lz
nixpkgs-ae466ee0acf8da56e5b47c9f88f48982223d0424.tar.xz
nixpkgs-ae466ee0acf8da56e5b47c9f88f48982223d0424.tar.zst
nixpkgs-ae466ee0acf8da56e5b47c9f88f48982223d0424.zip
phosh-mobile-settings: init at 0.21.1
-rw-r--r--pkgs/applications/window-managers/phosh/phosh-mobile-settings.nix66
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/applications/window-managers/phosh/phosh-mobile-settings.nix b/pkgs/applications/window-managers/phosh/phosh-mobile-settings.nix
new file mode 100644
index 00000000000..6786576e6ed
--- /dev/null
+++ b/pkgs/applications/window-managers/phosh/phosh-mobile-settings.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, wrapGAppsHook
+, desktop-file-utils
+, feedbackd
+, gtk4
+, libadwaita
+, lm_sensors
+, phoc
+, phosh
+, wayland-protocols
+}:
+
+stdenv.mkDerivation rec {
+  pname = "phosh-mobile-settings";
+  version = "0.21.1";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "guidog";
+    repo = "phosh-mobile-settings";
+    rev = "v${version}";
+    sha256 = "sha256-60AXaKSF8bY+Z3TNlIIa7jZwQ2IkHqCbZ3uIlhkx6i0=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    desktop-file-utils
+    feedbackd
+    gtk4
+    libadwaita
+    lm_sensors
+    phoc
+    phosh
+    wayland-protocols
+  ];
+
+  postInstall = ''
+    # this is optional, but without it phosh-mobile-settings won't know about lock screen plugins
+    ln -s '${phosh}/lib/phosh' "$out/lib/phosh"
+
+    # .desktop files marked `OnlyShowIn=Phosh;` aren't displayed even in our phosh, so remove that.
+    # also make the Exec path absolute.
+    substituteInPlace "$out/share/applications/org.sigxcpu.MobileSettings.desktop" \
+      --replace 'OnlyShowIn=Phosh;' "" \
+      --replace 'Exec=phosh-mobile-settings' "Exec=$out/bin/phosh-mobile-settings"
+  '';
+
+  meta = with lib; {
+    description = "A settings app for mobile specific things";
+    homepage = "https://gitlab.gnome.org/guidog/phosh-mobile-settings";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ colinsane ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ddd3f57f82b..e923ae3062c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -10399,6 +10399,8 @@ with pkgs;
 
   phosh = callPackage ../applications/window-managers/phosh { };
 
+  phosh-mobile-settings = callPackage ../applications/window-managers/phosh/phosh-mobile-settings.nix { };
+
   pinentry = libsForQt5.callPackage ../tools/security/pinentry { };
 
   pinentry-curses = (lib.getOutput "curses" pinentry);