39 , 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 [ libudev0-shim glibc curl openssl libnghttp2 ];
96 unpackPhase = "dpkg-deb -x $src .";
101 mkdir -p $out/share/polar-bookshelf
105 mv opt/Polar/* $out/share/polar-bookshelf
106 mv $out/share/polar-bookshelf/*.so $out/lib
108 mv usr/share/* $out/share/
110 ln -s $out/share/polar-bookshelf/polar-desktop-app $out/bin/polar-desktop-app
112 substituteInPlace $out/share/applications/polar-desktop-app.desktop \
113 --replace "/opt/Polar/polar-desktop-app" "$out/bin/polar-desktop-app"
119 gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${runtimeLibs}" )
123 homepage = "https://getpolarized.io/";
124 description = "Personal knowledge repository for PDF and web content supporting incremental reading and document annotation";
125 mainProgram = "polar-desktop-app";
126 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
127 license = lib.licenses.gpl3Only;
128 platforms = lib.platforms.linux;