2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
, cmake
|
|
|
|
, gettext
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2020-12-25 13:55:36 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
, adwaita-icon-theme
|
2023-08-04 22:07:22 +00:00
|
|
|
, alsa-lib
|
2024-04-21 15:54:59 +00:00
|
|
|
, binutils
|
2020-04-24 23:36:52 +00:00
|
|
|
, glib
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, gtk3
|
2023-08-04 22:07:22 +00:00
|
|
|
, gtksourceview4
|
2021-08-05 21:33:18 +00:00
|
|
|
, librsvg
|
2020-04-24 23:36:52 +00:00
|
|
|
, libsndfile
|
|
|
|
, libxml2
|
|
|
|
, libzip
|
|
|
|
, pcre
|
|
|
|
, poppler
|
|
|
|
, portaudio
|
|
|
|
, zlib
|
|
|
|
# plugins
|
|
|
|
, withLua ? true, lua
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xournalpp";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.2.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xournalpp";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "xournalpp";
|
2022-02-20 05:27:41 +00:00
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-8UAAX/kixqiY9zEYs5eva0G2K2vlfnYd1yyVHMSfSeY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/util/Stacktrace.cpp \
|
|
|
|
--replace-fail "addr2line" "${binutils}/bin/addr2line"
|
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ cmake gettext pkg-config wrapGAppsHook3 ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs =
|
2024-09-26 11:04:55 +00:00
|
|
|
lib.optionals stdenv.hostPlatform.isLinux [
|
2023-08-04 22:07:22 +00:00
|
|
|
alsa-lib
|
2023-10-19 13:55:26 +00:00
|
|
|
] ++ [
|
2023-08-04 22:07:22 +00:00
|
|
|
glib
|
2020-04-24 23:36:52 +00:00
|
|
|
gsettings-desktop-schemas
|
|
|
|
gtk3
|
2023-08-04 22:07:22 +00:00
|
|
|
gtksourceview4
|
2021-08-05 21:33:18 +00:00
|
|
|
librsvg
|
2020-04-24 23:36:52 +00:00
|
|
|
libsndfile
|
|
|
|
libxml2
|
|
|
|
libzip
|
|
|
|
pcre
|
|
|
|
poppler
|
|
|
|
portaudio
|
|
|
|
zlib
|
|
|
|
]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optional withLua lua;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildFlags = [ "translations" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix XDG_DATA_DIRS : "${adwaita-icon-theme}/share"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Xournal++ is a handwriting Notetaking software with PDF annotation support";
|
2020-10-27 00:29:36 +00:00
|
|
|
homepage = "https://xournalpp.github.io/";
|
2022-02-20 05:27:41 +00:00
|
|
|
changelog = "https://github.com/xournalpp/xournalpp/blob/v${version}/CHANGELOG.md";
|
2020-10-27 00:29:36 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ sikmir ];
|
2023-10-19 13:55:26 +00:00
|
|
|
platforms = platforms.unix;
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "xournalpp";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|