+7
-10
pkgs/development/libraries/libqtdbusmock/default.nix
+7
-10
pkgs/development/libraries/libqtdbusmock/default.nix
···
1
{ stdenv
2
, lib
3
-
, fetchbzr
4
, testers
5
, cmake
6
, cmake-extras
···
17
18
stdenv.mkDerivation (finalAttrs: {
19
pname = "libqtdbusmock";
20
-
version = "unstable-2017-03-16";
21
22
-
src = fetchbzr {
23
-
url = "lp:libqtdbusmock";
24
-
rev = "49";
25
-
sha256 = "sha256-q3jL8yGLgcNxXHPh9M9cTVtUvonrBUPNxuPJIvu7Q/s=";
26
};
27
28
postPatch = ''
29
-
# Look for the new(?) name
30
-
substituteInPlace CMakeLists.txt \
31
-
--replace 'NetworkManager' 'libnm'
32
-
33
# Workaround for "error: expected unqualified-id before 'public'" on "**signals"
34
sed -i -e '/add_definitions/a -DQT_NO_KEYWORDS' CMakeLists.txt
35
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
···
1
{ stdenv
2
, lib
3
+
, fetchFromGitLab
4
, testers
5
, cmake
6
, cmake-extras
···
17
18
stdenv.mkDerivation (finalAttrs: {
19
pname = "libqtdbusmock";
20
+
version = "0.9.1";
21
22
+
src = fetchFromGitLab {
23
+
owner = "ubports";
24
+
repo = "development/core/libqtdbusmock";
25
+
rev = finalAttrs.version;
26
+
hash = "sha256-hVw2HnIHlA7vvt0Sr6F2qVhvBZ33aCeqb9vgbu3rgBo=";
27
};
28
29
postPatch = ''
30
# Workaround for "error: expected unqualified-id before 'public'" on "**signals"
31
sed -i -e '/add_definitions/a -DQT_NO_KEYWORDS' CMakeLists.txt
32
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
+9
-8
pkgs/development/libraries/libqtdbustest/default.nix
+9
-8
pkgs/development/libraries/libqtdbustest/default.nix
···
1
{ stdenv
2
, lib
3
-
, fetchbzr
4
, fetchpatch
5
, testers
6
, cmake
···
16
17
stdenv.mkDerivation (finalAttrs: {
18
pname = "libqtdbustest";
19
-
version = "unstable-2017-01-06";
20
21
-
src = fetchbzr {
22
-
url = "lp:libqtdbustest";
23
-
rev = "42";
24
-
sha256 = "sha256-5MQdGGtEVE/pM9u0B0xFXyITiRln9p+8/MLtrrCZqi8=";
25
};
26
27
patches = [
···
31
32
# Disable QProcess start timeout
33
(fetchpatch {
34
-
url = "https://salsa.debian.org/debian-ayatana-team/libqtdbustest/-/raw/0788df10bc6f2aa47c2b73fc1df944686a9ace1e/debian/patches/1003_no-QProcess-waitForstarted-timeout.patch";
35
hash = "sha256-ThDbn6URvkj5ARDMj+xO0fb1Qh2YQRzVy24O03KglHI=";
36
})
37
38
# More robust dbus address reading
39
(fetchpatch {
40
-
url = "https://salsa.debian.org/debian-ayatana-team/libqtdbustest/-/raw/7e55c79cd032c702b30d834c1fb0b65661fc6eeb/debian/patches/1004_make-reading-address-from-dbus-daemon-more-robust.patch";
41
hash = "sha256-hq8pdducp/udxoGWGt1dgL/7VHcbJO/oT1dOY1zew8M=";
42
})
43
];
···
1
{ stdenv
2
, lib
3
+
, fetchFromGitLab
4
, fetchpatch
5
, testers
6
, cmake
···
16
17
stdenv.mkDerivation (finalAttrs: {
18
pname = "libqtdbustest";
19
+
version = "0.3.2";
20
21
+
src = fetchFromGitLab {
22
+
owner = "ubports";
23
+
repo = "development/core/libqtdbustest";
24
+
rev = finalAttrs.version;
25
+
hash = "sha256-yqqyKxsbqiVTrkas79YoPMi28dKFNntiE7+dx1v+Qh4=";
26
};
27
28
patches = [
···
32
33
# Disable QProcess start timeout
34
(fetchpatch {
35
+
url = "https://salsa.debian.org/ubports-team/libqtdbustest/-/raw/debian/0.3.2-3/debian/patches/1003_no-QProcess-waitForstarted-timeout.patch";
36
hash = "sha256-ThDbn6URvkj5ARDMj+xO0fb1Qh2YQRzVy24O03KglHI=";
37
})
38
39
# More robust dbus address reading
40
(fetchpatch {
41
+
url = "https://salsa.debian.org/ubports-team/libqtdbustest/-/raw/debian/0.3.2-3/debian/patches/1004_make-reading-address-from-dbus-daemon-more-robust.patch";
42
hash = "sha256-hq8pdducp/udxoGWGt1dgL/7VHcbJO/oT1dOY1zew8M=";
43
})
44
];
+5
-4
pkgs/development/libraries/libqtdbustest/less-pedantic-process-finding.patch
+5
-4
pkgs/development/libraries/libqtdbustest/less-pedantic-process-finding.patch
···
74
diff '--color=auto' -ur '--color=never' a/tests/libqtdbustest/TestSuicidalProcess.cpp b/tests/libqtdbustest/TestSuicidalProcess.cpp
75
--- a/tests/libqtdbustest/TestSuicidalProcess.cpp 2023-01-20 21:36:16.948292559 +0100
76
+++ b/tests/libqtdbustest/TestSuicidalProcess.cpp 2023-01-20 21:55:07.219951081 +0100
77
-
@@ -51,8 +51,7 @@
78
pgrep.waitForFinished();
79
pgrep.waitForReadyRead();
80
-
81
-
- EXPECT_EQ("sleep 5",
82
-
- QString::fromUtf8(pgrep.readAll().trimmed()).toStdString());
83
+ EXPECT_TRUE(pgrep.readAll().contains("sleep 5"));
84
}
85
···
74
diff '--color=auto' -ur '--color=never' a/tests/libqtdbustest/TestSuicidalProcess.cpp b/tests/libqtdbustest/TestSuicidalProcess.cpp
75
--- a/tests/libqtdbustest/TestSuicidalProcess.cpp 2023-01-20 21:36:16.948292559 +0100
76
+++ b/tests/libqtdbustest/TestSuicidalProcess.cpp 2023-01-20 21:55:07.219951081 +0100
77
+
@@ -51,9 +51,7 @@
78
pgrep.waitForFinished();
79
pgrep.waitForReadyRead();
80
+
81
+
- EXPECT_TRUE(QString::fromUtf8(pgrep.readAll().trimmed())
82
+
- .toStdString()
83
+
- .find("sleep 5") != std::string::npos);
84
+ EXPECT_TRUE(pgrep.readAll().contains("sleep 5"));
85
}
86