Merge pull request #172410 from sikmir/crow-translate
crow-translate: 2.9.2 → 2.9.5
This commit is contained in:
commit
f324030ab6
@ -1,5 +1,5 @@
|
||||
{ lib
|
||||
, mkDerivation
|
||||
, stdenv
|
||||
, nix-update-script
|
||||
, fetchFromGitHub
|
||||
, substituteAll
|
||||
@ -11,61 +11,22 @@
|
||||
, qtmultimedia
|
||||
, qtx11extras
|
||||
, qttranslations
|
||||
, wrapQtAppsHook
|
||||
}:
|
||||
let
|
||||
singleapplication = fetchFromGitHub {
|
||||
owner = "itay-grudev";
|
||||
repo = "SingleApplication";
|
||||
rev = "v3.2.0";
|
||||
sha256 = "0w3z97dcqcz3bf7w6fja4smkafmx9kvhzb9px4k2nfmmyxh4yfma";
|
||||
};
|
||||
qtaskbarcontrol = fetchFromGitHub {
|
||||
owner = "Skycoder42";
|
||||
repo = "QTaskbarControl";
|
||||
rev = "2.0.2";
|
||||
sha256 = "0iymcvq3pv07fs9l4kh6hi1igqr7957iqndhsmg9fqkalf8nqyad";
|
||||
};
|
||||
qhotkey = fetchFromGitHub {
|
||||
owner = "Skycoder42";
|
||||
repo = "QHotkey";
|
||||
rev = "1.4.2";
|
||||
sha256 = "0391fkqrxqmzpvms4rk06aq05l308k6sadp6y3czq0gx2kng8mn9";
|
||||
};
|
||||
qonlinetranslator = fetchFromGitHub {
|
||||
owner = "crow-translate";
|
||||
repo = "QOnlineTranslator";
|
||||
rev = "1.5.3";
|
||||
sha256 = "sha256-L8y4vazbWD5SC7itxQOjEcX10w0laewxTOGz+Yd+kVM=";
|
||||
};
|
||||
circleflags = fetchFromGitHub {
|
||||
owner = "HatScripts";
|
||||
repo = "circle-flags";
|
||||
rev = "v2.3.0";
|
||||
sha256 = "sha256-KabmewF1Xf/1JQuzolrlRyLJR8O5j+/iT+29/QtOQVE=";
|
||||
};
|
||||
fluent = fetchFromGitHub {
|
||||
owner = "vinceliuice";
|
||||
repo = "Fluent-icon-theme";
|
||||
rev = "2021-08-15";
|
||||
sha256 = "sha256-uBu0vbKfhhnPKGwrnSBjPwS9ncH1iAlmeefAcpckOm4=";
|
||||
};
|
||||
in
|
||||
mkDerivation rec {
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "crow-translate";
|
||||
version = "2.9.2";
|
||||
version = "2.9.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "crow-translate";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-cxfBdoqGVmtCaXyw6QzXj2V44wKyVal/uqsddwIdvjw=";
|
||||
sha256 = "sha256-AzwJJ85vxXsc0+W3QM8citN5f0AD6APQVd9628cfLgI=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./dont-fetch-external-libs.patch;
|
||||
inherit singleapplication qtaskbarcontrol qhotkey qonlinetranslator circleflags fluent;
|
||||
})
|
||||
(substituteAll {
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
src = ./fix-qttranslations-path.patch;
|
||||
@ -73,12 +34,7 @@ mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
cp -r ${circleflags}/flags/* data/icons
|
||||
cp -r ${fluent}/src/* data/icons
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules qttools ];
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules qttools wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [ leptonica tesseract4 qtmultimedia qtx11extras ];
|
||||
|
||||
|
@ -1,65 +0,0 @@
|
||||
diff --git i/CMakeLists.txt w/CMakeLists.txt
|
||||
index 375b17c..106efa9 100644
|
||||
--- i/CMakeLists.txt
|
||||
+++ w/CMakeLists.txt
|
||||
@@ -114,13 +114,11 @@ qt5_add_translation(QM_FILES
|
||||
)
|
||||
|
||||
configure_file(src/cmake.h.in cmake.h)
|
||||
-configure_file(data/icons/flags.qrc ${CircleFlags_SOURCE_DIR}/flags/flags.qrc COPYONLY)
|
||||
-configure_file(data/icons/fluent-icon-theme.qrc ${FluentIconTheme_SOURCE_DIR}/src/fluent-icon-theme.qrc COPYONLY)
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
- ${CircleFlags_SOURCE_DIR}/flags/flags.qrc
|
||||
+ data/icons/flags.qrc
|
||||
${QM_FILES}
|
||||
- ${FluentIconTheme_SOURCE_DIR}/src/fluent-icon-theme.qrc
|
||||
+ data/icons/fluent-icon-theme.qrc
|
||||
data/icons/engines/engines.qrc
|
||||
src/addlanguagedialog.cpp
|
||||
src/addlanguagedialog.ui
|
||||
diff --git i/cmake/ExternalLibraries.cmake w/cmake/ExternalLibraries.cmake
|
||||
index c92e745..f265f03 100644
|
||||
--- i/cmake/ExternalLibraries.cmake
|
||||
+++ w/cmake/ExternalLibraries.cmake
|
||||
@@ -2,34 +2,28 @@ include(FetchContent)
|
||||
|
||||
set(QAPPLICATION_CLASS QApplication)
|
||||
FetchContent_Declare(SingleApplication
|
||||
- GIT_REPOSITORY https://github.com/itay-grudev/SingleApplication
|
||||
- GIT_TAG v3.2.0
|
||||
+ SOURCE_DIR @singleapplication@
|
||||
)
|
||||
|
||||
FetchContent_Declare(QTaskbarControl
|
||||
- GIT_REPOSITORY https://github.com/Skycoder42/QTaskbarControl
|
||||
- GIT_TAG 2.0.2
|
||||
+ SOURCE_DIR @qtaskbarcontrol@
|
||||
)
|
||||
|
||||
option(QHOTKEY_INSTALL OFF)
|
||||
FetchContent_Declare(QHotkey
|
||||
- GIT_REPOSITORY https://github.com/Skycoder42/QHotkey
|
||||
- GIT_TAG 1.4.2
|
||||
+ SOURCE_DIR @qhotkey@
|
||||
)
|
||||
|
||||
FetchContent_Declare(QOnlineTranslator
|
||||
- GIT_REPOSITORY https://github.com/crow-translate/QOnlineTranslator
|
||||
- GIT_TAG 1.5.3
|
||||
+ SOURCE_DIR @qonlinetranslator@
|
||||
)
|
||||
|
||||
FetchContent_Declare(CircleFlags
|
||||
- GIT_REPOSITORY https://github.com/HatScripts/circle-flags
|
||||
- GIT_TAG v2.3.0
|
||||
+ SOURCE_DIR @circleflags@
|
||||
)
|
||||
|
||||
FetchContent_Declare(FluentIconTheme
|
||||
- GIT_REPOSITORY https://github.com/vinceliuice/Fluent-icon-theme
|
||||
- GIT_TAG 2021-08-15
|
||||
+ SOURCE_DIR @fluent@
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(SingleApplication QTaskbarControl QHotkey QOnlineTranslator CircleFlags FluentIconTheme)
|
Loading…
Reference in New Issue
Block a user