polar-bookshelf: 1.13.10 -> 2.0.42

* polar-bookshelf: 1.13.10 -> 2.0.42

* Update pkgs/applications/misc/polar-bookshelf/default.nix

Co-authored-by: Zak B. Elep <zakame@zakame.net>
This commit is contained in:
GuangTao 2020-10-22 04:35:35 -07:00 committed by GitHub
parent d3b2380252
commit f5a8ea23bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,12 +10,12 @@
stdenv.mkDerivation rec {
pname = "polar-bookshelf";
version = "1.13.10";
version = "2.0.42";
# 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 = "1bxcyf6n2m5x1z8ic6kzskinyyc6lh6nj0bycbwc524n6ms5j99p";
url = "https://github.com/burtonator/polar-bookshelf/releases/download/v${version}/polar-desktop-app-${version}-amd64.deb";
hash = "sha256-JyO71wyE6b0iHAYs/6/WbG+OdUVUUPpJla+ZUzg0Gng=";
};
buildInputs = [
@ -64,16 +64,15 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
mkdir -p $out/lib
mv opt/Polar\ Bookshelf/* $out/share/polar-bookshelf
mv opt/Polar/* $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
ln -s $out/share/polar-bookshelf/polar-desktop-app $out/bin/polar-desktop-app
# Correct desktop file `Exec`
substituteInPlace $out/share/applications/polar-bookshelf.desktop \
--replace "/opt/Polar Bookshelf/polar-bookshelf" "$out/bin/polar-bookshelf"
substituteInPlace $out/share/applications/polar-desktop-app.desktop \
--replace "/opt/Polar/polar-desktop-app" "$out/bin/polar-desktop-app"
'';
preFixup = ''