From a28ad2f66315e0f12175d1bb161d4c14d6e32875 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Tue, 18 Jan 2022 18:28:09 +0800 Subject: [PATCH] rnote: init at 0.2.5 --- pkgs/default.nix | 22 +++++++++++++++++++ pkgs/rnote.nix | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 pkgs/rnote.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 0f9a27af..db2b992a 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -6,6 +6,27 @@ let packages = self: let callPackage = newScope self; in { + poppler_21_08 = poppler.overrideAttrs (super: rec { + version = "21.08.0"; + src = fetchurl { + url = "https://poppler.freedesktop.org/poppler-${version}.tar.xz"; + sha256 = "sha256-6c9dxZZLzkuwJk0cT4EicGyRBYi0Ic/DCryX1rI+YC0="; + }; + }); + gstreamer_1_18_5 = gst_all_1.gstreamer.overrideAttrs (super: rec { + version = "1.18.5"; + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${super.pname}/${super.pname}-${version}.tar.xz"; + sha256 = "sha256-VYYiMqY0Wbv1ar694whcqa7CEbR46JHazqTW34yv6Ao="; + }; + }); + gstreamer_plugins_base_1_18_5 = gst_all_1.gst-plugins-base.overrideAttrs (super: rec { + version = "1.18.5"; + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${super.pname}/${super.pname}-${version}.tar.xz"; + sha256 = "sha256-lgt69FhXANsP3VuENVThHiVk/tngYfWR+uiKe+ZEb6M="; + }; + }); doggo = callPackage ./doggo.nix { }; gnome-shell-extension-burn-my-windows = callPackage ./gnome-shell-extension-burn-my-windows.nix { }; @@ -26,6 +47,7 @@ let callPackage ./pop-launcher-plugin-duckduckgo-bangs.nix { }; photon-rss = callPackage ./photon-rss.nix { }; ratt = callPackage ./ratt.nix { }; + rnote = callPackage ./rnote.nix { }; tic-80 = callPackage ./tic-80 { }; sioyek = libsForQt5.callPackage ./sioyek.nix { }; vpaint = libsForQt5.callPackage ./vpaint.nix { }; diff --git a/pkgs/rnote.nix b/pkgs/rnote.nix new file mode 100644 index 00000000..e0e403d8 --- /dev/null +++ b/pkgs/rnote.nix @@ -0,0 +1,56 @@ +{ stdenv, lib, fetchFromGitHub, rustPlatform, meson, ninja, pkg-config +, wrapGAppsHook, gtk4, glib, gstreamer_1_18_5, gstreamer_plugins_base_1_18_5 +, libadwaita, gobject-introspection, poppler_21_08, libxml2, appstream-glib +, desktop-file-utils, shared-mime-info }: + +stdenv.mkDerivation rec { + pname = "rnote"; + version = "0.2.5"; + + src = fetchFromGitHub { + owner = "flxzt"; + repo = "rnote"; + rev = "v${version}"; + sha256 = "sha256-4C0jsKmZeqzlEzJk9XLF41CZDFVsSklRmizY7N4zz+A="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + sha256 = "sha256-CvxUynDRnPGoqWxxzdZoQUys/kMwj3f9/IXVA4EqiNU="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + rustPlatform.cargoSetupHook + rustPlatform.rust.cargo + rustPlatform.rust.rustc + wrapGAppsHook + ]; + + buildInputs = [ + appstream-glib + desktop-file-utils + glib + gobject-introspection + gstreamer_1_18_5 + gstreamer_plugins_base_1_18_5 + gtk4 + libadwaita + libxml2 + poppler_21_08 + shared-mime-info + ]; + + postPatch = '' + patchShebangs build-aux/meson_post_install.py + ''; + + meta = with lib; { + description = "Simple freehand drawing note-taking application"; + homepage = "https://github.com/flxzt/rnote"; + license = licenses.gpl3; + }; +}