summary refs log tree commit diff
path: root/pkgs/applications/graphics/rnote/default.nix
diff options
context:
space:
mode:
authorYannik Rödel <hey@yannik.info>2022-01-25 08:34:00 +0100
committerYannik Rödel <hey@yannik.info>2022-02-17 16:28:08 +0100
commitfe350bee92aee31800b0c0487b5cf6015e438ab6 (patch)
treef3a1d23841b076809b223d4064fe2eaeb5ca7ada /pkgs/applications/graphics/rnote/default.nix
parentccd9fb5b082b6d32417057fea3b217c417d0284a (diff)
downloadnixpkgs-fe350bee92aee31800b0c0487b5cf6015e438ab6.tar
nixpkgs-fe350bee92aee31800b0c0487b5cf6015e438ab6.tar.gz
nixpkgs-fe350bee92aee31800b0c0487b5cf6015e438ab6.tar.bz2
nixpkgs-fe350bee92aee31800b0c0487b5cf6015e438ab6.tar.lz
nixpkgs-fe350bee92aee31800b0c0487b5cf6015e438ab6.tar.xz
nixpkgs-fe350bee92aee31800b0c0487b5cf6015e438ab6.tar.zst
nixpkgs-fe350bee92aee31800b0c0487b5cf6015e438ab6.zip
rnote: init at 0.3.5
Diffstat (limited to 'pkgs/applications/graphics/rnote/default.nix')
-rw-r--r--pkgs/applications/graphics/rnote/default.nix76
1 files changed, 76 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/rnote/default.nix b/pkgs/applications/graphics/rnote/default.nix
new file mode 100644
index 00000000000..624959ffa9e
--- /dev/null
+++ b/pkgs/applications/graphics/rnote/default.nix
@@ -0,0 +1,76 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, desktop-file-utils
+, gio-sharp
+, glib
+, gstreamer
+, gtk4
+, libadwaita
+, libxml2
+, meson
+, ninja
+, pkg-config
+, poppler
+, python3
+, rustPlatform
+, shared-mime-info
+, wrapGAppsHook4
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rnote";
+  version = "0.3.5";
+
+  src = fetchFromGitHub {
+    owner = "flxzt";
+    repo = "rnote";
+    rev = "v${version}";
+    sha256 = "5g5SQJc5aopYxtHNP5T85TtcazovrveUCnMhJ90p2t4=";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    hash = "sha256-vnLesWXdqNzlWNQsUVy03kfmcDNazQ1BbizQDoG1kgM=";
+  };
+
+  nativeBuildInputs = [
+    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
+  ];
+
+  buildInputs = [
+    gio-sharp
+    glib
+    gstreamer
+    gtk4
+    libadwaita
+    libxml2
+    poppler
+  ];
+
+  postPatch = ''
+    pushd build-aux
+    chmod +x meson_post_install.py
+    patchShebangs 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";
+    description = "Simple drawing application to create handwritten notes";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ dotlambda yrd ];
+    platforms = platforms.linux;
+  };
+}