tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
huggle: init at 3.4.10
Deadbeef
3 years ago
075649e8
f59dde32
+103
4 changed files
expand all
collapse all
unified
split
pkgs
applications
misc
huggle
00-remove-third-party.patch
01-extensions.patch
default.nix
top-level
all-packages.nix
+25
pkgs/applications/misc/huggle/00-remove-third-party.patch
···
1
1
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
2
2
+
index a37976e..5669366 100644
3
3
+
--- a/src/CMakeLists.txt
4
4
+
+++ b/src/CMakeLists.txt
5
5
+
@@ -59,16 +59,12 @@ if(NOT MINGW AND WIN32)
6
6
+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/Debug)
7
7
+
endif()
8
8
+
9
9
+
-add_subdirectory(3rd/libirc/libirc libirc)
10
10
+
-add_subdirectory(3rd/libirc/libircclient libircclient)
11
11
+
+include_directories(@libirc_includes@)
12
12
+
13
13
+
# YAML
14
14
+
-option(YAML_CPP_BUILD_TOOLS "Disable tests" OFF)
15
15
+
-option(YAML_CPP_BUILD_TESTS "Enable testing" OFF)
16
16
+
-option(YAML_CPP_BUILD_TOOLS "Enable parse tools" OFF)
17
17
+
-option(BUILD_SHARED_LIBS "Build as shared" ON)
18
18
+
-include_directories("3rd/yaml-cpp/include/")
19
19
+
-add_subdirectory(3rd/yaml-cpp)
20
20
+
+find_package(YAML-CPP 0.6.3 QUIET)
21
21
+
+include_directories(YAML_CPP_INCLUDE_DIR)
22
22
+
+
23
23
+
if (HUGGLE_EXT)
24
24
+
if(NOT MINGW AND WIN32)
25
25
+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/Release/extensions)
+13
pkgs/applications/misc/huggle/01-extensions.patch
···
1
1
+
diff --git a/src/huggle_core/definitions_prod.hpp b/src/huggle_core/definitions_prod.hpp
2
2
+
index 1fc5b1fb..17881ade 100644
3
3
+
--- a/src/huggle_core/definitions_prod.hpp
4
4
+
+++ b/src/huggle_core/definitions_prod.hpp
5
5
+
@@ -216,7 +216,7 @@ namespace std { typedef decltype(nullptr) nullptr_t; }
6
6
+
#define HUGGLE_GLOBAL_EXTENSION_PATH QCoreApplication::applicationDirPath() + "/extensions"
7
7
+
#elif defined __linux__
8
8
+
#define HUGGLE_UPDATER_PLATFORM_TYPE "linux"
9
9
+
- #define HUGGLE_GLOBAL_EXTENSION_PATH "/usr/local/share/huggle/extensions"
10
10
+
+ #define HUGGLE_GLOBAL_EXTENSION_PATH "@out@/share/huggle/extensions"
11
11
+
#elif defined HUGGLE_WIN
12
12
+
// This is needed by yaml cpp library, otherwise it won't build with MSVC
13
13
+
#define YAML_CPP_DLL
+63
pkgs/applications/misc/huggle/default.nix
···
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, fetchFromGitHub
4
4
+
, pkg-config
5
5
+
, ncurses
6
6
+
, which
7
7
+
, cmake
8
8
+
, unzip
9
9
+
, wrapQtAppsHook
10
10
+
, qtwebengine
11
11
+
, libyamlcpp
12
12
+
, libirc
13
13
+
}:
14
14
+
15
15
+
stdenv.mkDerivation rec {
16
16
+
pname = "huggle";
17
17
+
version = "3.4.10";
18
18
+
19
19
+
src = fetchFromGitHub {
20
20
+
owner = "huggle";
21
21
+
repo = "huggle3-qt-lx";
22
22
+
rev = version;
23
23
+
sha256 = "UzoX4kdzYU50W0MUhfpo0HaSfvG3eINNC8u5t/gKuqI=";
24
24
+
fetchSubmodules = true;
25
25
+
};
26
26
+
27
27
+
nativeBuildInputs = [
28
28
+
wrapQtAppsHook
29
29
+
pkg-config
30
30
+
which
31
31
+
cmake
32
32
+
];
33
33
+
buildInputs = [ ncurses libyamlcpp qtwebengine libirc ];
34
34
+
35
35
+
patches = [ ./00-remove-third-party.patch ./01-extensions.patch ];
36
36
+
postPatch = ''
37
37
+
rm -r src/3rd
38
38
+
echo ${version} > src/huggle_core/version.txt
39
39
+
substituteInPlace src/huggle_core/definitions_prod.hpp --subst-var out
40
40
+
substituteInPlace src/CMakeLists.txt --replace '@libirc_includes@' '${libirc.out}'
41
41
+
'';
42
42
+
43
43
+
cmakeFlags = [
44
44
+
"-S" "/build/source/src"
45
45
+
"-DCMAKE_BUILD_TYPE=None"
46
46
+
"-DINSTALL_DATA_DIR=bin"
47
47
+
"-DQT5_BUILD=ON"
48
48
+
"-DWEB_ENGINE=ON"
49
49
+
"-DBUILD_SHARED_LIBS=OFF"
50
50
+
"-Wno-dev"
51
51
+
"-DHUGGLE_EXT=TRUE"
52
52
+
];
53
53
+
54
54
+
installTargets = [ "install" ];
55
55
+
56
56
+
meta = with lib; {
57
57
+
description = "Anti-vandalism tool for use on MediaWiki-based projects";
58
58
+
homepage = "https://github.com/huggle/huggle3-qt-lx";
59
59
+
license = licenses.gpl3Only;
60
60
+
maintainers = [ maintainers.fee1-dead ];
61
61
+
platforms = platforms.x86_64;
62
62
+
};
63
63
+
}
+2
pkgs/top-level/all-packages.nix
···
28929
28929
28930
28930
haunt = callPackage ../applications/misc/haunt { };
28931
28931
28932
28932
+
huggle = libsForQt5.callPackage ../applications/misc/huggle {};
28933
28933
+
28932
28934
hugo = callPackage ../applications/misc/hugo {
28933
28935
buildGoModule = buildGo119Module;
28934
28936
};