about summary refs log tree commit diff
path: root/pkgs/by-name/sa
diff options
context:
space:
mode:
authorPablo Ovelleiro Corral <mail@pablo.tools>2023-11-22 10:18:37 +0100
committerPablo Ovelleiro Corral <mail@pablo.tools>2023-11-24 09:09:46 +0100
commitaa92c1f317470a8729361ac740a974d3ea426290 (patch)
tree5eb94f0939cdc310340fef147dc362b3b3da4e85 /pkgs/by-name/sa
parented0f304e3329cbd272cebc83cef712f9dba71328 (diff)
satty: init at 0.7.0
Diffstat (limited to 'pkgs/by-name/sa')
-rw-r--r--pkgs/by-name/sa/satty/package.nix67
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/by-name/sa/satty/package.nix b/pkgs/by-name/sa/satty/package.nix
new file mode 100644
index 0000000000000..40592a3d7dc37
--- /dev/null
+++ b/pkgs/by-name/sa/satty/package.nix
@@ -0,0 +1,67 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, wrapGAppsHook4
+, cairo
+, gdk-pixbuf
+, glib
+, gtk4
+, libadwaita
+, pango
+, fetchpatch
+, copyDesktopItems
+}:
+
+rustPlatform.buildRustPackage rec {
+
+  pname = "satty";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "gabm";
+    repo = "Satty";
+    rev = "v${version}";
+    hash = "sha256-x2ljheG7ZqaeiPersC/e8Er2jvk5TJs65Y3N1GjTiNU=";
+  };
+
+  cargoPatches = [
+    (fetchpatch {
+      name = "fix-Cargo.lock";
+      url = "https://github.com/gabm/Satty/commit/39be6ddce264552df971e949a6a3175b102530b2.patch";
+      hash = "sha256-GUHupZE1A7AmXvZ8WvRzBkQyH7qlMTetBjHuakfIZ7w=";
+    })
+  ];
+
+  cargoHash = "sha256-0GsbWd/gpKZm7nNXkuJhB02YKUj3XCrSfpRA9KBXydU=";
+
+  nativeBuildInputs = [
+    copyDesktopItems
+    pkg-config
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [
+    cairo
+    gdk-pixbuf
+    glib
+    gtk4
+    libadwaita
+    pango
+  ];
+
+  postInstall = ''
+    install -Dt $out/share/icons/hicolor/scalable/apps/ assets/satty.svg
+  '';
+
+  desktopItems = [ "satty.desktop" ];
+
+  meta = with lib; {
+    description = "A screenshot annotation tool inspired by Swappy and Flameshot";
+    homepage = "https://github.com/gabm/Satty";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ pinpox ];
+    mainProgram = "satty";
+    platforms = lib.platforms.linux;
+  };
+}