libe-book: refactor

+30 -30
+30 -26
pkgs/development/libraries/libe-book/default.nix
··· 1 - { lib, stdenv, fetchurl, gperf, pkg-config, librevenge, libxml2, boost, icu 2 - , cppunit, zlib, liblangtag 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , gperf 5 + , pkg-config 6 + , librevenge 7 + , libxml2 8 + , boost 9 + , icu 10 + , cppunit 11 + , zlib 12 + , liblangtag 3 13 }: 4 14 5 - let 6 - s = # Generated upstream information 7 - rec { 8 - baseName="libe-book"; 9 - version="0.1.3"; 10 - name="${baseName}-${version}"; 11 - hash="1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by"; 12 - url="https://kent.dl.sourceforge.net/project/libebook/libe-book-0.1.3/libe-book-0.1.3.tar.xz"; 13 - sha256="1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by"; 15 + stdenv.mkDerivation rec { 16 + pname = "libe-book"; 17 + version = "0.1.3"; 18 + src = fetchurl { 19 + url = "https://kent.dl.sourceforge.net/project/libebook/libe-book-${version}/libe-book-${version}.tar.xz"; 20 + sha256 = "sha256-fo2P808ngxrKO8b5zFMsL5DSBXx3iWO4hP89HjTf4fk="; 14 21 }; 15 - 16 22 nativeBuildInputs = [ pkg-config ]; 17 23 buildInputs = [ 18 - gperf librevenge libxml2 boost icu cppunit zlib liblangtag 24 + gperf 25 + librevenge 26 + libxml2 27 + boost 28 + icu 29 + cppunit 30 + zlib 31 + liblangtag 19 32 ]; 20 - 21 33 # Boost 1.59 compatability fix 22 34 # Attempt removing when updating 23 35 postPatch = '' 24 36 sed -i 's,^CPPFLAGS.*,\0 -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED,' src/lib/Makefile.in 25 37 ''; 26 - in 27 - stdenv.mkDerivation { 28 - inherit (s) name version; 29 - inherit nativeBuildInputs buildInputs postPatch; 30 - src = fetchurl { 31 - inherit (s) url sha256; 32 - }; 33 38 NIX_CFLAGS_COMPILE = "-Wno-error=unused-function"; 34 - meta = { 35 - inherit (s) version; 39 + meta = with lib; { 36 40 description = "Library for import of reflowable e-book formats"; 37 - license = lib.licenses.lgpl21Plus ; 38 - maintainers = [lib.maintainers.raskin]; 39 - platforms = lib.platforms.unix; 41 + license = licenses.lgpl21Plus; 42 + maintainers = with maintainers; [ raskin ]; 43 + platforms = platforms.unix; 40 44 }; 41 45 }
-4
pkgs/development/libraries/libe-book/default.upstream
··· 1 - url https://sourceforge.net/projects/libebook/files/ 2 - SF_version_dir libe-book- 3 - version_link '[.]tar.xz/download$' 4 - SF_redirect