ctucx.git: nixfiles

ctucx' nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
{ stdenv, fetchurl, undmg, ... }:

stdenv.mkDerivation rec {
  pname   = "MonitorControl";
  version = "4.1.0";

  buildInputs  = [ undmg ];
  sourceRoot   = ".";
  phases       = [ "unpackPhase" "installPhase" ];
  installPhase = ''
    mkdir -p "$out/Applications"
    cp -r "MonitorControl.app" "$out/Applications/MonitorControl.app"
  '';

  src = fetchurl {
    name   = "MonitorControl.${version}.dmg";
    url    = "https://github.com/MonitorControl/MonitorControl/releases/download/v${version}/MonitorControl.${version}.dmg";
    sha256 = "0fh1gmxyw4rzcsflvfmadrngkq1p6ip67hll3x2asjpw7vv4rb49";
  };

#  meta = with stdenv.lib; {
#    description = "Control your display's brightness & volume on your Mac as if it was a native Apple Display";
#    homepage    = "https://github.com/MonitorControl/MonitorControl";
#    platforms   = platforms.darwin;
#  };
}