From 0efd18746abd338d670ab82fa0d9e5411fd53329 Mon Sep 17 00:00:00 2001 From: Ram Kromberg Date: Tue, 5 Jul 2016 13:58:26 +0300 Subject: [PATCH] sigil: 0.7.4 > 0.9.6 --- pkgs/applications/editors/sigil/default.nix | 71 +++++++-------------- 1 file changed, 23 insertions(+), 48 deletions(-) diff --git a/pkgs/applications/editors/sigil/default.nix b/pkgs/applications/editors/sigil/default.nix index ad6f599a361..ed72043d723 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 ]; }; }