summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2022-01-13 00:22:37 +0100
committerFelix Buehler <account@buehler.rocks>2022-01-13 00:22:37 +0100
commitebbbd421406fdd926f2e8b1333f90bb46a597a64 (patch)
tree9c48f1eb15a294213c2c431d7885533ca7cb8197
parenttree-sitter updater: use GITHUB_TOKEN if present (diff)
downloadnixpkgs-ebbbd421406fdd926f2e8b1333f90bb46a597a64.tar.gz
qpdfview: refactor
-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 954c17097618..db5995149c08 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;
};
}