about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/monitorcontrol/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/monitorcontrol/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/monitorcontrol/default.nix19
1 files changed, 14 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/applications/misc/monitorcontrol/default.nix b/nixpkgs/pkgs/applications/misc/monitorcontrol/default.nix
index f9002b10b063..6c3a1ccec34e 100644
--- a/nixpkgs/pkgs/applications/misc/monitorcontrol/default.nix
+++ b/nixpkgs/pkgs/applications/misc/monitorcontrol/default.nix
@@ -1,19 +1,28 @@
-{ lib, fetchurl, stdenv, undmg }:
+{ lib, fetchurl, stdenv, _7zz }:
 
 # This cannot be built from source due to the problematic nature of XCode - so
 # this is what it's like when doves cry?
 
 stdenv.mkDerivation rec {
   pname = "MonitorControl";
-  version = "4.1.0";
+  version = "4.2.0";
 
   src = fetchurl {
     url =
       "https://github.com/MonitorControl/${pname}/releases/download/v${version}/MonitorControl.${version}.dmg";
-    sha256 = "iaxM9j78Sq1EH5TCY240N+D5bG6quk2dZj8T7nt9ATo=";
+    sha256 = "Q96uK6wVe1D2uLvWL+pFR6LcmrU7cgmr2Y5tPvvTDgI=";
   };
 
-  nativeBuildInputs = [ undmg ];
+  # MonitorControl.${version}.dmg is APFS formatted, unpack with 7zz
+  unpackCmd = ''
+    runHook preUnpack
+
+    7zz x $src
+
+    runHook postUnpack
+  '';
+
+  nativeBuildInputs = [ _7zz ];
 
   sourceRoot = "MonitorControl.app";
 
@@ -27,7 +36,7 @@ stdenv.mkDerivation rec {
     longDescription = "Controls your external display brightness and volume and shows native OSD. Use menulet sliders or the keyboard, including native Apple keys!";
     homepage = "https://github.com/MonitorControl/MonitorControl#readme";
     license = licenses.mit;
-    maintainers = with maintainers; [ cbleslie ];
+    maintainers = with maintainers; [ cbleslie cottand ];
     platforms = platforms.darwin;
   };
 }