summary refs log tree commit diff
path: root/pkgs/applications/editors/sigil
diff options
context:
space:
mode:
authorRam Kromberg <ramkromberg@mail.com>2016-07-05 13:58:26 +0300
committerBjørn Forsman <bjorn.forsman@gmail.com>2016-07-05 13:28:05 +0200
commit0efd18746abd338d670ab82fa0d9e5411fd53329 (patch)
tree7f440665d8a39916dccd8fe635d096369cfc6062 /pkgs/applications/editors/sigil
parentf8560212ca3e18297b23c5fc8a08610f4440355b (diff)
downloadnixlib-0efd18746abd338d670ab82fa0d9e5411fd53329.tar
nixlib-0efd18746abd338d670ab82fa0d9e5411fd53329.tar.gz
nixlib-0efd18746abd338d670ab82fa0d9e5411fd53329.tar.bz2
nixlib-0efd18746abd338d670ab82fa0d9e5411fd53329.tar.lz
nixlib-0efd18746abd338d670ab82fa0d9e5411fd53329.tar.xz
nixlib-0efd18746abd338d670ab82fa0d9e5411fd53329.tar.zst
nixlib-0efd18746abd338d670ab82fa0d9e5411fd53329.zip
sigil: 0.7.4 > 0.9.6
Diffstat (limited to 'pkgs/applications/editors/sigil')
-rw-r--r--pkgs/applications/editors/sigil/default.nix71
1 files changed, 23 insertions, 48 deletions
diff --git a/pkgs/applications/editors/sigil/default.nix b/pkgs/applications/editors/sigil/default.nix
index ad6f599a3617..ed72043d7239 100644
--- a/pkgs/applications/editors/sigil/default.nix
+++ b/pkgs/applications/editors/sigil/default.nix
@@ -1,67 +1,42 @@
-{ stdenv, fetchurl, unzip, cmake, pkgconfig, makeWrapper
-, hunspell, minizip, boost, xercesc
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, makeWrapper
+, boost, xercesc
 , qtbase, qttools, qtwebkit, qtxmlpatterns
+, python3, python3Packages
 }:
 
-let
-  version = "0.7.4";
-
-in
-
 stdenv.mkDerivation rec {
   name = "sigil-${version}";
+  version = "0.9.6";
 
-  src = fetchurl {
-    url = "https://sigil.googlecode.com/files/Sigil-${version}-Code.zip";
-    sha256 = "68c7ca15ea8611921af0c435369563f55c6afd2ef1fb0945cf6c4a47429b0fb5";
+  src = fetchFromGitHub {
+    sha256 = "0hihd5f3avpdvxwp5j80qdg74zbw7p20y6j9q8cw7wd0bak58h9c";
+    rev = version;
+    repo = "Sigil";
+    owner = "Sigil-Ebook";
   };
 
+  pythonPath = with python3Packages; [ lxml ];
+
+  propagatedBuildInputs = with python3Packages; [ lxml ];
+
   buildInputs = [
-    unzip cmake pkgconfig
-    hunspell minizip boost xercesc qtbase qttools qtwebkit qtxmlpatterns
+    cmake pkgconfig
+    boost xercesc qtbase qttools qtwebkit qtxmlpatterns
+    python3 python3Packages.lxml makeWrapper
   ];
 
-  # XXX: the compiler seems to treat the .h file inappropriately:
-  #
-  #    COMMAND ${CMAKE_CXX_COMPILER} ${compile_flags} \
-  #            ${CMAKE_CURRENT_SOURCE_DIR}/${header_name}.h \
-  #           -o ${header_name}.h.gch
-  #
-  #  but using -c or -x c++-header seems to work:
-  #
-  #    COMMAND ${CMAKE_CXX_COMPILER} ${compile_flags} \
-  #            -c ${CMAKE_CURRENT_SOURCE_DIR}/${header_name}.h \
-  #            -o ${header_name}.h.gch
-  #
-  #    COMMAND ${CMAKE_CXX_COMPILER} ${compile_flags} \
-  #            -x c++-header ${CMAKE_CURRENT_SOURCE_DIR}/${header_name}.h \
-  #            -o ${header_name}.h.gch
-  #
-  # Might be related to:
-  #
-  #   http://permalink.gmane.org/gmane.comp.gcc.bugs/361195
-  buildCommand = ''
-    mkdir -pv $out
-    mkdir -pv ${name}/src ${name}/build ${name}/run
-    cd ${name}/src
-    unzip -n ${src}
-    sed -i \
-        -e 's|\(COMMAND\) \([^ ]\+\) \([^ ]\+\) \(.*\)|\1 \2 \3 -c \4|' \
-        cmake_extras/CustomPCH.cmake
-    cd ../build
-    cmake -G "Unix Makefiles" \
-        -DCMAKE_INSTALL_PREFIX=$out \
-        -DCMAKE_BUILD_TYPE=Release \
-        -DCMAKE_SKIP_BUILD_RPATH=ON \
-        ../src
-    make
-    make install
+  preFixup = ''
+    wrapProgram "$out/bin/sigil" \
+       --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3Packages.lxml})
   '';
 
+  enableParallelBuilding = true;
+
   meta = {
     description = "Free, open source, multi-platform ebook (ePub) editor";
-    homepage = https://code.google.com/p/sigil/;
+    homepage = https://github.com/Sigil-Ebook/Sigil/;
     license = stdenv.lib.licenses.gpl3;
     inherit version;
+    maintainers = with stdenv.lib.maintainers; [ ramkromberg ];
   };
 }