anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / applications / misc / nixnote2 / default.nix
blobd6d0775f78d21a936e49c0b0184225a475dace73
1 { lib, mkDerivation, fetchFromGitHub, boost
2 , qtbase, qtwebkit, poppler, qmake, hunspell, html-tidy}:
4 mkDerivation rec {
5   pname = "nixnote2";
6   version = "2.0.2";
8   src = fetchFromGitHub {
9     owner = "baumgarr";
10     repo = "nixnote2";
11     rev = "v${version}";
12     sha256 = "0cfq95mxvcgby66r61gclm1a2c6zck5aln04xmg2q8kg6p9d31fr";
13   };
15   buildInputs = [ boost qtbase qtwebkit poppler hunspell ];
17   nativeBuildInputs = [ qmake ];
19   postPatch = ''
20     # Fix location of poppler-qt5.h
21     for f in threads/indexrunner.cpp html/noteformatter.cpp utilities/noteindexer.cpp gui/plugins/popplerviewer.h gui/plugins/pluginfactory.h gui/plugins/popplerviewer.cpp ; do
22       substituteInPlace $f \
23         --replace '#include <poppler-qt5.h>' '#include <poppler/qt5/poppler-qt5.h>'
24     done
26     substituteInPlace help/about.html --replace '__VERSION__' '${version}'
28     substituteInPlace nixnote.cpp --replace 'tidyProcess.start("tidy' 'tidyProcess.start("${html-tidy}/bin/tidy'
29   '';
31   postInstall = ''
32     cp images/windowIcon.png $out/share/pixmaps/nixnote2.png
33     cp theme.ini $out/share/nixnote2/theme.ini
34   '';
36   meta = with lib; {
37     description = "Unofficial client of Evernote";
38     homepage = "http://www.nixnote.org/";
39     license = licenses.gpl2Plus;
40     maintainers = with maintainers; [ htr ];
41     platforms = platforms.linux;
42   };