polar-bookshelf: init at 1.0.11 (#48610)

* polar-bookshelf: init at 1.0.11

* Grab gsettings_desktop_schemas from gnome3

* Explain why we're not building from source

* Use autoPatchelfHook

* Updated license & further cleanup
This commit is contained in:
Andy Chun 2018-11-07 04:37:27 -08:00 committed by Renaud
parent 78090f4f09
commit 7ea48e12b7
2 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,87 @@
{ stdenv, lib, makeWrapper, fetchurl
, dpkg, wrapGAppsHook, autoPatchelfHook
, gtk3, cairo, gnome2, atk, gdk_pixbuf, glib
, at-spi2-atk, dbus, libX11, libxcb, libXi
, libXcursor, libXdamage, libXrandr, libXcomposite
, libXext, libXfixes, libXrender, libXtst, libXScrnSaver
, nss, nspr, alsaLib, cups, fontconfig, expat
, libudev0-shim, glibc, curl, openssl, libnghttp2, gnome3 }:
stdenv.mkDerivation rec {
name = "polar-bookshelf-${version}";
version = "1.0.11";
# fetching a .deb because there's no easy way to package this Electron app
src = fetchurl {
url = "https://github.com/burtonator/polar-bookshelf/releases/download/v${version}/polar-bookshelf-${version}-amd64.deb";
sha256 = "11rrwd5cr984nhgrib12hx6k74hzgmb3cfk6qnr1l604dk9pqfqx";
};
buildInputs = [
gnome3.gsettings_desktop_schemas
glib
gtk3
cairo
gnome2.pango
atk
gdk_pixbuf
at-spi2-atk
dbus
libX11
libxcb
libXi
libXcursor
libXdamage
libXrandr
libXcomposite
libXext
libXfixes
libXrender
libXtst
libXScrnSaver
nss
nspr
alsaLib
cups
fontconfig
expat
];
nativeBuildInputs = [
wrapGAppsHook
autoPatchelfHook
makeWrapper
dpkg
];
runtimeLibs = lib.makeLibraryPath [ libudev0-shim glibc curl openssl libnghttp2 ];
unpackPhase = "dpkg-deb -x $src .";
installPhase = ''
mkdir -p $out/share/polar-bookshelf
mkdir -p $out/bin
mkdir -p $out/lib
mv opt/Polar\ Bookshelf/* $out/share/polar-bookshelf
mv $out/share/polar-bookshelf/*.so $out/lib
mv usr/share/* $out/share/
ln -s $out/share/polar-bookshelf/polar-bookshelf $out/bin/polar-bookshelf
'';
preFixup = ''
gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${runtimeLibs}" )
'';
meta = {
homepage = https://getpolarized.io/;
description = "Personal knowledge repository for PDF and web content supporting incremental reading and document annotation";
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.noneucat ];
};
}

View File

@ -18518,6 +18518,8 @@ with pkgs;
pmenu = callPackage ../applications/misc/pmenu { };
polar-bookshelf = callPackage ../applications/misc/polar-bookshelf { };
poezio = python3Packages.poezio;
pommed = callPackage ../os-specific/linux/pommed {};