1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 nixosTests,
6 directoryListingUpdater,
7 meson,
8 ninja,
9 pkg-config,
10 wayland-scanner,
11 wrapGAppsHook4,
12 desktop-file-utils,
13 feedbackd,
14 gtk4,
15 libadwaita,
16 lm_sensors,
17 phoc,
18 phosh,
19 wayland-protocols,
20 json-glib,
21 gsound,
22 gmobile,
23}:
24
25stdenv.mkDerivation rec {
26 pname = "phosh-mobile-settings";
27 version = "0.41.0";
28
29 src = fetchFromGitLab {
30 domain = "gitlab.gnome.org";
31 group = "World";
32 owner = "Phosh";
33 repo = "phosh-mobile-settings";
34 rev = "v${version}";
35 hash = "sha256-t5qngjQcjPltUGbcZ+CF5FbZtZkV/cD3xUhuApQbKHo=";
36 };
37
38 nativeBuildInputs = [
39 meson
40 ninja
41 phosh
42 pkg-config
43 wayland-scanner
44 wrapGAppsHook4
45 ];
46
47 buildInputs = [
48 desktop-file-utils
49 feedbackd
50 gtk4
51 libadwaita
52 lm_sensors
53 phoc
54 wayland-protocols
55 json-glib
56 gsound
57 gmobile
58 ];
59
60 postPatch = ''
61 # There are no schemas to compile.
62 substituteInPlace meson.build \
63 --replace 'glib_compile_schemas: true' 'glib_compile_schemas: false'
64 '';
65
66 postInstall = ''
67 # this is optional, but without it phosh-mobile-settings won't know about lock screen plugins
68 ln -s '${phosh}/lib/phosh' "$out/lib/phosh"
69 '';
70
71 passthru = {
72 tests.phosh = nixosTests.phosh;
73 updateScript = directoryListingUpdater { };
74 };
75
76 meta = {
77 description = "Settings app for mobile specific things";
78 mainProgram = "phosh-mobile-settings";
79 homepage = "https://gitlab.gnome.org/World/Phosh/phosh-mobile-settings";
80 changelog = "https://gitlab.gnome.org/World/Phosh/phosh-mobile-settings/-/blob/v${version}/debian/changelog";
81 license = lib.licenses.gpl3Plus;
82 maintainers = with lib.maintainers; [ rvl ];
83 platforms = lib.platforms.linux;
84 };
85}