huggle: init at 3.4.10
This commit is contained in:
parent
f59dde3239
commit
075649e87c
4 changed files with 103 additions and 0 deletions
25
pkgs/applications/misc/huggle/00-remove-third-party.patch
Normal file
25
pkgs/applications/misc/huggle/00-remove-third-party.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index a37976e..5669366 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -59,16 +59,12 @@ if(NOT MINGW AND WIN32)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/Debug)
|
||||
endif()
|
||||
|
||||
-add_subdirectory(3rd/libirc/libirc libirc)
|
||||
-add_subdirectory(3rd/libirc/libircclient libircclient)
|
||||
+include_directories(@libirc_includes@)
|
||||
|
||||
# YAML
|
||||
-option(YAML_CPP_BUILD_TOOLS "Disable tests" OFF)
|
||||
-option(YAML_CPP_BUILD_TESTS "Enable testing" OFF)
|
||||
-option(YAML_CPP_BUILD_TOOLS "Enable parse tools" OFF)
|
||||
-option(BUILD_SHARED_LIBS "Build as shared" ON)
|
||||
-include_directories("3rd/yaml-cpp/include/")
|
||||
-add_subdirectory(3rd/yaml-cpp)
|
||||
+find_package(YAML-CPP 0.6.3 QUIET)
|
||||
+include_directories(YAML_CPP_INCLUDE_DIR)
|
||||
+
|
||||
if (HUGGLE_EXT)
|
||||
if(NOT MINGW AND WIN32)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/Release/extensions)
|
13
pkgs/applications/misc/huggle/01-extensions.patch
Normal file
13
pkgs/applications/misc/huggle/01-extensions.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/huggle_core/definitions_prod.hpp b/src/huggle_core/definitions_prod.hpp
|
||||
index 1fc5b1fb..17881ade 100644
|
||||
--- a/src/huggle_core/definitions_prod.hpp
|
||||
+++ b/src/huggle_core/definitions_prod.hpp
|
||||
@@ -216,7 +216,7 @@ namespace std { typedef decltype(nullptr) nullptr_t; }
|
||||
#define HUGGLE_GLOBAL_EXTENSION_PATH QCoreApplication::applicationDirPath() + "/extensions"
|
||||
#elif defined __linux__
|
||||
#define HUGGLE_UPDATER_PLATFORM_TYPE "linux"
|
||||
- #define HUGGLE_GLOBAL_EXTENSION_PATH "/usr/local/share/huggle/extensions"
|
||||
+ #define HUGGLE_GLOBAL_EXTENSION_PATH "@out@/share/huggle/extensions"
|
||||
#elif defined HUGGLE_WIN
|
||||
// This is needed by yaml cpp library, otherwise it won't build with MSVC
|
||||
#define YAML_CPP_DLL
|
63
pkgs/applications/misc/huggle/default.nix
Normal file
63
pkgs/applications/misc/huggle/default.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, ncurses
|
||||
, which
|
||||
, cmake
|
||||
, unzip
|
||||
, wrapQtAppsHook
|
||||
, qtwebengine
|
||||
, libyamlcpp
|
||||
, libirc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "huggle";
|
||||
version = "3.4.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "huggle";
|
||||
repo = "huggle3-qt-lx";
|
||||
rev = version;
|
||||
sha256 = "UzoX4kdzYU50W0MUhfpo0HaSfvG3eINNC8u5t/gKuqI=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapQtAppsHook
|
||||
pkg-config
|
||||
which
|
||||
cmake
|
||||
];
|
||||
buildInputs = [ ncurses libyamlcpp qtwebengine libirc ];
|
||||
|
||||
patches = [ ./00-remove-third-party.patch ./01-extensions.patch ];
|
||||
postPatch = ''
|
||||
rm -r src/3rd
|
||||
echo ${version} > src/huggle_core/version.txt
|
||||
substituteInPlace src/huggle_core/definitions_prod.hpp --subst-var out
|
||||
substituteInPlace src/CMakeLists.txt --replace '@libirc_includes@' '${libirc.out}'
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-S" "/build/source/src"
|
||||
"-DCMAKE_BUILD_TYPE=None"
|
||||
"-DINSTALL_DATA_DIR=bin"
|
||||
"-DQT5_BUILD=ON"
|
||||
"-DWEB_ENGINE=ON"
|
||||
"-DBUILD_SHARED_LIBS=OFF"
|
||||
"-Wno-dev"
|
||||
"-DHUGGLE_EXT=TRUE"
|
||||
];
|
||||
|
||||
installTargets = [ "install" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Anti-vandalism tool for use on MediaWiki-based projects";
|
||||
homepage = "https://github.com/huggle/huggle3-qt-lx";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = [ maintainers.fee1-dead ];
|
||||
platforms = platforms.x86_64;
|
||||
};
|
||||
}
|
|
@ -28929,6 +28929,8 @@ with pkgs;
|
|||
|
||||
haunt = callPackage ../applications/misc/haunt { };
|
||||
|
||||
huggle = libsForQt5.callPackage ../applications/misc/huggle {};
|
||||
|
||||
hugo = callPackage ../applications/misc/hugo {
|
||||
buildGoModule = buildGo119Module;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue