mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
sioyek: remove package
It has been available in nixpkgs a few weeks ago so we don't need it here.
This commit is contained in:
parent
7ec58315c1
commit
9cedbd2298
@ -41,7 +41,6 @@ let
|
|||||||
text-engine = callPackage ./text-engine.nix { };
|
text-engine = callPackage ./text-engine.nix { };
|
||||||
tic-80 = callPackage ./tic-80 { };
|
tic-80 = callPackage ./tic-80 { };
|
||||||
segno = libsForQt5.callPackage ./segno.nix { };
|
segno = libsForQt5.callPackage ./segno.nix { };
|
||||||
sioyek = libsForQt5.callPackage ./sioyek.nix { };
|
|
||||||
vpaint = libsForQt5.callPackage ./vpaint.nix { };
|
vpaint = libsForQt5.callPackage ./vpaint.nix { };
|
||||||
wayback = libsForQt5.callPackage ./wayback.nix { };
|
wayback = libsForQt5.callPackage ./wayback.nix { };
|
||||||
};
|
};
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, qtbase, qt3d, qmake, wrapQtAppsHook, harfbuzz
|
|
||||||
, pkgconfig, mupdf, zlib, freetype, libGLU, gumbo, jbig2dec, openjpeg_2 }:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "sioyek";
|
|
||||||
version = "1.1.0";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "ahrm";
|
|
||||||
repo = pname;
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "sha256-d9Cm77SjjDnF1C/qT2J3ywUqedpDYnfzKq+ohirn2eM=";
|
|
||||||
fetchSubmodules = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ qmake wrapQtAppsHook pkgconfig ];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
qtbase
|
|
||||||
qt3d
|
|
||||||
harfbuzz
|
|
||||||
|
|
||||||
# Replacing the application's vendored dependencies with the system
|
|
||||||
# libraries.
|
|
||||||
mupdf
|
|
||||||
zlib
|
|
||||||
|
|
||||||
# Since we're using libraries from the system, we'll also have to
|
|
||||||
# link several libraries from the application manually.
|
|
||||||
gumbo
|
|
||||||
jbig2dec
|
|
||||||
openjpeg_2
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace pdf_viewer_build_config.pro \
|
|
||||||
--replace "-Lmupdf/build/release -lmupdf -lmupdf-third -lmupdf-threads" "-L${mupdf.dev}/lib -lmupdf -lmupdf-third -lharfbuzz -lfreetype -lgumbo -ljbig2dec -lopenjp2 -ljpeg" \
|
|
||||||
--replace 'INCLUDEPATH += ./pdf_viewer\' 'INCLUDEPATH += ./pdf_viewer ${mupdf.dev}/include ${zlib.dev}/include'
|
|
||||||
|
|
||||||
# Remove and replace it with packages from nixpkgs
|
|
||||||
sed -i -e '4,6d' pdf_viewer_build_config.pro
|
|
||||||
'' + lib.optionalString stdenv.isLinux ''
|
|
||||||
substituteInPlace pdf_viewer/main.cpp \
|
|
||||||
--replace "/usr/share/sioyek" "$out/share/sioyek" \
|
|
||||||
--replace "/etc/sioyek" "$out/etc/sioyek"
|
|
||||||
'';
|
|
||||||
|
|
||||||
qmakeFlags = lib.optional stdenv.isLinux "DEFINES+=LINUX_STANDARD_PATHS";
|
|
||||||
|
|
||||||
preBuild = ''
|
|
||||||
# Remove and replace it with packages from nixpkgs.
|
|
||||||
rm -r mupdf zlib
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Taken from `build_linux.sh` script.
|
|
||||||
postInstall = ''
|
|
||||||
install -Dm644 tutorial.pdf -t $out/share/sioyek
|
|
||||||
install -Dm644 pdf_viewer/shaders/* -t $out/share/sioyek/shaders
|
|
||||||
install -Dm644 pdf_viewer/keys.config -t $out/etc/sioyek
|
|
||||||
install -Dm644 pdf_viewer/prefs.config -t $out/etc/sioyek
|
|
||||||
install -Dm644 pdf_viewer/keys_user.config -t $out/share/sioyek
|
|
||||||
install -Dm644 pdf_viewer/prefs_user.config -t $out/share/sioyek
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description =
|
|
||||||
"PDF viewer designed for reading research papers and technical books";
|
|
||||||
homepage = "https://sioyek.info";
|
|
||||||
license = licenses.gpl3Only;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user