2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-11-16 04:20:00 +00:00
|
|
|
, fetchpatch
|
2023-08-04 22:07:22 +00:00
|
|
|
, qmake
|
2023-11-16 04:20:00 +00:00
|
|
|
, qtbase
|
2023-08-04 22:07:22 +00:00
|
|
|
, qtmultimedia
|
|
|
|
, utmp
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2023-08-04 22:07:22 +00:00
|
|
|
pname = "qmltermwidget";
|
|
|
|
version = "unstable-2022-01-09";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Swordfish90";
|
2023-11-16 04:20:00 +00:00
|
|
|
repo = "qmltermwidget";
|
2023-08-04 22:07:22 +00:00
|
|
|
rev = "63228027e1f97c24abb907550b22ee91836929c5";
|
|
|
|
hash = "sha256-aVaiRpkYvuyomdkQYAgjIfi6a3wG2a6hNH1CfkA2WKQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
qmake
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
qtmultimedia
|
|
|
|
] ++ lib.optional stdenv.isDarwin utmp;
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
patches = [
|
2023-11-16 04:20:00 +00:00
|
|
|
# Changes required to make it compatible with lomiri-terminal-app
|
|
|
|
# QML-exposed colorscheme, scrollbar & clipboard functionality
|
|
|
|
# Remove when https://github.com/Swordfish90/qmltermwidget/pull/39 merged
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0001-qmltermwidget-lomiri-submissions.patch";
|
|
|
|
url = "https://github.com/Swordfish90/qmltermwidget/compare/63228027e1f97c24abb907550b22ee91836929c5..ffc6b2b2a20ca785f93300eca93c25c4b74ece17.patch";
|
|
|
|
hash = "sha256-1GjC2mdfP3NpePDWZaT8zvIq3vwWIZs+iQ9o01iQtD4=";
|
|
|
|
})
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
# A fix to the above series of patches, to fix a crash in lomiri-terminal-app
|
|
|
|
# Remove (and update the above fetchpatch) when https://github.com/gber/qmltermwidget/pull/1 merged
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0002-qmltermwidget-Mark-ColorSchemeManager-singleton-as-C++-owned.patch";
|
|
|
|
url = "https://github.com/gber/qmltermwidget/commit/f3050bda066575eebdcff70fc1c3a393799e1d6d.patch";
|
|
|
|
hash = "sha256-O8fEpVLYMze6q4ps7RDGbNukRmZZBjLwqmvRqpp+H+Y=";
|
|
|
|
})
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
# Some files are copied twice to the output which makes the build fails
|
|
|
|
./do-not-copy-artifacts-twice.patch
|
2021-01-09 10:05:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace qmltermwidget.pro \
|
2023-11-16 04:20:00 +00:00
|
|
|
--replace '$$[QT_INSTALL_QML]' '$$PREFIX/${qtbase.qtQmlPrefix}/'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "QML port of qtermwidget";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/Swordfish90/qmltermwidget";
|
2023-11-16 04:20:00 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with lib.maintainers; [ OPNA2608 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|