4bac34ead1
GitOrigin-RevId: 724bfc0892363087709bd3a5a1666296759154b1
87 lines
1.8 KiB
Nix
87 lines
1.8 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, alsa-lib
|
|
, appstream-glib
|
|
, clang
|
|
, cmake
|
|
, desktop-file-utils
|
|
, glib
|
|
, gstreamer
|
|
, gtk4
|
|
, libadwaita
|
|
, libxml2
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, poppler
|
|
, python3
|
|
, rustPlatform
|
|
, shared-mime-info
|
|
, wrapGAppsHook4
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "rnote";
|
|
version = "0.5.13";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "flxzt";
|
|
repo = "rnote";
|
|
rev = "v${version}";
|
|
hash = "sha256-8HMaCO+v9PbkoS8Z1BmndiU7UmlG4TT0+bSESIwa3RM=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
inherit src;
|
|
name = "${pname}-${version}";
|
|
hash = "sha256-rXAPILGzLZ3Ne4nhdaPZH1R2ezaF+D/P2t/Sod6nxo8=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
appstream-glib # For appstream-util
|
|
clang
|
|
cmake
|
|
desktop-file-utils # For update-desktop-database
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
python3 # For the postinstall script
|
|
rustPlatform.cargoSetupHook
|
|
rustPlatform.rust.cargo
|
|
rustPlatform.rust.rustc
|
|
shared-mime-info # For update-mime-database
|
|
wrapGAppsHook4
|
|
];
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
buildInputs = [
|
|
alsa-lib
|
|
glib
|
|
gstreamer
|
|
gtk4
|
|
libadwaita
|
|
libxml2
|
|
poppler
|
|
];
|
|
|
|
LIBCLANG_PATH = "${clang.cc.lib}/lib";
|
|
|
|
postPatch = ''
|
|
pushd build-aux
|
|
chmod +x cargo_build.py meson_post_install.py
|
|
patchShebangs cargo_build.py meson_post_install.py
|
|
substituteInPlace meson_post_install.py --replace "gtk-update-icon-cache" "gtk4-update-icon-cache"
|
|
popd
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/flxzt/rnote";
|
|
changelog = "https://github.com/flxzt/rnote/releases/tag/${src.rev}";
|
|
description = "Simple drawing application to create handwritten notes";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ dotlambda yrd ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|