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