libqofono: init at 0.103
This commit is contained in:
parent
b5651798b2
commit
3e9044f4ca
4 changed files with 123 additions and 0 deletions
|
@ -0,0 +1,29 @@
|
|||
From 8b508d427c4fd472639ba8d4a0d3b8ab69e3f2e3 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
|
||||
Date: Tue, 30 Mar 2021 16:37:52 -0400
|
||||
Subject: [PATCH] [NixOS] Skip tests, they're shock-full of hardcoded FHS paths
|
||||
|
||||
---
|
||||
libqofono.pro | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libqofono.pro b/libqofono.pro
|
||||
index 60d0b89..638a4a8 100644
|
||||
--- a/libqofono.pro
|
||||
+++ b/libqofono.pro
|
||||
@@ -1,5 +1,5 @@
|
||||
TEMPLATE = subdirs
|
||||
-SUBDIRS += src plugin test ofonotest
|
||||
+SUBDIRS += src plugin
|
||||
OTHER_FILES += \
|
||||
rpm/libqofono-qt5.spec \
|
||||
TODO \
|
||||
@@ -7,5 +7,3 @@ OTHER_FILES += \
|
||||
|
||||
src.target = src-target
|
||||
plugin.depends = src-target
|
||||
-test.depends = src-target
|
||||
-ofonotest.depends = src-target
|
||||
--
|
||||
2.28.0
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From 04106010ae2a13b3a2a93e210062998ee51778ca Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
|
||||
Date: Tue, 30 Mar 2021 15:47:38 -0400
|
||||
Subject: [PATCH] [NixOS] provide mobile-broadband-provider-info path
|
||||
|
||||
---
|
||||
src/qofonoconnectioncontext.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/qofonoconnectioncontext.cpp b/src/qofonoconnectioncontext.cpp
|
||||
index b5877ed..455167c 100644
|
||||
--- a/src/qofonoconnectioncontext.cpp
|
||||
+++ b/src/qofonoconnectioncontext.cpp
|
||||
@@ -346,7 +346,7 @@ bool QOfonoConnectionContext::validateProvisioning(const QString &providerString
|
||||
QXmlQuery query;
|
||||
QString provider = providerString;
|
||||
|
||||
- query.setFocus(QUrl("/usr/share/mobile-broadband-provider-info/serviceproviders.xml"));
|
||||
+ query.setFocus(QUrl("@mobile-broadband-provider-info@/share/mobile-broadband-provider-info/serviceproviders.xml"));
|
||||
|
||||
if (provider.contains("\'")) {
|
||||
provider = provider.replace("\'", "'");
|
||||
@@ -457,7 +457,7 @@ void QOfonoConnectionContext::provision(const QString &provider, const QString &
|
||||
{
|
||||
#ifdef QOFONO_PROVISIONING
|
||||
QXmlQuery query;
|
||||
- query.setFocus(QUrl("/usr/share/mobile-broadband-provider-info/serviceproviders.xml"));
|
||||
+ query.setFocus(QUrl("@mobile-broadband-provider-info@/share/mobile-broadband-provider-info/serviceproviders.xml"));
|
||||
|
||||
QString providerStr = provider;
|
||||
if (providerStr.contains("\'")) {
|
||||
--
|
||||
2.28.0
|
||||
|
58
pkgs/development/libraries/libqofono/default.nix
Normal file
58
pkgs/development/libraries/libqofono/default.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ lib
|
||||
, substituteAll
|
||||
, mkDerivation
|
||||
, fetchFromGitLab
|
||||
, mobile-broadband-provider-info
|
||||
, qmake
|
||||
, qtbase
|
||||
, qtdeclarative
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "libqofono";
|
||||
version = "0.103";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "git.sailfishos.org";
|
||||
owner = "mer-core";
|
||||
repo = "libqofono";
|
||||
rev = version;
|
||||
sha256 = "1ly5aj412ljcjvhqyry6nhiglbzzhczsy1a6w4i4fja60b2m1z45";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./0001-NixOS-provide-mobile-broadband-provider-info-path.patch;
|
||||
inherit mobile-broadband-provider-info;
|
||||
})
|
||||
./0001-NixOS-Skip-tests-they-re-shock-full-of-hardcoded-FHS.patch
|
||||
];
|
||||
|
||||
# Replaces paths from the Qt store path to this library's store path.
|
||||
postPatch = ''
|
||||
substituteInPlace src/src.pro \
|
||||
--replace /usr $out \
|
||||
--replace '$$[QT_INSTALL_PREFIX]' "$out" \
|
||||
--replace 'target.path = $$[QT_INSTALL_LIBS]' "target.path = $out/lib"
|
||||
|
||||
substituteInPlace plugin/plugin.pro \
|
||||
--replace '$$[QT_INSTALL_QML]' $out'/${qtbase.qtQmlPrefix}'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
qmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
qtbase
|
||||
qtdeclarative
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library for accessing the ofono daemon, and declarative plugin for it";
|
||||
homepage = "https://git.sailfishos.org/mer-core/libqofono/";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ samueldr ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -122,6 +122,8 @@ in (kdeFrameworks // plasma5 // plasma5.thirdParty // kdeGear // qt5 // {
|
|||
inherit (pkgs.darwin.apple_sdk.frameworks) AGL;
|
||||
};
|
||||
|
||||
libqofono = callPackage ../development/libraries/libqofono { };
|
||||
|
||||
libqtav = callPackage ../development/libraries/libqtav { };
|
||||
|
||||
kpmcore = callPackage ../development/libraries/kpmcore { };
|
||||
|
|
Loading…
Reference in a new issue