1{
2 stdenv,
3 mkDerivation,
4 lib,
5 fetchurl,
6 cmake,
7 pkg-config,
8 makeWrapper,
9 httrack,
10 qtbase,
11 qtmultimedia,
12}:
13
14mkDerivation rec {
15 pname = "httraqt";
16 version = "1.4.9";
17
18 src = fetchurl {
19 url = "mirror://sourceforge/httraqt/${pname}-${version}.tar.gz";
20 sha256 = "0pjxqnqchpbla4xiq4rklc06484n46cpahnjy03n9rghwwcad25b";
21 };
22
23 buildInputs = [
24 httrack
25 qtbase
26 qtmultimedia
27 ];
28
29 nativeBuildInputs = [
30 cmake
31 makeWrapper
32 pkg-config
33 ];
34
35 prePatch = ''
36 substituteInPlace cmake/HTTRAQTFindHttrack.cmake \
37 --replace /usr/include/httrack/ ${httrack}/include/httrack/
38
39 substituteInPlace distribution/posix/CMakeLists.txt \
40 --replace /usr/share $out/share
41
42 substituteInPlace desktop/httraqt.desktop \
43 --replace Exec=httraqt Exec=$out/bin/httraqt
44
45 substituteInPlace sources/main/httraqt.cpp \
46 --replace /usr/share/httraqt/ $out/share/httraqt
47 '';
48
49 meta = with lib; {
50 broken = stdenv.hostPlatform.isDarwin;
51 description = "Easy-to-use offline browser / website mirroring utility - QT frontend";
52 mainProgram = "httraqt";
53 homepage = "http://www.httrack.com";
54 license = licenses.gpl3;
55 maintainers = with maintainers; [ peterhoeg ];
56 platforms = with platforms; unix;
57 };
58}