2022-02-20 05:27:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-03-24 00:07:29 +00:00
|
|
|
, fetchpatch
|
2022-05-18 14:49:53 +00:00
|
|
|
, alsa-lib
|
2022-04-03 18:54:34 +00:00
|
|
|
, appstream-glib
|
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
|
|
|
|
, 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-03-24 00:07:29 +00:00
|
|
|
version = "0.5.18";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "flxzt";
|
|
|
|
repo = "rnote";
|
|
|
|
rev = "v${version}";
|
2023-03-24 00:07:29 +00:00
|
|
|
hash = "sha256-N07Y9kmGvMFS0Kq4i2CltJvNTuqbXausZZGjAQRDmNU=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"ink-stroke-modeler-rs-0.1.0" = "sha256-+R3T/9Ty+F6YxxtA0Un6UhFyKbGOvqBKwHt4WSHWhsk=";
|
|
|
|
"librsvg-2.55.92" = "sha256-WVwxjjWR/TloSmyzH8Jo1mTjLHVifBw1Xn965wuoEDs=";
|
|
|
|
"piet-0.6.2" = "sha256-76yeX0yQMC0hh6u2xT/kS/2fjs+GO+nCks2fnOImf0c=";
|
|
|
|
};
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/flxzt/rnote/pull/569
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/flxzt/rnote/commit/8585b446c08b246f3d55359026415cb3d242d44e.patch";
|
|
|
|
hash = "sha256-ePpTQ/3mzZTNjU9P4vTu9CM0vX8+r8b6njuj7hDgFCg=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
rustPlatform.rust.cargo
|
|
|
|
rustPlatform.rust.rustc
|
|
|
|
shared-mime-info # For update-mime-database
|
|
|
|
wrapGAppsHook4
|
|
|
|
];
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
dontUseCmakeConfigure = 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
|
|
|
substituteInPlace meson_post_install.py --replace "gtk-update-icon-cache" "gtk4-update-icon-cache"
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|