Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

122 lines
2.3 KiB
Nix

{
lib,
stdenv,
fetchurl,
alsa-lib,
at-spi2-atk,
atk,
autoPatchelfHook,
cairo,
cups,
curl,
dbus,
dpkg,
expat,
fontconfig,
gdk-pixbuf,
glib,
glibc,
gsettings-desktop-schemas,
gtk3,
libX11,
libXScrnSaver,
libXcomposite,
libXcursor,
libXdamage,
libXext,
libXfixes,
libXi,
libXrandr,
libXrender,
libXtst,
libnghttp2,
libudev0-shim,
libxcb,
makeWrapper,
nspr,
nss,
openssl,
pango,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "polar-bookshelf1";
version = "1.100.14";
src = fetchurl {
url = "https://github.com/burtonator/polar-bookshelf/releases/download/v${version}/polar-bookshelf-${version}-amd64.deb";
hash = "sha256-5xa+Nwu0p1x5DLn1GNI0HDt7GtBGoFQ/9qGTeq9uBgU=";
};
buildInputs = [
alsa-lib
at-spi2-atk
atk
cairo
cups
dbus
expat
fontconfig
gdk-pixbuf
glib
gsettings-desktop-schemas
gtk3
libX11
libXScrnSaver
libXcomposite
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libXtst
libxcb
nspr
nss
pango
];
nativeBuildInputs = [
autoPatchelfHook
dpkg
makeWrapper
wrapGAppsHook3
];
runtimeLibs = lib.makeLibraryPath [
libudev0-shim
glibc
curl
openssl
libnghttp2
];
installPhase = ''
mkdir -p $out/share/polar-bookshelf $out/bin $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}" )
# Correct desktop file `Exec`
substituteInPlace $out/share/applications/polar-bookshelf.desktop \
--replace "/opt/Polar Bookshelf/polar-bookshelf" "$out/bin/polar-bookshelf"
'';
meta = {
homepage = "https://getpolarized.io/";
description = "Personal knowledge repository for PDF and web content supporting incremental reading and document annotation";
mainProgram = "polar-bookshelf";
license = lib.licenses.gpl3Only;
maintainers = [ lib.maintainers.dansbandit ];
platforms = lib.platforms.linux;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}