2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config, pcre, libxkbcommon, epoxy
|
2017-06-04 11:00:09 +01:00
|
|
|
, gtk3, poppler, freetype, libpthreadstubs, libXdmcp, libxshmfence, wrapGAppsHook
|
2015-06-05 09:48:37 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-01-22 19:25:16 +00:00
|
|
|
version = "0.1.5";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "apvlv";
|
2015-06-05 09:48:37 +01:00
|
|
|
|
2017-01-22 19:25:16 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "naihe2010";
|
|
|
|
repo = "apvlv";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1n4xiic8lqnv3mqi7wpdv866gyyakax71gffv3n9427rmcld465i";
|
2015-06-05 09:48:37 +01:00
|
|
|
};
|
|
|
|
|
2017-01-22 19:25:16 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${poppler.dev}/include/poppler";
|
2015-06-05 09:48:37 +01:00
|
|
|
|
2017-09-14 20:24:37 +01:00
|
|
|
nativeBuildInputs = [
|
2020-12-31 07:48:55 +00:00
|
|
|
cmake
|
|
|
|
pkg-config
|
2017-09-14 20:24:37 +01:00
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
2015-06-05 09:48:37 +01:00
|
|
|
buildInputs = [
|
2017-01-22 19:25:16 +00:00
|
|
|
poppler pcre libxkbcommon epoxy
|
|
|
|
freetype gtk3
|
|
|
|
libpthreadstubs libXdmcp libxshmfence # otherwise warnings in compilation
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/naihe2010/apvlv/commit/d432635b9c5ea6c052a2ae1fb71aedec5c4ad57a.patch";
|
|
|
|
sha256 = "1am8dgv2kkpqmm2vaysa61czx8ppdx94zb3c59sx88np50jpy70w";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/naihe2010/apvlv/commit/4c7a583e8431964def482e5471f02e6de8e62a7b.patch";
|
|
|
|
sha256 = "1dszm120lwm90hcg5zmd4vr6pjyaxc84qmb7k0fr59mmb3qif62j";
|
|
|
|
})
|
2018-03-09 18:17:44 +00:00
|
|
|
# fix build with gcc7
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/naihe2010/apvlv/commit/a3a895772a27d76dab0c37643f0f4c73f9970e62.patch";
|
|
|
|
sha256 = "1fpc7wr1ajilvwi5gjsy5g9jcx4bl03gp5dmajg90ljqbhwz2bfi";
|
|
|
|
})
|
2019-01-20 04:18:58 +00:00
|
|
|
./fix-build-with-poppler-0.73.0.patch
|
2017-01-22 19:25:16 +00:00
|
|
|
];
|
2015-06-05 09:48:37 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# binary
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp src/apvlv $out/bin/apvlv
|
|
|
|
|
|
|
|
# displays pdfStartup.pdf as default pdf entry
|
|
|
|
mkdir -p $out/share/doc/apvlv/
|
|
|
|
cp ../Startup.pdf $out/share/doc/apvlv/Startup.pdf
|
2017-06-04 02:30:21 +01:00
|
|
|
cp ../main_menubar.glade $out/share/doc/apvlv/main_menubar.glade
|
2018-10-09 08:50:55 +01:00
|
|
|
''
|
2021-01-15 05:42:41 +00:00
|
|
|
+ lib.optionalString (!stdenv.isDarwin) ''
|
2018-10-09 08:50:55 +01:00
|
|
|
install -D ../apvlv.desktop $out/share/applications/apvlv.desktop
|
2015-06-05 09:48:37 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://naihe2010.github.io/apvlv/";
|
2015-06-05 09:48:37 +01:00
|
|
|
description = "PDF viewer with Vim-like behaviour";
|
|
|
|
longDescription = ''
|
|
|
|
apvlv is a PDF/DJVU/UMD/TXT Viewer Under Linux/WIN32
|
|
|
|
with Vim-like behaviour.
|
|
|
|
'';
|
|
|
|
|
|
|
|
license = licenses.lgpl2;
|
2018-03-08 04:11:52 +00:00
|
|
|
platforms = platforms.linux;
|
2015-06-05 09:48:37 +01:00
|
|
|
maintainers = [ maintainers.ardumont ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|