about summary refs log tree commit diff
path: root/pkgs/applications/misc/qpdfview/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/qpdfview/default.nix')
-rw-r--r--pkgs/applications/misc/qpdfview/default.nix62
1 files changed, 35 insertions, 27 deletions
diff --git a/pkgs/applications/misc/qpdfview/default.nix b/pkgs/applications/misc/qpdfview/default.nix
index 954c17097618d..db5995149c082 100644
--- a/pkgs/applications/misc/qpdfview/default.nix
+++ b/pkgs/applications/misc/qpdfview/default.nix
@@ -1,30 +1,40 @@
-{lib, mkDerivation, fetchurl, qmake, qtbase, qtsvg, pkg-config, poppler, djvulibre, libspectre, cups
-, file, ghostscript
+{ lib
+, mkDerivation
+, fetchurl
+, qmake
+, qtbase
+, qtsvg
+, pkg-config
+, poppler
+, djvulibre
+, libspectre
+, cups
+, file
+, ghostscript
 }:
-let
-  s = # Generated upstream information
-  rec {
-    baseName="qpdfview";
-    version = "0.4.18";
-    name="${baseName}-${version}";
-    url="https://launchpad.net/qpdfview/trunk/${version}/+download/qpdfview-${version}.tar.gz";
+mkDerivation rec {
+  pname = "qpdfview";
+  version = "0.4.18";
+
+  src = fetchurl {
+    url = "https://launchpad.net/qpdfview/trunk/${version}/+download/qpdfview-${version}.tar.gz";
     sha256 = "0v1rl126hvblajnph2hkansgi0s8vjdc5yxrm4y3faa0lxzjwr6c";
   };
-  nativeBuildInputs = [ qmake pkg-config ];
-  buildInputs = [
-    qtbase qtsvg poppler djvulibre libspectre cups file ghostscript
-  ];
+
   # apply upstream fix for qt5.15 https://bazaar.launchpad.net/~adamreichold/qpdfview/trunk/revision/2104
   patches = [ ./qpdfview-qt515-compat.patch ];
-in
-mkDerivation {
-  pname = s.baseName;
-  inherit (s) version;
-  inherit nativeBuildInputs buildInputs patches;
-  src = fetchurl {
-    inherit (s) url sha256;
-  };
 
+  nativeBuildInputs = [ qmake pkg-config ];
+  buildInputs = [
+    qtbase
+    qtsvg
+    poppler
+    djvulibre
+    libspectre
+    cups
+    file
+    ghostscript
+  ];
   preConfigure = ''
     qmakeFlags+=(*.pro)
   '';
@@ -39,13 +49,11 @@ mkDerivation {
     "APPDATA_INSTALL_PATH=${placeholder "out"}/share/appdata"
   ];
 
-  meta = {
-    inherit (s) version;
+  meta = with lib; {
     description = "A tabbed document viewer";
-    license = lib.licenses.gpl2Plus;
-    maintainers = [lib.maintainers.raskin];
-    platforms = lib.platforms.linux;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
     homepage = "https://launchpad.net/qpdfview";
-    updateWalker = true;
   };
 }