vuls: init at 0.27.0 (#348530)
[NixPkgs.git] / pkgs / applications / misc / huggle / default.nix
blob381804c2b8ded4458257f44dcc3c7b3bd7cda95f
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , pkg-config
5 , ncurses
6 , which
7 , cmake
8 , wrapQtAppsHook
9 , qtwebengine
10 , yaml-cpp
11 , libirc
14 stdenv.mkDerivation rec {
15   pname = "huggle";
16   version = "3.4.12";
18   src = fetchFromGitHub {
19     owner = "huggle";
20     repo = "huggle3-qt-lx";
21     rev = version;
22     sha256 = "scNGmMVZ6z9FTQuZCdwRYk0WP5qKfdb/M9Co8TbiMDE=";
23     fetchSubmodules = true;
24   };
26   nativeBuildInputs = [
27     wrapQtAppsHook
28     pkg-config
29     which
30     cmake
31   ];
32   buildInputs = [ ncurses yaml-cpp qtwebengine libirc ];
34   patches = [ ./00-remove-third-party.patch ./01-extensions.patch ];
35   postPatch = ''
36     rm -r src/3rd
37     echo ${version} > src/huggle_core/version.txt
38     substituteInPlace src/huggle_core/definitions_prod.hpp --subst-var out
39     substituteInPlace src/CMakeLists.txt --replace '@libirc_includes@' '${libirc.out}'
40   '';
42   cmakeBuildType = "None";
44   cmakeFlags = [
45     "-S" "/build/source/src"
46     "-DINSTALL_DATA_DIR=bin"
47     "-DQT5_BUILD=ON"
48     "-DWEB_ENGINE=ON"
49     "-DBUILD_SHARED_LIBS=OFF"
50     "-Wno-dev"
51     "-DHUGGLE_EXT=TRUE"
52   ];
54   installTargets = [ "install" ];
56   meta = with lib; {
57     description = "Anti-vandalism tool for use on MediaWiki-based projects";
58     mainProgram = "huggle";
59     homepage = "https://github.com/huggle/huggle3-qt-lx";
60     license = licenses.gpl3Only;
61     maintainers = [ maintainers.fee1-dead ];
62     platforms = platforms.x86_64;
63   };