about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/toastify/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/toastify/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/toastify/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/toastify/default.nix b/nixpkgs/pkgs/tools/misc/toastify/default.nix
new file mode 100644
index 000000000000..21e0d7091c18
--- /dev/null
+++ b/nixpkgs/pkgs/tools/misc/toastify/default.nix
@@ -0,0 +1,31 @@
+{ lib, rustPlatform, fetchFromGitHub, stdenv, darwin }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "toastify";
+  version = "0.5.2";
+
+  src = fetchFromGitHub {
+    owner = "hoodie";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-fCwxFdpwtG83xw3DDt9rlnbY8V3eKemRFK/6E1Bhm4c=";
+  };
+
+  cargoHash = "sha256-ecc3z0T82pYR9gSYZYxRYhse9IroydPOAtRgDWqHTbo=";
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk_11_0.frameworks.Cocoa
+  ];
+
+  preBuild = lib.optionalString stdenv.isDarwin ''
+    export HOME=$(mktemp -d)
+  '';
+
+  meta = with lib; {
+    description = "A commandline tool that shows desktop notifications using notify-rust";
+    homepage = "https://github.com/hoodie/toastify";
+    changelog = "https://github.com/hoodie/toastify/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ colemickens ];
+  };
+}