diff --git a/pkgs/applications/misc/coolreader/default.nix b/pkgs/applications/misc/coolreader/default.nix new file mode 100644 index 00000000000..c3efed72cb0 --- /dev/null +++ b/pkgs/applications/misc/coolreader/default.nix @@ -0,0 +1,26 @@ +{ mkDerivation, fetchFromGitHub, cmake, pkg-config, lib, + qttools, fribidi, libunibreak }: + +mkDerivation rec { + pname = "coolreader"; + version = "3.2.45"; + + src = fetchFromGitHub { + owner = "buggins"; + repo = pname; + rev = "cr${version}"; + sha256 = "0nkk4d0j04yjwanjszq8h8hvx87rnwax2k6akm4bpjxwpcs4icws"; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ qttools fribidi libunibreak ]; + + meta = with lib; { + homepage = "https://github.com/buggins/coolreader"; + description = "Cross platform open source e-book reader"; + license = licenses.gpl2Plus; # see https://github.com/buggins/coolreader/issues/80 + maintainers = with maintainers; [ gebner ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/libraries/libunibreak/default.nix b/pkgs/development/libraries/libunibreak/default.nix index 5b549176889..8c6650df3cb 100644 --- a/pkgs/development/libraries/libunibreak/default.nix +++ b/pkgs/development/libraries/libunibreak/default.nix @@ -1,17 +1,23 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchFromGitHub, autoreconfHook }: stdenv.mkDerivation rec { pname = "libunibreak"; - version = "1.1"; + version = "4.3"; - src = fetchurl { - url = "mirror://sourceforge/vimgadgets/libunibreak/${version}/${pname}-${version}.tar.gz"; - sha256 = "02657l426bk5d8h42b9ixxy1clc50mx4bzwg02nkdhs09wqw32wn"; + src = let + rev_version = stdenv.lib.replaceStrings ["-"] ["_"] version; + in fetchFromGitHub { + owner = "adah1972"; + repo = pname; + rev = "libunibreak_${rev_version}"; + sha256 = "19g3ixs1ycisfdnzd8v7j5r49h0x0hshchk9qwlz4i0mjv825plx"; }; + nativeBuildInputs = [ autoreconfHook ]; + meta = with stdenv.lib; { - homepage = "http://vimgadgets.sourceforge.net/libunibreak/"; - description = "A library implementing a line breaking algorithm as described in Unicode 6.0.0 Standard"; + homepage = "https://github.com/adah1972/libunibreak"; + description = "Implementation of line breaking and word breaking algorithms as in the Unicode standard"; license = licenses.zlib; platforms = platforms.unix; maintainers = [ maintainers.coroa ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9a7b46726fa..53610bb26cf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -937,6 +937,8 @@ in codespell = with python3Packages; toPythonApplication codespell; + coolreader = libsForQt5.callPackage ../applications/misc/coolreader {}; + cozy = callPackage ../applications/audio/cozy-audiobooks { }; ctrtool = callPackage ../tools/archivers/ctrtool { };