40 gsettings-desktop-schemas,
45 stdenv.mkDerivation rec {
46 pname = "polar-bookshelf";
49 # fetching a .deb because there's no easy way to package this Electron app
51 url = "https://github.com/burtonator/polar-bookshelf/releases/download/v${version}/polar-desktop-app-${version}-amd64.deb";
52 hash = "sha256-jcq0hW698bAhVM3fLQQeKAnld33XLkHsGjS3QwUpciQ=";
58 gsettings-desktop-schemas
94 runtimeLibs = lib.makeLibraryPath [
105 mkdir -p $out/share/polar-bookshelf
109 mv opt/Polar/* $out/share/polar-bookshelf
110 mv $out/share/polar-bookshelf/*.so $out/lib
112 mv usr/share/* $out/share/
114 ln -s $out/share/polar-bookshelf/polar-desktop-app $out/bin/polar-desktop-app
116 substituteInPlace $out/share/applications/polar-desktop-app.desktop \
117 --replace "/opt/Polar/polar-desktop-app" "$out/bin/polar-desktop-app"
123 gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${runtimeLibs}" )
127 homepage = "https://getpolarized.io/";
128 description = "Personal knowledge repository for PDF and web content supporting incremental reading and document annotation";
129 mainProgram = "polar-desktop-app";
130 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
131 license = lib.licenses.gpl3Only;
132 platforms = lib.platforms.linux;