2022-02-20 05:27:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-05-18 14:49:53 +00:00
|
|
|
, alsa-lib
|
2022-04-03 18:54:34 +00:00
|
|
|
, appstream-glib
|
2023-05-24 13:37:59 +00:00
|
|
|
, cargo
|
2022-11-02 22:02:43 +00:00
|
|
|
, cmake
|
2022-02-20 05:27:41 +00:00
|
|
|
, desktop-file-utils
|
|
|
|
, glib
|
|
|
|
, gstreamer
|
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
|
|
|
, libxml2
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, poppler
|
|
|
|
, python3
|
|
|
|
, rustPlatform
|
2023-05-24 13:37:59 +00:00
|
|
|
, rustc
|
2022-02-20 05:27:41 +00:00
|
|
|
, shared-mime-info
|
|
|
|
, wrapGAppsHook4
|
2023-03-24 00:07:29 +00:00
|
|
|
, AudioUnit
|
2022-02-20 05:27:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rnote";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.7.1";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "flxzt";
|
|
|
|
repo = "rnote";
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-QcgmL6lLi/3QXnlcEsVyTqNUfjSm+R+nhRzRvw8M9Qc=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2023-07-15 17:15:38 +00:00
|
|
|
"ink-stroke-modeler-rs-0.1.0" = "sha256-1abfrPehOGc/ye/iFIwYPd6HJX6P8OP2vGBSJfeo+c8=";
|
|
|
|
"librsvg-2.56.2" = "sha256-uCHKDC4nc7J0k9qsmzF6etkWOoNq51Dddd9uQw5DOT0=";
|
2023-04-29 16:46:19 +00:00
|
|
|
"piet-0.6.2" = "sha256-If0qiZkgXeLvsrECItV9/HmhTk1H52xmVO7cUsD9dcU=";
|
2023-03-27 19:17:25 +00:00
|
|
|
};
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-04-03 18:54:34 +00:00
|
|
|
appstream-glib # For appstream-util
|
2022-11-02 22:02:43 +00:00
|
|
|
cmake
|
2022-02-20 05:27:41 +00:00
|
|
|
desktop-file-utils # For update-desktop-database
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
python3 # For the postinstall script
|
2023-03-24 00:07:29 +00:00
|
|
|
rustPlatform.bindgenHook
|
2022-02-20 05:27:41 +00:00
|
|
|
rustPlatform.cargoSetupHook
|
2023-05-24 13:37:59 +00:00
|
|
|
cargo
|
|
|
|
rustc
|
2022-02-20 05:27:41 +00:00
|
|
|
shared-mime-info # For update-mime-database
|
|
|
|
wrapGAppsHook4
|
|
|
|
];
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
mesonFlags = [
|
|
|
|
(lib.mesonBool "cli" true)
|
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gstreamer
|
|
|
|
gtk4
|
|
|
|
libadwaita
|
|
|
|
libxml2
|
|
|
|
poppler
|
2023-03-24 00:07:29 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
alsa-lib
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
AudioUnit
|
2022-02-20 05:27:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
pushd build-aux
|
2022-12-28 21:21:41 +00:00
|
|
|
chmod +x cargo_build.py meson_post_install.py
|
|
|
|
patchShebangs cargo_build.py meson_post_install.py
|
2022-02-20 05:27:41 +00:00
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/flxzt/rnote";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/flxzt/rnote/releases/tag/${src.rev}";
|
2022-02-20 05:27:41 +00:00
|
|
|
description = "Simple drawing application to create handwritten notes";
|
2023-03-24 00:07:29 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda yrd ];
|
2023-03-24 00:07:29 +00:00
|
|
|
platforms = platforms.unix;
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
}
|