about summary refs log tree commit diff
path: root/pkgs/development/libraries/libe-book
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2021-12-21 12:55:59 +0100
committerFelix Buehler <account@buehler.rocks>2021-12-21 12:55:59 +0100
commit56a6947ebd4a06b7609b0ebb0b818e51ff0b155a (patch)
treedae1f90c23bcdadd139e81ccd9c995948ae571df /pkgs/development/libraries/libe-book
parent459f9fe2bea3546a95002dcfe2aa55b1e4d6bef9 (diff)
libe-book: refactor
Diffstat (limited to 'pkgs/development/libraries/libe-book')
-rw-r--r--pkgs/development/libraries/libe-book/default.nix56
-rw-r--r--pkgs/development/libraries/libe-book/default.upstream4
2 files changed, 30 insertions, 30 deletions
diff --git a/pkgs/development/libraries/libe-book/default.nix b/pkgs/development/libraries/libe-book/default.nix
index f467a01ea7ab5..b3a1cab066e4a 100644
--- a/pkgs/development/libraries/libe-book/default.nix
+++ b/pkgs/development/libraries/libe-book/default.nix
@@ -1,41 +1,45 @@
-{ lib, stdenv, fetchurl, gperf, pkg-config, librevenge, libxml2, boost, icu
-, cppunit, zlib, liblangtag
+{ lib
+, stdenv
+, fetchurl
+, gperf
+, pkg-config
+, librevenge
+, libxml2
+, boost
+, icu
+, cppunit
+, zlib
+, liblangtag
 }:
 
-let
-  s = # Generated upstream information
-  rec {
-    baseName="libe-book";
-    version="0.1.3";
-    name="${baseName}-${version}";
-    hash="1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by";
-    url="https://kent.dl.sourceforge.net/project/libebook/libe-book-0.1.3/libe-book-0.1.3.tar.xz";
-    sha256="1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by";
+stdenv.mkDerivation rec {
+  pname = "libe-book";
+  version = "0.1.3";
+  src = fetchurl {
+    url = "https://kent.dl.sourceforge.net/project/libebook/libe-book-${version}/libe-book-${version}.tar.xz";
+    sha256 = "sha256-fo2P808ngxrKO8b5zFMsL5DSBXx3iWO4hP89HjTf4fk=";
   };
-
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [
-    gperf librevenge libxml2 boost icu cppunit zlib liblangtag
+    gperf
+    librevenge
+    libxml2
+    boost
+    icu
+    cppunit
+    zlib
+    liblangtag
   ];
-
   # Boost 1.59 compatability fix
   # Attempt removing when updating
   postPatch = ''
     sed -i 's,^CPPFLAGS.*,\0 -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED,' src/lib/Makefile.in
   '';
-in
-stdenv.mkDerivation {
-  inherit (s) name version;
-  inherit nativeBuildInputs buildInputs postPatch;
-  src = fetchurl {
-    inherit (s) url sha256;
-  };
   NIX_CFLAGS_COMPILE = "-Wno-error=unused-function";
-  meta = {
-    inherit (s) version;
+  meta = with lib; {
     description = "Library for import of reflowable e-book formats";
-    license = lib.licenses.lgpl21Plus ;
-    maintainers = [lib.maintainers.raskin];
-    platforms = lib.platforms.unix;
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/libe-book/default.upstream b/pkgs/development/libraries/libe-book/default.upstream
deleted file mode 100644
index a06a9af99bb44..0000000000000
--- a/pkgs/development/libraries/libe-book/default.upstream
+++ /dev/null
@@ -1,4 +0,0 @@
-url https://sourceforge.net/projects/libebook/files/
-SF_version_dir libe-book-
-version_link '[.]tar.xz/download$'
-SF_redirect