nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 pkg-config,
5 python3,
6 fetchFromGitLab,
7 fetchpatch,
8 gtk3,
9 glib,
10 gdbm,
11 gtkspell3,
12 ofono,
13 itstool,
14 libayatana-appindicator,
15 perlPackages,
16 meson,
17 ninja,
18}:
19
20stdenv.mkDerivation (finalAttrs: {
21 pname = "modem-manager-gui";
22 version = "0.0.20";
23
24 src = fetchFromGitLab {
25 domain = "salsa.debian.org";
26 owner = "debian";
27 repo = "modem-manager-gui";
28 rev = "upstream/${finalAttrs.version}";
29 hash = "sha256-+VXqfA7TUUemY+DWeRHupWb8weJTeiSMZu+orlcmXd4=";
30 };
31
32 nativeBuildInputs = [
33 pkg-config
34 python3
35 perlPackages.Po4a
36 itstool
37 meson
38 ninja
39 ];
40
41 buildInputs = [
42 gtk3
43 glib
44 gdbm
45 gtkspell3
46 ofono
47 libayatana-appindicator
48 ];
49
50 patches = [
51 # Fix missing tray icon
52 (fetchpatch {
53 url = "https://salsa.debian.org/debian/modem-manager-gui/-/raw/7c3e67a1cf7788d7a4b86be12803870d79aa27f2/debian/patches/fix-tray-icon.patch";
54 hash = "sha256-9LjCEQl8YfraVlO1W7+Yy7egLAPu5YfnvGvCI3uGFh8=";
55 })
56 # Fix build with meson 0.61
57 # appdata/meson.build:3:5: ERROR: Function does not take positional arguments.
58 (fetchpatch {
59 url = "https://salsa.debian.org/debian/modem-manager-gui/-/raw/7c3e67a1cf7788d7a4b86be12803870d79aa27f2/debian/patches/meson0.61.patch";
60 hash = "sha256-B+tBPIz5RxOwZWYEWttqSKGw2Wbfk0mnBY0Zy0evvAQ=";
61 })
62 # Fix segfault on launch: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004258
63 # Segmentation fault at address: 0x20
64 (fetchpatch {
65 url = "https://salsa.debian.org/debian/modem-manager-gui/-/commit/8ccffd6dd6b42625d09d5408f37f155d91411116.patch";
66 hash = "sha256-q+B+Bcm3uitJ2IfkCiMo3reFV1C06ekmy1vXWC0oHnw=";
67 })
68 ];
69
70 postPatch = ''
71 patchShebangs man/manhelper.py
72 '';
73
74 meta = {
75 description = "App to send/receive SMS, make USSD requests, control mobile data usage and more";
76 longDescription = ''
77 A simple GTK based GUI compatible with Modem manager, Wader and oFono
78 system services able to control EDGE/3G/4G broadband modem specific
79 functions. You can check balance of your SIM card, send or receive SMS
80 messages, control mobile traffic consumption and more.
81 '';
82 homepage = "https://linuxonly.ru/page/modem-manager-gui";
83 license = lib.licenses.gpl3;
84 maintainers = with lib.maintainers; [
85 ahuzik
86 galagora
87 ];
88 platforms = lib.platforms.linux;
89 mainProgram = "modem-manager-gui";
90 };
91})