Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libsForQt5.qmltermwidget: Adopt, cleanups, make Lomiri-compatible #245778

Merged
merged 3 commits into from
Nov 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions pkgs/development/libraries/qmltermwidget/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, qmake
, qtbase
, qtquick1
, qmake
, qtmultimedia
, utmp
}:
Expand All @@ -13,13 +14,15 @@ stdenv.mkDerivation {
version = "unstable-2022-01-09";

src = fetchFromGitHub {
repo = "qmltermwidget";
owner = "Swordfish90";
repo = "qmltermwidget";
rev = "63228027e1f97c24abb907550b22ee91836929c5";
hash = "sha256-aVaiRpkYvuyomdkQYAgjIfi6a3wG2a6hNH1CfkA2WKQ=";
};

nativeBuildInputs = [ qmake ];
nativeBuildInputs = [
qmake
];

buildInputs = [
qtbase
Expand All @@ -28,24 +31,31 @@ stdenv.mkDerivation {
] ++ lib.optional stdenv.isDarwin utmp;

patches = [
# 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=";
})

# Some files are copied twice to the output which makes the build fails
./do-not-copy-artifacts-twice.patch
];

postPatch = ''
substituteInPlace qmltermwidget.pro \
--replace '$$[QT_INSTALL_QML]' "/$qtQmlPrefix/"
--replace '$$[QT_INSTALL_QML]' '$$PREFIX/${qtbase.qtQmlPrefix}/'
'';

installFlags = [ "INSTALL_ROOT=${placeholder "out"}" ];

dontWrapQtApps = true;

meta = {
description = "A QML port of qtermwidget";
homepage = "https://github.com/Swordfish90/qmltermwidget";
license = lib.licenses.gpl2;
license = lib.licenses.gpl2Plus;
platforms = with lib.platforms; linux ++ darwin;
maintainers = with lib.maintainers; [ ];
maintainers = with lib.maintainers; [ OPNA2608 ];
};
}