crow-translate: 2.8.1 → 2.8.4

This commit is contained in:
Nikolay Korotkiy 2021-06-01 02:20:13 +03:00
parent cf7fde4b02
commit d691ecca03
No known key found for this signature in database
GPG key ID: D1DE6D7F693663A5
2 changed files with 36 additions and 19 deletions

View file

@ -34,31 +34,37 @@ let
qonlinetranslator = fetchFromGitHub { qonlinetranslator = fetchFromGitHub {
owner = "crow-translate"; owner = "crow-translate";
repo = "QOnlineTranslator"; repo = "QOnlineTranslator";
rev = "1.4.1"; rev = "1.4.4";
sha256 = "1c6a8mdxms5vh8l7shi2kqdhafbzm50pbz6g1hhgg6qslla0vfn0"; sha256 = "sha256-ogO6ovkQmyvTUPCYAQ4U3AxOju9r3zHB9COnAAfKSKA=";
}; };
circleflags = fetchFromGitHub { circleflags = fetchFromGitHub {
owner = "HatScripts"; owner = "HatScripts";
repo = "circle-flags"; repo = "circle-flags";
rev = "v2.0.0"; rev = "v2.1.0";
sha256 = "1xz5b6nhcxxzalcgwnw36npap71i70s50g6b63avjgjkwz1ys5j4"; sha256 = "sha256-E0iTDjicfdGqK4r+anUZanEII9SBafeEUcMLf7BGdp0=";
};
we10x = fetchFromGitHub {
owner = "yeyushengfan258";
repo = "We10X-icon-theme";
rev = "bd2c68482a06d38b2641503af1ca127b9e6540db";
sha256 = "sha256-T1oPstmjLffnVrIIlmTTpHv38nJHBBGJ070ilRwAjk8=";
}; };
in in
mkDerivation rec { mkDerivation rec {
pname = "crow-translate"; pname = "crow-translate";
version = "2.8.1"; version = "2.8.4";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "crow-translate"; owner = "crow-translate";
repo = "crow-translate"; repo = pname;
rev = version; rev = version;
sha256 = "sha256-fmlNUhNorV/MUdfdDXM6puAblTTa6p2slVT/EKy5THg="; sha256 = "sha256-TPJgKTZqsh18BQGFWgp0wsw1ehtI8ydQ7ZCvYNX6pH8=";
}; };
patches = [ patches = [
(substituteAll { (substituteAll {
src = ./dont-fetch-external-libs.patch; src = ./dont-fetch-external-libs.patch;
inherit singleapplication qtaskbarcontrol qhotkey qonlinetranslator circleflags; inherit singleapplication qtaskbarcontrol qhotkey qonlinetranslator circleflags we10x;
}) })
(substituteAll { (substituteAll {
# See https://github.com/NixOS/nixpkgs/issues/86054 # See https://github.com/NixOS/nixpkgs/issues/86054
@ -67,7 +73,10 @@ mkDerivation rec {
}) })
]; ];
postPatch = "cp -r ${circleflags}/flags/* data/icons"; postPatch = ''
cp -r ${circleflags}/flags/* data/icons
cp -r ${we10x}/src/* data/icons
'';
nativeBuildInputs = [ cmake extra-cmake-modules qttools ]; nativeBuildInputs = [ cmake extra-cmake-modules qttools ];

View file

@ -1,26 +1,28 @@
diff --git i/CMakeLists.txt w/CMakeLists.txt diff --git i/CMakeLists.txt w/CMakeLists.txt
index 2576203..26162a0 100644 index 0cd2140..16e3190 100644
--- i/CMakeLists.txt --- i/CMakeLists.txt
+++ w/CMakeLists.txt +++ w/CMakeLists.txt
@@ -91,12 +91,11 @@ qt5_add_translation(QM_FILES @@ -97,13 +97,11 @@ qt5_add_translation(QM_FILES
) )
configure_file(src/cmake.h.in cmake.h) 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/flags.qrc ${CircleFlags_SOURCE_DIR}/flags/flags.qrc COPYONLY)
-configure_file(data/icons/we10x.qrc ${We10X_SOURCE_DIR}/src/we10x.qrc COPYONLY)
add_executable(${PROJECT_NAME} add_executable(${PROJECT_NAME}
${QM_FILES}
data/icons/engines/engines.qrc
- ${CircleFlags_SOURCE_DIR}/flags/flags.qrc - ${CircleFlags_SOURCE_DIR}/flags/flags.qrc
+ data/icons/flags.qrc + data/icons/flags.qrc
${QM_FILES}
- ${We10X_SOURCE_DIR}/src/we10x.qrc
+ data/icons/we10x.qrc
data/icons/engines/engines.qrc
src/addlanguagedialog.cpp src/addlanguagedialog.cpp
src/addlanguagedialog.ui src/addlanguagedialog.ui
src/cli.cpp
diff --git i/cmake/ExternalLibraries.cmake w/cmake/ExternalLibraries.cmake diff --git i/cmake/ExternalLibraries.cmake w/cmake/ExternalLibraries.cmake
index 21eba0a..b613d3e 100644 index d738716..fb01f3d 100644
--- i/cmake/ExternalLibraries.cmake --- i/cmake/ExternalLibraries.cmake
+++ w/cmake/ExternalLibraries.cmake +++ w/cmake/ExternalLibraries.cmake
@@ -2,29 +2,24 @@ include(FetchContent) @@ -2,34 +2,28 @@ include(FetchContent)
set(QAPPLICATION_CLASS QApplication) set(QAPPLICATION_CLASS QApplication)
FetchContent_Declare(SingleApplication FetchContent_Declare(SingleApplication
@ -44,14 +46,20 @@ index 21eba0a..b613d3e 100644
FetchContent_Declare(QOnlineTranslator FetchContent_Declare(QOnlineTranslator
- GIT_REPOSITORY https://github.com/crow-translate/QOnlineTranslator - GIT_REPOSITORY https://github.com/crow-translate/QOnlineTranslator
- GIT_TAG 1.4.1 - GIT_TAG 1.4.4
+ SOURCE_DIR @qonlinetranslator@ + SOURCE_DIR @qonlinetranslator@
) )
FetchContent_Declare(CircleFlags FetchContent_Declare(CircleFlags
- GIT_REPOSITORY https://github.com/HatScripts/circle-flags - GIT_REPOSITORY https://github.com/HatScripts/circle-flags
- GIT_TAG v2.0.0 - GIT_TAG v2.1.0
+ SOURCE_DIR @circleflags@ + SOURCE_DIR @circleflags@
) )
FetchContent_MakeAvailable(SingleApplication QTaskbarControl QHotkey QOnlineTranslator CircleFlags) FetchContent_Declare(We10X
- GIT_REPOSITORY https://github.com/yeyushengfan258/We10X-icon-theme
- GIT_TAG bd2c68482a06d38b2641503af1ca127b9e6540db
+ SOURCE_DIR @we10x@
)
FetchContent_MakeAvailable(SingleApplication QTaskbarControl QHotkey QOnlineTranslator CircleFlags We10X)