about summary refs log tree commit diff
path: root/pkgs/os-specific/darwin
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-08-11 18:00:55 +0000
committerGitHub <noreply@github.com>2023-08-11 18:00:55 +0000
commit9cc6a98540a676d8e8eb9d88a6947fefde07cb50 (patch)
tree73bdb4cd7774e38aa0a95f6ebd800338a8a47f0b /pkgs/os-specific/darwin
parentcc6e13abfbc002223313ccfa494a6f087f90a910 (diff)
parente6e55010858023a048cf36b4dd422a483878a581 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/os-specific/darwin')
-rw-r--r--pkgs/os-specific/darwin/dark-mode-notify/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/dark-mode-notify/default.nix b/pkgs/os-specific/darwin/dark-mode-notify/default.nix
new file mode 100644
index 0000000000000..31d1a2c8d8b9f
--- /dev/null
+++ b/pkgs/os-specific/darwin/dark-mode-notify/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, fetchFromGitHub
+, stdenv
+, swift
+, swiftpm
+, darwin
+}:
+
+stdenv.mkDerivation (final: {
+  pname = "dark-mode-notify";
+  version = "unstable-2022-07-18";
+
+  src = fetchFromGitHub {
+    owner = "bouk";
+    repo = "dark-mode-notify";
+    rev = "4d7fe211f81c5b67402fad4bed44995344a260d1";
+    hash = "sha256-LsAQ5v5jgJw7KsJnQ3Mh6+LNj1EMHICMoD5WzF3hRmU=";
+  };
+
+  nativeBuildInputs = [
+    swift
+    swiftpm
+  ];
+
+  buildInputs = with darwin.apple_sdk.frameworks; [
+    Foundation
+    Cocoa
+  ];
+
+  makeFlags = [ "prefix=$(out)" ];
+
+  meta = {
+    description = "Run a script whenever dark mode changes in macOS";
+    homepage = "https://github.com/bouk/dark-mode-notify";
+    # Doesn't build on x86_64 because of some CoreGraphics issue, even with SDK 11.0
+    platforms = [ "aarch64-darwin" ];
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ YorikSar ];
+  };
+})